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.Original problem:

2) Modifying objective coefficients

MAX = 20 * A + 30 * CModified problem after adding a variable:

S.T.

A + 2 * C <= 120

A <= 60

C <= 50

MAX = 20 * A + 30 * C - 2 *DModified problem after adding a constraint:

S.T.

A + 2 * C <= 120

A <= 60

C <= 50

MAX = 20 * A + 30 * C - 2 *DModified problem after changing objective coefficients.

S.T.

A + 2 * C <= 120

A <= 60

C <= 50

[C + D >= 50] (*)

MAX= -10 * A + 30 * C - 3 *DSolving such a problem with the LINDO API involves the following steps:

S.T.

A + 2 * C <= 120

A <= 60

C <= 50

C + D >= 50

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 |