IBM ILOG Solver User's Manual > Extending the Library > Advanced Modeling with Set Variables: Configuring Tankers > Solve |
Solve |
INDEX
![]() |
With that model, you know that in the worst case, if you have N orders, and you assign one order per truck, you surely have a solution using N trucks, though it is not necessarily an optimal one. To find an optimal solution, you first look for an assignment of orders to trucks that uses at most N trucks. Let's say it uses only N' trucks, where N' is less than or equal to N. If you find such an assignment, you look for a solution using at most N'-1 trucks. If you are unable to find such an N', the optimal is N.
The algorithm looks like this:
The algorithm to search for an assignment to at most M trucks is decomposed into two nested phases:
To guide that search, you implement two goals. As the next branch to explore, one goal chooses the truck that is hardest to fill--hardest in the sense that it has the smallest domain. The other goal chooses the tank that is hardest to fill, also in the sense that it has the smallest domain.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |