Describe
Ask these questions to describe an optimization problem adequately for application development.
The aim in this tutorial is to see three different ways to build a model: by rows, by columns, or by nonzeros. After building the model of the problem in one of those ways, the application optimizes the problem and displays the solution.
Step One: Describe the problem
Write a natural language description of the problem and answer these questions:
What is known about the problem?
What are the unknown pieces of information (the decision variables) in this problem?
What are the limitations (the constraints) on the decision variables?
What is the purpose (the objective) of solving this problem?
Building a small LP problem in C#
Here is a conventional formulation of the problem that the example optimizes:
| Maximize | x1 + 2x2 + 3x3 |
| subject to | –x1 + x2 + x3 x1 – 3x2 + x3 |
| with these bounds | 0 0 0 |
What are the decision variables in this problem?
x1, x2, x3 What are the constraints?
–x1 + x2 + x3
≤20x1 – 3x2 + x3
≤300
≤x1≤400
≤x2≤infinity0
≤x3≤infinityWhat is the objective?
Maximize x1 + 2x2 + 3x3