The EX_MODIFY Model

Java programming example of interfacing with the LINDO API demonstrating

View the model
Download the model

A Java programming example of interfacing with the LINDO API demonstrating

1) Adding new variables and constraints.
2) Modifying objective coefficients
Original problem:
MAX = 20 * A + 30 * C
S.T.
A + 2 * C <= 120
A <= 60
C <= 50
Modified problem after adding a variable:
MAX = 20 * A + 30 * C - 2 *D
S.T.
A + 2 * C <= 120
A <= 60
C <= 50
Modified problem after adding a constraint:
MAX = 20 * A + 30 * C - 2 *D
S.T.
A + 2 * C <= 120
A <= 60
C <= 50
[C + D >= 50] (*)
Modified problem after changing objective coefficients.
MAX= -10 * A + 30 * C - 3 *D
S.T.
A + 2 * C <= 120
A <= 60
C <= 50
C + D >= 50
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.
4a. Add a new variable
4b. Add a new constraint
4c. Modify obj coeff
5. Perform the optimization.
6. Retrieve the solution.
7. Delete the LINDO environement.

Keywords:

Modify |