Skip to content

Commit 09e5f25

Browse files
committed
Fix formatting
1 parent 3198306 commit 09e5f25

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/Bridges/Variable/map.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ function add_keys_for_bridge(
358358
end
359359
map.bridges[bridge_index] = call_in_context(map, bridge_index, bridge_fun)
360360
variables = MOI.VariableIndex[
361-
MOI.VariableIndex(-(bridge_index - 1 + i)) for i in 1:MOI.dimension(set)
361+
MOI.VariableIndex(-(bridge_index - 1 + i)) for
362+
i in 1:MOI.dimension(set)
362363
]
363364
if map.unbridged_function !== nothing
364365
mappings = unbridged_map(map.bridges[bridge_index], variables)

src/Utilities/functions.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3157,7 +3157,10 @@ function convert_approx(
31573157
i = findfirst(t -> isapprox(t.coefficient, one(T), atol = tol), f.terms)
31583158
if abs(f.constant) > tol ||
31593159
i === nothing ||
3160-
any(j -> j != i && abs(f.terms[j].coefficient) > tol, eachindex(f.terms))
3160+
any(
3161+
j -> j != i && abs(f.terms[j].coefficient) > tol,
3162+
eachindex(f.terms),
3163+
)
31613164
throw(InexactError(:convert_approx, MOI.VariableIndex, func))
31623165
end
31633166
return f.terms[i].variable

src/sets.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ end
13011301
BinPacking(capacity::T, weights::Vector{T}) where {T}
13021302
13031303
The set ``\\{x \\in \\mathbb{R}^d\\}`` such that
1304-
``\\sum\\limits_{i=1}^d w_i x_i \le c``.
1304+
``\\sum\\limits_{i=1}^d w_i x_i \\le c``.
13051305
13061306
This constraint is sometimes called `bin_packing`.
13071307
@@ -1311,6 +1311,7 @@ This constraint is sometimes called `bin_packing`.
13111311
model = Utilities.Model{Float64}()
13121312
x = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
13131313
add_constraint(model, VectorOfVariables(x), BinPacking(0.5, rand(3)))
1314+
```
13141315
"""
13151316
struct BinPacking{T} <: AbstractVectorSet
13161317
capacity::T
@@ -1355,6 +1356,7 @@ d = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
13551356
r = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
13561357
b, _ = add_constrained_variable(model, MOI.Integer())
13571358
add_constraint(model, VectorOfVariables([s; d; r; b]), Cumulative(10))
1359+
```
13581360
"""
13591361
struct Cumulative <: AbstractVectorSet
13601362
dimension::Int
@@ -1382,6 +1384,7 @@ model = Utilities.Model{Float64}()
13821384
x = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
13831385
table = [1 1 0; 0 1 1; 1 0 1; 1 1 1]
13841386
add_constraint(model, VectorOfVariables(x), Table(table))
1387+
```
13851388
"""
13861389
struct Table{T} <: AbstractVectorSet
13871390
table::Matrix{T}
@@ -1407,6 +1410,7 @@ This constraint is sometimes called `circuit`.
14071410
model = Utilities.Model{Float64}()
14081411
x = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
14091412
add_constraint(model, VectorOfVariables(x), Circuit(3))
1413+
```
14101414
"""
14111415
struct Circuit <: AbstractVectorSet
14121416
dimension::Int

0 commit comments

Comments
 (0)