Overview | Group | Tree | Graph | Index | Concepts |
Description |
Activities may be ranked automatically as part of the constraint propagation process.
Ranking a resource constraint first means that the activity corresponding
to the resource constraint will be executed before every activity on the
resource that has not already been ranked first. Specifying that a resource
constraint is not ranked first (that is, IlcResourceConstraint::rankNotFirst
)
means that the corresponding activity will execute after at least one of
the activities that is currently not ranked. A similar (inverse) rule applies to ranking last.
More precisely, the propagation of global constraints (light
precedence graph, disjunctive constraint) allows Scheduler Engine to deduce that some activities
cannot be first or cannot be last: internal versions of the member functions IlcResourceConstraint::rankNotFirst
and IlcResourceConstraint::rankNotLast
are called as part of the constraint propagation process.
Ranking facilities are defined only for
unary resources with a
posted light precedence graph constraint, or state resources
with a posted
disjunctive constraint.
Use the member function
IlcResource::hasRankInfo
to find out whether or not ranking facilities are
available on a given resource
A resource constraint can be ranked if and only if its time extent is
IlcTimeExtent::IlcFromStartToEnd
.
In addition, if the resource is
closed (as defined for the parent class IlcResource
) and only one activity
can be first, then this activity is necessarily first: an internal version of the
member function IlcResourceConstraint::rankFirst
is called as part of the constraint propagation process.
Similarly, if the resource is
closed and only one activity can be last, then this activity is necessarily last:
an internal version of the member function
rankLast
is called as part of the constraint propagation process.
If the resource is not closed, then ranking an activity to be not first or not last on a resource has no influence on its earliest start time.
The member functions IlcResourceConstraint::isPossibleFirst
,
IlcResourceConstraint::isPossibleLast
,
IlcResourceConstraint::isRanked
,
IlcResourceConstraint::isRankedFirst
, and
IlcResourceConstraint::isRankedLast
let you know whether the activity
that corresponds to a given resource constraint can be first, can be last, is already ranked,
ranked first or ranked last.
Non-contributing resource constraints (those not posted, with null processing time or with null capacity requirement) are automatically considered as being ranked; therfore, they are not possible first or possible last anymore.
Furthermore, some member functions are available on the class IlcResource
to access the last resource constraint that has been ranked first or last (IlcResource::getLastRankedFirstRC
, IlcResource::getLastRankedLastRC
) as well as to post demons on the
detection of new ranked first or last activities on the resource (IlcResource::whenRankedFirstRC
,
IlcResource::whenRankedLastRC
).
Some iterators are available for a chronological traversal of all the activities that
have been ranked first or last or for iterating over the resource constraints that are
possible first or last (IlcResource::ResourceConstraintIterator
,
IlcResource::ResourceConstraintDeltaIterator
).
See Also
IlcResource, IlcResourceConstraint, IlcTimeExtent, Precedence Graph Constraints, Disjunctive Constraint