Escolar Documentos
Profissional Documentos
Cultura Documentos
Lecture 10 Objectives
On completion of this part, you should:
Understand
the
different
types
of
optimization problems and their formulation
Be able to formulate and solve a variety of
optimization problems in LINGO
Optimization Basics
What is Optimization?
The purpose of optimization is to maximize (or
minimize) the value of a function (called
objective function) subject to a number of
restrictions (called constraints).
Examples
1.
Optimization Basics
Examples (Continued)
2.
Optimization Basics
Examples (Continued)
3.
Optimization Basics
g2(x1,x2,,xN)0
gm(x1,x2,,xN)0
Equality
Constraints
h1(x1,x2,,xN)=0
h2(x1,x2,,xN)=0
hE(x1,x2,,xN)=0
Feasibility
Any vector (or point)
which satisfies all the
constraints of the
optimization program is
called a feasible
vector (or a feasible
point)
The set of all feasible
points is called
feasibility region or
feasibility domain
Any optimal solution
Optimization Basics
Optimization Basics
3x + 6y2
5x + xy 0
Integer Programming
Optimization Basics
Optimization Basics
Step 1
Step 2
Step 3
Optimization Example
Optimization Example
Objective function
Constraints
Variables (Basis 1 kg
solution)
1 kg MEA solution
water content 25 wt. %
x1
x2
z
(cents)
Cost of 1 kg solution
Optimization Example
Feasibility region
x1
Optimization Example
Feasibility region
Non-negativity constraints
x1 0 , x2 0
x2
x2
x1
x1
Optimization Example
Feasibility region
x2
x2
x2
x1 x1
x1
Optimization Example
Feasibility region
x2
Feasibility region
is this heavy line
x1
Optimization Example
Optimal Point
Intersection between
z = 75
x1 + x2 = 1
and
z = 70
0.20x1 + 0.32x2 =
0.25
x1
In addition
70 < zmin < 75
Optimization Example
z* = 71.6
Optimal
point
x2* = 0.42
x1* = 0.58
x1
Optimization Software
LINGO
or
max = ;
Optimization Software
LINGO Output
Model:
min = 80*x1 + 60*x2;
0.2*x1 + 0.32*x2 < 0.25;
x1 + x2 = 1;
x1 > 0;
x2 > 0;
end
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 <=
2
Single cols=
0
Optimal solution found at step:
0
Objective value:
71.66667
Variable
Value
Reduced Cost
X1
0.5833333
0.0000000E+00
X2
0.4166667
0.0000000E+00
Row
Slack or Surplus
Dual Price
1
71.66667
1.000000
2
0.0000000E+00
166.6667
3
0.0000000E+00
-113.3333
4
0.5833333
0.0000000E+00
5
0.4166667
0.0000000E+00
0.5833
0.4167
Lab Experiment
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=
Nonzeros=
7 Constraint nonz=
4 Density=0.583
Optimal solution found at step:
Objective value:
4
12.85714
Variable
X1
X2
Row
1
2
3
4
Value
1.071429
1.285714
Reduced Cost
0.0000000E+00
0.0000000E+00
Slack or Surplus
12.85714
0.0000000E+00
1.071429
1.285714
Dual Price
1.000000
-4.285715
0.1939524E-07
0.0000000E+00
1.071
1.286
3x1 + 2x2 18
Gaseous Fuel
x1 kg gas. fuel/s
Net profit $3/kg
of gaseous fuel
x1 4
Byproducts
(negligible value)
Liquid Fuel
x2 kg liquid fuel/s
Net profit $5/kg
of liquid fuel
2x2 12
Byproducts
(negligible value)
Objective function
Constraints
3x1 + 2x2 18
x1 4
2x2 12
x1 0
x2 0
Pretreatment capacity
Gasification capacity
Liquefaction capacity
Non-negativity
x2
10
x1 = 4
3x1 + 2x2 = 18
2x2 = 12
6
4
2
x1
0
0
Graphical solution
x2
x2
10
3x1 + 2x2 = 18
10
x1 = 4
Z = 36 = 3x1 + 5x2
2x2 = 12
Z = 20 = 3x1 + 5x2
4
Z = 10 = 3x1 + 5x2
x1
0
0
x1
0
0
Model:
max = 3*x1 + 5*x2;
3*x1 + 2*x2 <= 18;
x1 <= 4;
2*x2 <= 12;
x1 > 0;
x2 > 0;
end
LINGO Output
Rows=
6 Vars=
2 No. integer vars=
0 ( all are linear)
Nonzeros=
11 Constraint nonz=
6(
3 are +- 1) Density=0.611
Smallest and largest elements in absolute value=
1.00000
18.0000
No. < :
3 No. =:
0 No. > :
2, Obj=MAX, GUBs <=
2
Single cols=
0
Optimal solution found at step:
Objective value:
1
36.00000
Variable
X1
X2
Row
1
2
3
4
5
6
Value
2.000000
6.000000
Reduced Cost
0.0000000E+00
0.0000000E+00
Slack or Surplus
36.00000
2.000000
0.0000000E+00
0.0000000E+00
2.000000
6.000000
Dual Price
1.000000
0.0000000E+00
1.500000
1.000000
0.0000000E+00
0.0000000E+00
Methanol Delivery
Tons/day
A
B
C
6
1
10
MeAc Plant A
MeAc Plant B
MeAc Plant C
11
15
MeAc Plant A
MeAc Plant B
MeAc Plant C
X1A
X1B
X1C
X2A
X2B
X2C
X3A
X3B
X3C
X4A
X4B
X4C
Objective function
5X1C
0X2B
min Z =
2X1A + X1B +
+ 3X2A +
+ 8X2C + 11X3A
+ 6X3B + 15X3C
+ 7X4A + X4B +
9X4C
Constraints
Availability/supply
Requirements/demand
6
Constraints
Non-negativity
X1A
X1B
X1C
X2A
X2B
X2C
X3A
X3B
X3C
X4A
X4B
X4C
0
0
0
0
0
0
0
0
0
0
0
0
O
T
ocur
x10ifthevntdoesN
Mixed Integer Programs
m
inX
C
X
1,im
1.,
X1,jn
1.,
m
n
i
j
ijn1ij1j im
i1j
Mixed Integer Programs
Space 1
Space 2
Space 3
Space 4
R1
15
11
13
15
R2
13
12
12
17
R3
14
15
10
14
R4
17
13
11
16
Objective function
min Z =
15X11 + 11X12
+ 15X14 +
+ 12X23 +
+ 13X13
13X21 + 12X22
17X24 +
14X31
+ 15X32 + 10X33 + 14X34
+ 17X41 + 13X42 + 11X43
+ 16X44
Constraints
+
+
+
+
X12
X22
X32
X42
+
+
+
+
X13
X23
X33
X43
+
+
+
+
X14
X24
X34
X44
=
=
=
=
1
1
1
1
R1
R2
R3
R4
in
in
in
in
space
space
space
space
2
1
4
3
Minimum cost
Cost = 11 + 13 + 14 + 11 = $49,000
Lecture 10 Summary
On completion of this part, you should:
Understand
the
different
types
of
optimization problems and their formulation
Be able to formulate and solve a variety of
optimization problems in LINGO
Other Business
Homework