IloIntervalSequenceVar
Iterating Properties: Default behavior.
using CP;
range R = 1..3;
dvar interval tia[i in R] size i;
dvar sequence seq in tia;
subject to {
noOverlap(seq);
before(seq, tia[2], tia[3]);
prev(seq, tia[1], tia[3]);
}
execute {
writeln(seq);
writeln(seq.first() );
writeln(seq.next(seq.first() ) );
writeln(seq.last() );
writeln("loop");
var s=seq.first();
for(var i in R)
{
writeln(s);
s=seq.next(s) ;
}
writeln(s);
}<1 0 2 2> <1 2 3 1> <1 3 6 3> loop <1 0 2 2> <1 2 3 1> <1 3 6 3> null
| Field Attributes | Field Name and Description |
|---|---|
|
The name of the interval sequence variable.
|
| Method Attributes | Method Name and Description |
|---|---|
| postprocessing |
first()
Provides access to an interval sequence variable.
|
| postprocessing |
last()
Provides access to an interval sequence variable.
|
| postprocessing |
next(x)
Provides access to an interval sequence variable.
|
| postprocessing |
prev(x)
Provides access to an interval sequence variable.
|