IBM ILOG Solver User's Manual > Extending the Library > Writing a Goal: Car Sequencing > Writing a goal: Car sequencing > Building the model |
Building the model |
INDEX
![]() |
You create a constrained variable for each car that should be assembled on the line and organize those variables into an array. You assume that the order in which the cars appear on the line is the same as the order of the constrained variables in the array. That is, cars[0]
is the first car; cars[n-1]
is the last.
The values that the constrained variables can assume correspond to the configurations. If a constrained variable is bound to the value 3, for example, the corresponding car will have options corresponding to configuration 3. Initially, a car can have any configuration.
Here is the code for the model
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |