examples
DESCRIPTION
ssssssTRANSCRIPT
-
Software and examples
-
Optimisation Software
LINGO
Used to solve optimisation problems
To start entering a new optimisation problem type:
Model:
Enter the objective function by typing:
min = ; or max = ;
Then enter the constraints.
Each line must end by a semi-colon ;
The final statement in the problem should be end
-
Optimisation Software
Resolving MEA Example in LINGO
LINGO Input
Model:
min = 80*x1 + 60*x2;
0.2*x1 + 0.32*x2 < 0.25;
x1 + x2 = 1;
x1 > 0;
x2 > 0;
end
LINGO Output
Rows= 5 Vars= 2 No. integer vars= 0 ( all are linear)
Nonzeros= 10 Constraint nonz= 6( 4 are +- 1) Density=0.667
Smallest and largest elements in absolute value= 0.200000 80.0000
No. < : 1 No. =: 1 No. > : 2, Obj=MIN, GUBs
-
More Optimisation Examples
Lab Experiment
Determine the kinetics of a certain reaction by mixing two species, A and B. The cost of raw materials A and B are 2 and 3 $/kg, respectively.
Let x1 and x2 be the weights of A and B (kg) to be employed in the experiment
The operating cost of the experiment is given by:
OC = 4(x1)2 + 5(x2)2
The total cost of raw materials for the experiment should be exactly $6. Minimise the operating cost!
-
Lab Experiment (Contd)
LINGO Input
Model:
min = 4*x1^2 + 5*x2^2;
2*x1 + 3*x2 = 6;
x1 > 0;
x2 > 0;
end
LINGO Output
Rows= 4 Vars= 2 No. integer vars= 0
Nonlinear rows= 1 Nonlinear vars= 2 Nonlinear constraints= 0
Nonzeros= 7 Constraint nonz= 4 Density=0.583
Optimal solution found at step: 4
Objective value: 12.85714
Variable Value Reduced Cost
X1 1.071429 0.0000000E+00
X2 1.285714 0.0000000E+00
Row Slack or Surplus Dual Price
1 12.85714 1.000000
2 0.0000000E+00 -4.285715
3 1.071429 0.1939524E-07
4 1.285714 0.0000000E+00
Value of objective function: 12.857
Value of variable x1: 1.071
Value of variable x2: 1.286
More Optimisation Examples
-
Coal Conversion Plant
What are the optimal production rates of gaseous and liquid fuels that maximise the net profit of the plant?
Coal pre-
treatment
(maximum
capacity
18 kg coal/s)
Coal
gasification
(maximum
capacity
4 kg
coal/s)
coal in
3x1 + 2x2
kg coal/s
2x1 kg coal/s for power
generation of gasification
plant (value of power breaks
even with the
cost of coal
used in power
generation)
air
x1 kg coal/s
Coal
liquefaction
(maximum
capacity
12 kg
coal/s)
Byproducts
(negligible value)
Gaseous Fuel
x1 kg gas. fuel/s
Net profit $3/kg
of gaseous fuel
2x2 kg coal/s
Byproducts
(negligible value)
Liquid Fuel
x2 kg liquid fuel/s
Net profit $5/kg
of liquid fuel
3x1 + 2x2 18
x1 4
2x2 12
More Optimisation Examples
-
Coal Conversion Plant (Contd)
Objective function max z = 3x1 + 5x2
Constraints
Pretreatment capacity 3x1 + 2x2 18
Gasification capacity x1 4
Liquefaction capacity 2x2 12
Non-negativity x1 0
x2 0
0
2
4
6
8
10
0 2 4 6 8
x1
x2
x1 = 4
2x2 = 12
3x1 + 2x2 = 18
More Optimisation Examples
-
Coal Conversion Plant (Contd)
Graphical solution
Maximum profit Z = 36 for x1 = 2 and x2 = 6
0
2
4
6
8
10
0 2 4 6 8
x1
x2
x1 = 4
2x2 = 12
3x1 + 2x2 = 18
0
2
4
6
8
10
0 2 4 6 8
x1
x2
Z = 36 = 3x1 + 5x2
Z = 20 = 3x1 + 5x2
Z = 10 = 3x1 + 5x2
More Optimisation Examples
-
Coal Conversion Plant (Contd)
LINGO Input
Model:
max = 3*x1 + 5*x2;
3*x1 + 2*x2 : 2, Obj=MAX, GUBs
-
Methanol Delivery
Supply methanol for three Methyl acetate plants located in towns A, B, and C
Daily methanol requirements for each plant:
MeAc Plant location Tons/day A 6
B 1
C 10
Methanol production plants
MeOH plant 1 2 3 4 Capacity 7 5 3 2
More Optimisation Examples
-
Methanol Delivery (Contd)
Shipping cost (100 $/ton)
Schedule the methanol delivery system to minimize the transportation cost
MeOH Plant MeAc Plant A MeAc Plant B MeAc Plant C
1 2 1 5
2 3 0 8
3 11 6 15
4 7 1 9
More Optimisation Examples
-
Methanol Delivery (Contd)
We define the transportation loads (tons/day) going from each MeOH plant to each MeAc plant as follows:
Total transportation cost (Z)
MeOH Plant MeAc Plant A MeAc Plant B MeAc Plant C
1 X1A X1B X1C
2 X2A X2B X2C
3 X3A X3B X3C
4 X4A X4B X4C
Z = 2X1A + X1B + 5X1C + 3X2A + 0X2B + 8X2C + 11X3A + 6X3B + 15X3C + 7X4A + X4B + 9X4C
More Optimisation Examples
-
Methanol Delivery (Contd)
Objective function min Z = 2X1A + X1B + 5X1C + 3X2A + 0X2B
+ 8X2C + 11X3A + 6X3B + 15X3C
+ 7X4A + X4B + 9X4C
Constraints
Availability/supply X1A + X1B + X1C = 7
X2A + X2B + X2C = 5
X3A + X3B + X3C = 3
X4A + X4B + X4C = 2
Requirements/demand X1A + X2A + X3A + X4A = 6
X1B + X2B + X3B + X4B = 1
X1C + X2C + X3C + X4C = 10
More Optimisation Examples
-
Methanol Delivery (Contd)
Constraints
Non-negativity X1A 0
X1B 0
X1C 0
X2A 0
X2B 0
X2C 0
X3A 0
X3B 0
X3C 0
X4A 0
X4B 0
X4C 0
More Optimisation Examples