Class: Gecode::Int::Linear::LinearRelationConstraint
- Inherits:
-
ReifiableConstraint
- Object
- Constraint
- ReifiableConstraint
- Gecode::Int::Linear::LinearRelationConstraint
- Defined in:
- lib/gecoder/interface/constraints/int/linear.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#post ⇒ Object
:nodoc:.
Methods inherited from ReifiableConstraint
#&, #reification_var, #reification_var=, #|
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraint
Instance Method Details
#post ⇒ Object
:nodoc:
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/gecoder/interface/constraints/int/linear.rb', line 65 def post lhs, rhs, relation_type, reif_var = @params.values_at(:lhs, :rhs, :relation_type, :reif) reif_var = reif_var.to_bool_var.bind if reif_var.respond_to? :to_bool_var final_exp = (lhs.to_minimodel_lin_exp - rhs.to_minimodel_lin_exp) if reif_var.nil? final_exp.post(@model.active_space, relation_type, *) else final_exp.post(@model.active_space, relation_type, reif_var, *) end end |