Step by step¶
Having introduced the LocalSolver modeling language and the solver’s Python, C++, Java and .NET programming interfaces, we can now consider how to solve a practical optimization problem with LocalSolver. We will first give the main principles for designing good models and thus making the most of LocalSolver. You will see that it involves choosing the appropriate decision variables, subject to the right set of constraints, with a well-defined objective function. We will illustrate these principles on several examples from our example tour.
Then we apply these principles to tackle the car sequencing problem, a well-known combinatorial optimization problem related to the organization of the production line of a car manufacturer. We proceed step by step, from the reading of input data, to the writing of the best solution found.
Finally we consider the migration from an Integer Program to a LocalSolver model. We show that it involves identifying the set of decision variables and rewriting some expressions, taking advantage of the availability of nonlinear operators.