Skip to content

Commit a5ce641

Browse files
committed
Update
1 parent 17013cf commit a5ce641

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Utilities/matrix_of_constraints.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ If `S` is not part of the list, return `nothing`.
290290
function set_index end
291291

292292
"""
293-
add_set(sets, i)::Int64
293+
add_set(sets, i::Int)::Int64
294294
295295
Add a scalar set of type index `i`.
296296
297-
add_set(sets, i, dim)::Int64
297+
add_set(sets, i::Int, dim::Int)::Int64
298298
299299
Add a vector set of type index `i` and dimension `dim`.
300300
@@ -387,7 +387,7 @@ function MOI.get(
387387
return MOI.get(v.sets, attr)
388388
end
389389

390-
_add_set(sets, i, ::MOI.AbstractScalarFunction) = add_set(sets, i)
390+
_add_set(sets, i::Int, ::MOI.AbstractScalarFunction) = add_set(sets, i)
391391

392392
function _add_set(sets, i, func::MOI.AbstractVectorFunction)
393393
return add_set(sets, i, MOI.output_dimension(func))

src/Utilities/product_of_sets.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ MOI.dimension(sets::MixOfScalarSets) = length(sets.set_ids)
8888

8989
rows(::MixOfScalarSets, ci::MOI.ConstraintIndex) = ci.value
9090

91-
function add_set(sets::MixOfScalarSets, i)
91+
function add_set(sets::MixOfScalarSets, i::Int)::Int64
9292
push!(sets.set_ids, i)
9393
return length(sets.set_ids)
9494
end
@@ -224,7 +224,7 @@ function rows(
224224
return sets.rows[i][ci.value]
225225
end
226226

227-
function add_set(sets::OrderedProductOfSets, i, dim = 1)::Int
227+
function add_set(sets::OrderedProductOfSets, i::Int, dim::Int = 1)::Int64
228228
@assert !sets.final_touch
229229
push!(sets.rows[i], 1:dim)
230230
return length(sets.rows[i])

0 commit comments

Comments
 (0)