Skip to main content
FRAMES NO FRAMES

IloSameSequence

public IloConstraint IloSameSequence(const IloEnv env, const IloIntervalSequenceVar seq1, const IloIntervalSequenceVar seq2, const char * name=0)
Definition file: ilconcert/ilosmodel.h
Returns a same-sequence constraint.

This function creates a same-sequence constraint between sequence variables seq1 and seq2 and makes it part of the environment env. Sequence variables seq1 and seq2 should be of the same size. The mapping between interval variables of the two sequences is given by the order of the interval variables in the arrays a1 and a2 used in the definition of the sequences. The constraint states that the two sequences seq1 and seq2 are identical modulo a mapping between intervals a1[i] and a2[i]. By default, the name of the constraint is the empty string, but you can specify a name of your own choice.

Note: This constraint cannot be used in a logical constraint.

For more information on the same-sequence constraint, see the concept Interval variable sequencing in CP Optimizer.


IloSameSequence

public IloConstraint IloSameSequence(const IloEnv env, const IloIntervalSequenceVar seq1, const IloIntervalSequenceVar seq2, const IloIntervalVarArray a1, const IloIntervalVarArray a2, const char * name=0)
Definition file: ilconcert/ilosmodel.h
Returns a same-sequence constraint.

This function creates a same-sequence constraint between sequence variables seq1 and seq2 and makes it part of the environment env. Sequence variables seq1 and seq2 should be of the same size n. The mapping between interval variables of the two sequences is specified by arrays a1 and a2. Arrays a1 and a2 should be of same size n. The constraint states that the two sequences seq1 and seq2 are identical modulo a mapping between intervals a1[i] and a2[i]. By default, the name of the constraint is the empty string, but you can specify a name of your own choice.

Note: This constraint cannot be used in a logical constraint.

For more information on the same-sequence constraint, see the concept Interval variable sequencing in CP Optimizer.