Overview | Group | Tree | Graph | Index | Concepts |
An instance of the class IlcContinuousReservoir
represents a
resource which activities can either fill or empty in a continuous process.
For example, if an activity that starts at time st and ends at time
et can fill the reservoir by a capacity C, the quantity
put in the continuous reservoir by the activity at time t is the following.
If the duration of the activity is null, the filling (or emptying) process is not continuous since the quantity C is instantaneously put in (or removed from) the reservoir at time et (which is equal to st).
Scheduler Engine ensures no attempt is made to further empty an already-empty continuous reservoir. Furthermore, if you define a maximal level of the continuous reservoir, then this maximal level will never be exceeded.
When the problem model represents an ongoing process, the continuous
reservoir may already have some non-zero level present. To avoid this
situation, simply pass an initial level to the constructor of
IlcContinuousReservoir
.
The capacity of a continuous reservoir can vary over time. You can define
temporary maximal and minimal levels by using member functions of
IlcContinuousReservoir
.
Closing a Continuous Reservoir
As for the class IlcReservoir
, the member
function IlcResource::close
is crucial for
propagation affecting the class IlcContinuousReservoir
. If
close
is not called, new activities filling or emptying the
reservoir can still be added; thus preventing propagation. The continuous
reservoir must be closed before propagation can take place.
Disjunctive Constraints
As with reservoirs, there are no disjunctive constraints with continuous reservoirs.
Printing or Displaying Continuous Reservoirs
The printed representation of an instance of the class
IlcContinuousReservoir
consists of its name, if it exists, and
its theoretical capacity followed by its initial level. The two values are
enclosed in brackets and separated by a dash (-).
For example:
r1[100 - 10]
represents the continuous reservoir named
r1
which has a capacity equal to 100 and an initial level equal
to 10.
If the Solver trace is active and the resource is not named, the string
"IlcContinuousReservoir
" is followed by the address
of the implementation object. The address will be enclosed in parentheses.
If the theoretical capacity of the reservoir is equal to its maximal
value (that is, IlcIntMax/2
), the string "Maximum
Capacity
" is displayed instead of its numerical value.
See Also:
IlcCapResource, IlcContinuousReservoirIterator, IlcResource, IlcResourceConstraint, IlcSchedule
Constructor Summary | |
---|---|
public | IlcContinuousReservoir() |
public | IlcContinuousReservoir(IlcContinuousReservoirI * impl) |
public | IlcContinuousReservoir(IlcSchedule schedule, IlcInt capacity=IlcMaxCapacityReservoir, IlcFloat initialLevel=0, IlcBool timetable=IlcTrue) |
Method Summary | |
---|---|
public IlcContinuousReservoirI * | getImpl() const |
public IlcFloat | getInitialLevel() const |
public IlcFloat | getLevelMax(IlcInt time) const |
public IlcFloat | getLevelMaxMax(IlcInt t1, IlcInt t2) const |
public IlcFloat | getLevelMaxMin(IlcInt t1, IlcInt t2) const |
public IlcFloat | getLevelMin(IlcInt time) const |
public IlcFloat | getLevelMinMax(IlcInt t1, IlcInt t2) const |
public IlcFloat | getLevelMinMin(IlcInt t1, IlcInt t2) const |
public IlcFloatTimetable | getTimetable(IlcInt time) const |
public IlcFloatTimetable | getTimetable() const |
public IlcConstraint | makeTimetableConstraint(IlcInt timeMin, IlcInt timeMax, IlcFloat precision=ILC_CONTINUOUS_RESERVOIR_PRECISION) |
public void | operator=(const IlcContinuousReservoir & h) |
public void | setLevelMax(IlcInt timeMin, IlcInt timeMax, IlcFloat levelMax) |
public void | setLevelMin(IlcInt timeMin, IlcInt timeMax, IlcFloat levelMin) |
Constructor Detail |
---|
This constructor creates a new instance of IlcContinuousReservoir
and adds
it to the set of resources managed in the given schedule
. The capacity
expresses the capacity of the new continuous reservoir. The capacity may be
consumed by certain activities and produced by others. The argument initialLevel
defines an initial amount in the continuous reservoir at the time origin of the
schedule. By default, the reservoir is assumed to be empty at the time origin;
that is, the initial level is 0 (zero). The default value of capacity
is IlcIntMax/2
;
that is the maximal theoretical capacity that is allowed. Any capacity greater
than IlcIntMax/2
will be treated as if it were equal to IlcIntMax/2
.
If timetable
is IlcTrue
, then a timetable constraint is posted,
defining the
level of the reservoir to be between 0 (zero) with theoretical capacity over
the interval [timeMin, timeMax)
, where timeMin
is the origin and timeMax
is the
horizon of the schedule. An instance of IloSolver::SolverErrorException
is thrown
if capacity
is strictly negative.
Method Detail |
---|
This member function returns the initial level of the continuous reservoir; that is, the initial level that was passed to the continuous reservoir constructor.
This member function returns the maximal level that is present at
the given time. An instance of IloSolver::SolverErrorException
is
thrown if the timetables of the invoking continuous reservoir
do not cover the given time.
This member function returns the maximal consumable level throughout
the integer time points of the interval [timeMin, timeMax)
(that is, the
maximal value over the time points timeMin, ... timeMax-1
of the maximal
resource level). An instance of IloSolver::SolverErrorException
is thrown
if the timetables of the invoking continuous reservoir do not cover the
complete interval indicated by [timeMin, timeMax)
.
This member function returns the maximal consumable level,
over the integer time points of the interval [timeMin, timeMax)
, of the
minimal resource level. An instance of IloSolver::SolverErrorException
is thrown if the timetables of the invoking continuous reservoir do not
cover the complete interval indicated by [timeMin, timeMax)
.
This member function returns the minimal level that is present at the
given time. An instance of IloSolver::SolverErrorException
is thrown if the
timetable of the invoking continuous reservoir does not cover the given time.
This member function returns the minimal consumable level,
over the integer time points of the interval [timeMin, timeMax)
, of
the maximal resource level. An instance of IloSolver::SolverErrorException
is thrown if the timetables of the invoking continuous reservoir do not
cover the complete interval indicated by [timeMin, timeMax)
.
This member function returns the minimal consumable level
throughout the integer time points of the interval [timeMin, timeMax)
(that is, the minimal value over the time points timeMin, ..., timeMax-1
of
the minimal resource level). An instance of IloSolver::SolverErrorException
is thrown if the timetable of the invoking continuous reservoir does not cover
the complete interval indicated by [timeMin, timeMax)
.
This member function returns the timetable that includes
time
. An instance of
IloSolver::SolverErrorException
is thrown if no timetable is
defined at time
. The invoking resource must not be a continuous
reservoir.
This member function returns the first timetable of the invoking resource
(first in chronological order). An instance of
IloSolver::SolverErrorException
is thrown is no timetable
exists for the invoking resource. The invoking resource must not be a
continuous reservoir.
This member function creates and returns a timetable constraint
for the invoking continuous reservoir. This timetable constraint
implies that the capacity of the continuous reservoir is limited to
the theoretical capacity of the reservoir from timeMin
to timeMax
. The time step of the timetable is 1. An
instance of IloSolver::SolverErrorException
is thrown
if timeMin
is not strictly less than
timeMax
or if the new timetable overlaps another
timetable that has already been created for the invoking continuous
reservoir.
This member function states that the level of the continuous reservoir
can be at most levelMax
at each integer time point of the
interval [timeMin, timeMax)
. An instance of
IloSolver::SolverErrorException
is thrown if the timetable
of the invoking continuous reservoir does not cover the complete
interval indicated by [timeMin, timeMax)
. The continuous reservoir
must be closed in order to propagate constraints.
This member function states that the level of the continuous reservoir must be at
least levelMin
at each integer time point of the interval
[timeMin, timeMax)
. An instance of IloSolver::SolverErrorException
is thrown if the timetable of the invoking continuous reservoir does not
cover the complete interval indicated by [timeMin, timeMax)
. The continuous
reservoir must be closed in order to propagate constraints.