class ORTools::Sat::IntVar

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.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(index : Int32) #

[View source]

Class Method Detail

def self.zero #

Required to allow Array#sum of IntVar variables to be summed into a LinearExpression


[View source]

Instance Method Detail

def !=(other : Expressible) #

[View source]
def +(other : Expressible) #

[View source]
def -(other : Expressible) #

[View source]
def - : 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


[View source]
def <(other : Expressible) #

[View source]
def <=(other : Expressible) #

[View source]
def ==(other : Expressible) #

[View source]
def >(other : Expressible) #

[View source]
def >=(other : Expressible) #

[View source]
def index : Int32 #

[View source]
def to_lexpr : LinearExpression #

[View source]