-
-
Notifications
You must be signed in to change notification settings - Fork 407
Closed
Labels
Milestone
Description
We have a decision to make about what to do if a user writes the following:
model = Model()
@variable(model, x[1:2] in MOI.Integer())
Should we
- (a) throw a nice error message because
MOI.Integer
is a scalar-set andx
is a vector; or - (b) broadcast the scalar set over the vector.
Either case needs a method like:
function build_variable(
_error::Function,
variables::Vector{<:ScalarVariable},
set::MOI.AbstractScalarSet
)
return VariablesConstrainedOnCreation.(variables, Ref(set))
end
along with some tests. (If (a), the return
replaced by a nice error message.)
cc @Wikunia
Wikunia and blegat