IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Searching for Solutions > A Systematic Method for Solving Problems |
A Systematic Method for Solving Problems |
INDEX
![]() |
When we look for a systematic method to solve problems in scheduling and resource allocation, we find that one of the most important principles of constraint programing consists of clearly separating the definition of a problem from its resolution. As a first step in that direction, we recommend that you first write in natural language a precise description of the problem to be solved.
This description may suggest several possible representations (that is, several models) of the same problem based on the classes of constraints available in Scheduler (and as appropriate, Concert Technology and Solver). You should then evaluate those alternative models with respect to a number of criteria, including:
Once you have chosen a model, implement it using classes and functions from the Scheduler library (and as appropriate, from the Concert Technology and Solver libraries). In the following examples, we implement models by defining a function named DefineModel
that takes problem data as its arguments and returns an instance of the class IloModel
. Activities and resources can be accessed from that model, so returning the model is generally sufficient to represent a problem.
There are situations, however, where returning a model (an instance of IloModel
) is not sufficient, for example, when DefineModel
also defines optimization criteria in the form of additional variables to be used in the problem-solving part of the program. When that return value is not fully sufficient, you can specify additional return values as parameters passed by reference. The following example illustrates this implementation technique, the one most frequently employed in this manual.
IloModel DefineModel(/* parameters */, IloNumVar& criterion) { /* ... */ IloModel model = /* ... */; /* ... */ criterion = /* ... */; /* ... */ return model; }
The next step consists of implementing and experimenting with one or more strategies for exploring the search space. Except for very simple problems, for which straightforward algorithms exist, the solution of a scheduling problem requires some form of exploration of the solution space. In some cases, we define a global non-deterministic goal named SolveProblem
; to define that goal, we use non-deterministic programing functions.
We can summarize the process of solving a scheduling or allocation problem in the following steps.
DefineModel
.
DefineModel
through parameters passed by reference.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |