FRAMES NO FRAMES

Sequence Constraint
PREVIOUS NEXT
Description
Creating a Sequence Constraint
Indexing of the Path
Not Visited Nodes
Description

Since a unary resource can only process one activity at a time, all activities requiring the same unary resource must be chronologically ordered to find a solution. As a result, in any solution to a problem that includes a unary resource, each unary resource defines a directed path through all the activities requiring it.

The nodes of such a path correspond to resource constraints of the time extent IlcTimeExtent::IlcFromStartToEnd. The links between the resource constraints can hold transition costs. See IlcTransitionCostObject for more details.

The path has, for its first node, a virtual node before any activities. The link between this first node and the first activity on the resource holds the setup cost. This first activity is called the setup activity.

The path also has, for its last node, a virtual node after all activities. The link between this last node and the last activity on the resource holds the teardown cost. This last activity is called the teardown activity.

Scheduler Engine maintains the relationships between the variables defining a path (next of an activity, previous of an activity, cost of the links between activities) and the scheduler variables (start and end times of the activities and required capacity). The sequence constraint uses the transition time function associated with the resource. When a disjunctive constraint is posted on the resource, the sequence constraint will use the ranking information to improve propagation.

The sequence constraint allows the next and previous variables to be used with any Solver generic constraint algorithms dealing with paths and forests.

Creating a Sequence Constraint

To create such a sequence constraint, use the member function IlcUnaryResource::makeSequenceConstraint

The valid resource constraints are implicitly indexed when the resource is closed. Then the next, previous, and costs variables are created. In other words, the variables used by the path representation of the resource are created when the sequence constraint is created and the resource closed.

Indexing of the Path

Let Nb be the number of resource constraints of time extent IlcTimeExtent::IlcFromStartToEnd on a closed unary resource. The first node before any resource constraint is indexed by zero. The last node after any resource constraint is indexed by Nb + 1. A valid resource constraint is indexed by a unique number between 1 and Nb.

Not Visited Nodes

A node may or may not be visited in the path. A node is visited if it has a next and previous node visited by the path. If a node is not visited, its next and previous variables are bound to a dummy value. Such a node does not have any link on the path and so it does not contribute to the sum of costs of the links in the path.

With a unary resource, an activity is visited only if its required resource constraint contributes to the resource. That is, if the product of the processing time of the activity multiplied by the required capacity is not null. In the sequence constraint on the unary resource, the value of the next and previous variable of a not visited resource constraint is -1.

See Also

IlcActivity, IlcTimeExtent, IlcTransitionTimeObject, IlcUnaryResource, IlcResourceConstraint, Transition Cost (Setup and Teardown Costs) In Scheduler Engine

PREVIOUS NEXT