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
{{ message }}
This repository was archived by the owner on Jun 14, 2020. It is now read-only.
SVCI(v::SinVar, ::S) where S =SVCI{S}(v.variable.value)
44
+
45
+
functionhasvalue(d::Dict, val)
46
+
for v invalues(d)
47
+
if v == val
48
+
returntrue
49
+
end
50
+
end
51
+
returnfalse
52
+
end
53
+
54
+
functioncheckexisting(m::LinQuadOptimizer, v::SinVar, set::S) where S
55
+
ref =SVCI(v, set)
56
+
ifhasvalue(constrdict(m, ref), v.variable)
57
+
error("Adding the same constraint type: $(S) is not allowed for SingleVariable function")
58
+
end
59
+
end
60
+
61
+
functioncheckconflicting(m::LinQuadOptimizer, v::SinVar, set_to_add::S0, set_to_test::S) where S where S0
62
+
ref =SVCI(v, set_to_test)
63
+
ifhasvalue(constrdict(m, ref), v.variable)
64
+
error("Adding the same constraint type: $(S0) is not allowed for SingleVariable function because there is constraint of type $(S) tied to the respective variable")
65
+
end
66
+
end
67
+
43
68
# add constraint
44
69
function MOI.addconstraint!(m::LinQuadOptimizer, v::SinVar, set::S) where S <:LinSets
0 commit comments