You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#check if indicator variable with that name already exists
8
+
if disj_name inkeys(object_dictionary(m))
9
+
#check that the existing name is for a valid binary variable that can be used for the disjunction
10
+
type_check = m[disj_name] isa Vector{VariableRef} #check it is a variable
11
+
type_check2 =all([is_binary(disj_var_i) for disj_var_i in m[disj_name]]) #check it is binary
12
+
dim_check =length(m[disj_name]) >=length(disj) #check the number of indices is at least the number of disjuncts
13
+
@assert type_check && dim_check && type_check2 "An object of name $name is already attached to this model, but is not valid for use in the disjunction. $name must be a Vector of binary variables with dimension greater than or equal to that of the disjunction."
0 commit comments