Accessing solutions in postprocessing

Describes how to access the solution in postprocessing.

You can access information about intervals, sequences, and instances of cumulFunction or stateFunction in a solution.

The value of an interval variable a in a solution can be accessed using the following instructions:

1) a.present returns a boolean describing whether or not interval a is present in the solution.

2) for a present interval, a.start, a.end and a.size respectively return the start, end and size value of interval a in the solution.

An interval variable a in a solution can be displayed using writeln(a). This instruction displays a vector: < a.present a.start a.end a.size >.

The value of a sequence variable p in a solution can be accessed using the following instructions:

1) p.first() and p.last() respectively return the interval variable that corresponds to the first (resp. last) interval of the sequence. In case the sequence is empty the returned value is null.

2) p.next(a) and p.prev(a) respectively return the interval variable sequenced just after a (resp. just before a) in the sequence. In case a is the last (resp. first) interval in the sequence, the returned value is null.

A sequence variable p in a solution can be displayed using writeln(p). This instruction displays the set of present interval variables in the sequence following the total order specified by the sequence.

In postprocessing, you can also access values of a cumulative function or a state function in a solution with the following OPL functions:

cumulFunctionValue

stateFunctionValue

segmentValue

numberOfSegments

segmentStart

segmentEnd