The MODIFY.ox Model

C Programming Example with the LINDO API demonstrating adding new variables and constraints.

View the model
Download the model

C programming example of interfacing with the LINDO API demonstrating adding new variables and constraints.
Original problem:

MAX = 20 * A + 30 * C
S.T.
A + 2 * C <= 120
A <= 60
C <= 50
Modified problem after adding variables:
MAX = 20 * A + 30 * C - 2 *D
S.T.
A + 2 * C<= 120
A <= 60
C <= 50
[C + D >= 50] add later
Solving such a problem with the LINDO API involves the following steps:
1. Create a LINDO environment.
2. Create a model in the environment.
3. Specify the model.
4. Add a new variable
5. Perform the optimization.
6. Retrieve the solution.
7. Delete the LINDO environement.

Keywords:

Modify |