lib/gecoder/interface/constraints/int_enum/arithmetic.rb in gecoder-0.5.0 vs lib/gecoder/interface/constraints/int_enum/arithmetic.rb in gecoder-0.6.0

- old
+ new

@@ -22,12 +22,14 @@ enum, strength = @params.values_at(:lhs, :strength) if variable.nil? variable = @model.int_var(enum.domain_range) end - Gecode::Raw::max(@model.active_space, enum.to_int_var_array, - variable.bind, strength) + @model.add_interaction do + Gecode::Raw::max(@model.active_space, enum.to_int_var_array, + variable.bind, strength) + end return variable end end # Describes an expression stub started with an int var enum following by #min. @@ -36,11 +38,13 @@ enum, strength = @params.values_at(:lhs, :strength) if variable.nil? variable = @model.int_var(enum.domain_range) end - Gecode::Raw::min(@model.active_space, enum.to_int_var_array, - variable.bind, strength) + @model.add_interaction do + Gecode::Raw::min(@model.active_space, enum.to_int_var_array, + variable.bind, strength) + end return variable end end end