class ORTools::Sat::IntVar
- ORTools::Sat::IntVar
- Reference
- Object
Overview
The base variable used in Constraing Programming (CP) problems.
This variable should not be instantiated directly, but created with Model#new_int_var
Direct Known Subclasses
Defined in:
ortools-sat/int-var.crConstructors
Class Method Summary
-
.zero
Required to allow Array#sum of IntVar variables to be summed into a LinearExpression
Instance Method Summary
- #!=(other : Expressible)
- #+(other : Expressible)
- #-(other : Expressible)
-
#- : self
Negative index -1 is used to represent the negation of a variable in the model In the Case of IntVar, this will mean the negative of the variable In the case of BoolVar, this will mean the logical NOT of the variable These are used to simplify model constraints and for model efficiency
- #<(other : Expressible)
- #<=(other : Expressible)
- #==(other : Expressible)
- #>(other : Expressible)
- #>=(other : Expressible)
- #index : Int32
- #to_lexpr : LinearExpression
Constructor Detail
Class Method Detail
Required to allow Array#sum of IntVar variables to be summed into a LinearExpression
Instance Method Detail
Negative index -1 is used to represent the negation of a variable in the model In the Case of IntVar, this will mean the negative of the variable In the case of BoolVar, this will mean the logical NOT of the variable These are used to simplify model constraints and for model efficiency