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
@assertlength(set_fields) ==1"A reformulation cannot be done on constraint $ref because it is not one of the following GreaterThan, LessThan, or EqualTo."
67
-
@assert:valuein set_fields ||:lowerin set_fields ||:upperin set_fields "$ref must be one the following: GreaterThan, LessThan, or EqualTo."
63
+
functionapply_interval_arithmetic(ref)
64
+
if ref isa ConstraintRef
65
+
ref_obj =constraint_object(ref)
66
+
@assert ref_obj.set isa MOI.LessThan || ref_obj.set isa MOI.GreaterThan || ref_obj.set isa MOI.EqualTo "$ref must be one the following: GreaterThan, LessThan, or EqualTo."
67
+
ref_func =string(ref_obj.func)
68
+
ref_type =fieldnames(typeof(ref_obj.set))[1]
69
+
ref_rhs =normalized_rhs(ref)
70
+
elseif ref isa NonlinearConstraintRef
71
+
ref_str =string(ref)
72
+
@assertlength(findall(r"[<>]", ref_str)) <=1"$ref must be one of the following: GreaterThan, LessThan, or EqualTo."
@assertlength(set_fields) ==1"A reformulation cannot be done on constraint $ref because it is not one of the following GreaterThan, LessThan, or EqualTo."
157
+
@assert:valuein set_fields ||:lowerin set_fields ||:upperin set_fields "$ref must be one the following: GreaterThan, LessThan, or EqualTo."
158
+
vars =all_variables(ref.model) #get all variable names
0 commit comments