Linprog - Compatibility Mode
Linprog - Compatibility Mode
Slide 1
Course Outcome:
Identify different types of optimization problems
Understanding of different optimization techniques
Ability to solve various multivariable optimization problems
Ability to solve optimization using Excel Solver and MATLAB
.
Slide 2
1
1
Course Introduction:
Introduction:
This course is offered by Dept
Dept.. of Chemical Engineering
as a advanced elective-
elective-I.
SYLLABUS (CHT-
(CHT-305)
Chapter 1: Formulation of the objective function. Unconstrained single
variable optimization: Newton, Quasi-Newton methods, polynomial
approximation methods.
Chapter 2: Unconstrained multivariable optimization: Direct search method,
conjugate search method, steepest descent method, conjugate gradient
method, Newton’s method.
Chapter 3 : Linear Programming: Formulation of LP problem, graphical
solution of LP problem, simplex method, duality in Linear Programming, two-
phase method.
Chapter 4: Non linear programming with constraints: Necessary and
sufficiency conditions for a local extremum, Quadratic programming,
successive quadratic programming, Generalized reduced gradient (GRG)
method.
Chapter 4: Use of MS-Excel and MATLAB for solving optimization problems.
Introduction to 4global optimization techniques. Applications of optimization
7 in
Chemical Engineering. Slide 4
2
2
Optimization of Chemical Process
Slide 5
Important Note
1. Homework Assignments: Homework assignments are bonus
points. It will only benefit you if you spend the necessary time to
understand the basics and solve the problems yourself. Keep up
with the homework assignments, as the topics in this course build
upon each other.
3
3
Important Note
4. Attendance Policy
The Attendance Policy applies to this course. The
students will not allow for the Google classroom ten
(10) minutes after the class start time.
Slide 7
LINEAR PROGRAMMING:
THE GRAPHICAL METHOD
Slide 8
4
4
Linear Programming (LP) Problem
Slide 9
Slide 10
5
5
Steps in Developing a
Linear Programming (LP) Model
1) Formulation
2) Solution
Slide 11
Slide 12
6
6
Properties of LP Models
1) Seek to minimize or maximize
2) Include “constraints” or limitations
3) There must be alternatives available
4) All equations are linear
Slide 13
7
7
Example LP Model Formulation:
The Product Mix Problem
Decision: How much to make of > 2
products?
Slide 15
Slide 16
8
8
Pine Furniture Data
Tables Chairs
(per table)
table) (per chair)
chair)
Profit Hours
$7 $5
Contribution Available
Carpentry 3 hrs 4 hrs 2400
Painting 2 hrs 1 hr 1000
Other Limitations:
• Make no more than 450 chairs
• Make at least 100 tables
Slide 17
Constraints:
Slide 18
9
9
More Constraints:
Make no more than 450 chairs
C < 450 (num. chairs)
Make at least 100 tables
T > 100 (num. tables)
Nonnegativity::
Nonnegativity
Cannot make a negative number of chairs or tables
T>0
C>0
Slide 19
Model Summary
Max 7T + 5C (profit)
Subject to the constraints:
Slide 20
10
10
Formulation of Problem-
Problem-2
Slide 21
Formulation of Problem-
Problem-3
11
11
X2
X3
X1
Slide 23
Slide 24
12
12
Classification of Optimization Problems
Slide 25
Slide 26
13
13
Classification of Optimization Problems
Slide 27
Slide 28
14
14
Classification of Optimization Problems
Slide 29
Problem 4
Slide 30
15
15
We are interested to produce P in the reaction A
P using continuous reactor at 240 liters/hr with CAo = 3
moles/liter. However, it is noticed that there is a second
reaction P R that can also occur. This undesired
reaction produced undesired product R. It is found that
both reactions are irreversible and first order with k1 =
0.45 min-1, and k2 = 0.1 min-1. Derive the objective
function for finding maximum yield of P.
Slide 31
Graphical Solution
Graphing an LP model helps provide
insight into LP models and their solutions
solutions..
Slide 32
16
16
C
Carpentry
Constraint Line
3T + 4C = 2400 Infeasible
600
> 2400 hrs
Intercepts
(T = 0, C = 600) Feasible
(T = 800, C = 0) < 2400 hrs
0
0 800 T
Slide 33
C
1000
Painting
Constraint Line
2T + 1C = 1000
600
Intercepts
(T = 0, C = 1000)
(T = 500, C = 0) 0
0 500 800 T
Slide 34
17
17
C
1000
Max Chair Line
C = 450
600
Min Table Line
450
T = 100
Feasible
Region
0
0 100 500 800 T
Slide 35
C
Objective
Function Line
500
7T + 5C = Profit
Optimal Point
400 (T = 320, C = 360)
300
200
100
18
18
C
Additional Constraint New optimal point
500 T = 300, C = 375
Need at least 75
more chairs than
tables 400 T = 320
C > T + 75 C = 360
No longer
300
Or feasible
C – T > 75
200
100
LP Characteristics
Feasible Region:
Region: The set of points that satisfies
all constraints
Corner Point Property:
Property: An optimal solution
must lie at one or more corner points
Optimal Solution:
Solution: The corner point with the
best objective function value is optimal
Slide 38
19
19
Special Situation in LP
1. Redundant Constraints - do not affect the
feasible region
Example: x < 10
x < 12
The second constraint is redundant because
it is less restrictive.
Slide 39
Special Situation in LP
2. Infeasibility – when no feasible solution
exists (there is no feasible region)
Example: x < 10
x > 15
Slide 40
20
20
Special Situation in LP
3. Alternate Optimal Solutions – when there is
more than one optimal solution
C
Max 2T + 2C 10
Subject to: All points on
T + C < 10 Red segment
6
T < 5 are optimal
C< 6
T, C > 0
0
0 5 10 T
Slide 41
Special Situation in LP
C
Max 2T + 2C
Subject to: 2
2T + 3C > 6
T, C > 0 1
0
0 1 2 3 T
Slide 42
21
21
Building Linear Programming Models
22
22
Building Linear Programming Models
LP Solutions
The maximization or minimization of some quantity
is the objective in all linear programming problems.
A feasible solution satisfies all the problem's
constraints.
Changes to the objective function coefficients do not
affect the feasibility of the problem.
An optimal solution is a feasible solution that results
in the largest possible objective function value, z,
when maximizing or smallest z when minimizing.
In the graphical method, if the objective function line
is parallel to a boundary constraint in the direction of
optimization, there are alternate optimal solutions
solutions,,
with all points on this line segment being optimal.
Slide 46
23
23
LP Solutions
A graphical solution method can be used to solve a
linear program with two variables.
If a linear program possesses an optimal solution,
then an extreme point will be optimal.
If a constraint can be removed without affecting the
shape of the feasible region, the constraint is said to
be redundant
redundant..
A nonbinding constraint is one in which there is
positive slack or surplus when evaluated at the
optimal solution.
A linear program which is overconstrained so that no
point satisfies all the constraints is said to be
infeasible..
infeasible
Slide 47
LP Solutions
A feasible region may be unbounded and yet there
may be optimal solutions. This is common in
minimization problems and is possible in
maximization problems.
The feasible region for a two-
two-variable linear
programming problem can be nonexistent, a single
point, a line, a polygon, or an unbounded area.
Any linear program falls in one of three categories:
• is infeasible
• has a unique optimal solution or alternate optimal
solutions
• has an objective function that can be increased
without bound
Slide 48
24
24
Example: Graphical Solution
Solve graphically for the optimal solution:
Min z = 55x
x1 + 22xx2
x1, x2 > 0
Slide 49
Slide 50
25
25
Example: Graphical Solution
Constraints Graphed
x2 Feasible Region
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x
5x2 > 10
2
1
x1
1 2 3 4 5 6
Slide 51
Slide 52
26
26
Example: Graphical Solution
x2 Min z = 5
5xx1 + 2x
2x2
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x
5x2 > 10
2
1
x1
1 2 3 4 5 6
Slide 53
27
27
Example: Graphical Solution
x2 Min z = 5
5xx1 + 2x
2x2
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x
5x2 > 10
2
1
Optimal: x1 = 16/5
x2 = 4/5
x1
1 2 3 4 5 6
Slide 55
Sensitivity Analysis
Slide 56
28
28
Range of Optimality
s.t. x1 < 6
2x1 + 33xx2 < 19
x1 + x2 < 8
x1, x2 > 0
Slide 58
29
29
Example: Sensitivity Analysis
Graphical Solution
x2
8 x1 + x2 < 8
Max 5x1 + 7x2
7
6
x1 < 6
5
4
Optimal x1 = 5, x2 = 3
z = 46
3
2
2x1 + 3x
3x2 < 19
1
1 2 3 4 5 6 7 8 9 10 x1
Slide 59
Slide 60
30
30
Example: Sensitivity Analysis
Slide 61
Slide 62
31
31
Example: Sensitivity Analysis
Slide 63
s.t. 44x
x1 + 33xx2 < 12
2x1 + x2 > 8
x1, x2 > 0
Slide 64
32
32
Example: Infeasible Problem
8 2x1 + x2 > 8
3x2 < 12
4x1 + 3x
4
x1
3 4
Slide 65
Max z = 33x
x1 + 44xx2
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
Slide 66
33
33
Example: Unbounded Problem
x1 + x2 > 5
5
Max 3x
3x1 + 4x
4x2
x1
2.67 5
Slide 67
Slide 68
34
34
Slide 69
Slide 70
35
35
Slide 71
Slide 72
36
36
Slide 73
Slide 74
37
37
Slide 75
Slide 76
38
38
Slide 77
Slide 78
39
39
Slide 79
Slide 80
40
40
Slide 81
Slide 82
41
41
Slide 83
Slide 84
42
42
Slide 85
Slide 86
43
43
Slide 87
Slide 88
44
44
Slide 89
Slide 90
45
45
Slide 91
Slide 92
46
46
Slide 93
Slide 94
47
47
Slide 95
Slide 96
48
48
Slide 97
Slide 98
49
49
Slide 99
Slide 100
50
50
Slide 101
51
51