| Overview | Group | Tree | Graph | Deprecated | Index | Concepts |

A transition distance is a square matrix of non-negative integers that
represents a minimal distance between two interval variables. An
instance of transition distance can be used in the no-overlap
constraint (IloNoOverlap) and in state functions
(IloStateFunction).
In a no-overlap constraint the transition distance represents the minimal distance between two non-overlapping interval variables. The matrix is indexed using the integer types of interval variables in the sequence variable of the no-overlap constraint. For more information on the use of transition distance for interval sequencing, see the concept Interval variable sequencing in CP Optimizer.
In a state function, the transition distance represents the minimal distance between two integer states of the function. For more information on the use of transition distance for state functions, see the concept State functions in CP Optimizer.
See Also:
IloNoOverlap, IloStateFunction
| Method Summary | |
|---|---|
public IloInt | getSize() const |
public IloInt | getValue(IloInt from, IloInt to) const |
public | IloTransitionDistance(IloIntArray2 dtable, const char * name=0) |
public | IloTransitionDistance(const IloEnv env, IloInt size, const char * name=0) |
public void | setValue(IloInt from, IloInt to, IloInt val) const |
| Method Detail |
|---|
This constructor returns an instance of transition distance.
The 2-dimensional integer array argument dtable
gives the values of the transition distance. By default, the
name of the transition distance is the empty string, but you can
specify a name of your own choice.
This constructor returns an instance of transition distance of
the specified size. Initially, the transition
distance between any two indices is 0. You need to fill the
transition distance using the member function
setValue. By default, the name of the transition
distance is the empty string, but you can specify a
name of your own choice.
This member function returns the size of the invoking transition distance.
This member function returns the value of the invoking
transition distance between index from and index
to. This value is a non-negative integer. The
arguments from and to must be non-
negative integer indices lower than the size of the invoking
transition distance.
This member function sets the value of the invoking transition
distance. The arguments from and to
must be non-negative integer indices lower than the size of the
invoking transition distance. The argument val must
be a non-negative integer representing the distance between index
from and index to.