IBM ILOG Scheduler User's Manual > Advanced Concepts > Scheduling with State Resources: the Trolley Problem > Defining the Problem, Designing a Model > Resources |
Resources |
INDEX
![]() |
Two categories of resources are used in our problem: the trolley and the machines.
The trolley is a resource shared by all the jobs in the problem. Each activity consisting of loading/unloading an item on/from the trolley requires the trolley to be in the same area as the item. Notice that the trolley cannot be represented as a unary resource (class IloUnaryResource
) because there is no limit on the number of load/unload activities that can be performed in parallel on the same trolley provided that the trolley is in a suitable area. We want to associate a state variable with the trolley (its position), and express the constraint that two loading or unloading activities that require the trolley to be at different positions cannot overlap.
An instance of the class IloStateResource
is used to express this constraint. A state resource represents a resource, by default of infinite capacity, whose state can vary over time. Each activity that uses a state resource may require a state resource to be in a specific state or in any of a given set of states. Two activities cannot overlap if they require incompatible states during their execution.
To use state resources, we must first define the possible states of the resource. In this example, the states represent the possible positions of the trolley, and are defined as follows.
Next, the state resource representing the position of the trolley is created as follows in the DefineModel
function.
As in the job-shop scheduling problem, each machine is represented as a unary resource (class IloUnaryResource
).
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |