1
Chapter 3 Optimization
Paisan Nakmahachalasint [email protected] http://pioneer.chula.ac.th/~npaisan
Optimization Problems
zThe basic optimization model is
Optimize fj(X) for jin J subject to
gi(X) bifor all iin I.
zWe seek the vector X0giving the optimal value for the set of function fj(X).
⎧ ⎫⎪ ⎪≥
⎪ ⎪⎪ ⎪
⎪ ⎪=
⎨ ⎬⎪ ⎪
⎪ ⎪≤
⎪ ⎪⎪ ⎪
⎩ ⎭
Optimization Problems
z
The vector X are called the decision variables of the model.
z
The function f
j(X) are called the objective functions.
z
The conditions that the decision variables must satisfy are called constraints.
Optimization Problems
zThere are various ways of classifying
optimization problems. These classification are not meant to be mutually exclusive but to describe mathematical characteristics possessed by the problem.
zAn optimization is said to be unconstrainedif there are no constraints and constrainedif one or more conditions are present.
Linear Programming
zAn optimization problem is said to be a linear programif it satisfied the following properties:
zThere is a unique objective function.
zWhenever a decision variable appears in either the objective function or one of the constraint functions, it must appear only as a power term with an exponent of 1, possibly multiplied by a constant.
Linear Programming
zNo term in the objective function or in any of the constraints can contain products of the decision variables.
zThe coefficients of the decision variables in the objective function and each constraint are constant.
zThe decision variables are permitted to assume fractional as well as integer values.
2 Variants of Problems
z
Problems that are probabilistic in nature are called stochastic programs.
z
If all decision variable are restricted to integer values, the problem is called an integer program. If the integer
restriction applies to only a subset of the decision variables, then it is called a mixed-integer program.
Example
Determining a Production Schedule
A carpenter makes tables and bookcases.
He wishes to determine a weekly production schedule that maximizes his profits. It costs $5 and $7 to produce tables and bookcases, respectively.
Example
z
Consider a variation where the carpenter realizes the following information
Each week he has up to 690 board-feet of lumber and up to 120 hours of labor.
4 30
$30 Bookcase
5 20
$25 Table
Labor (hours) Lumber
(board-feet) Unit Profit
Example
zLet x1and x2denote the number of tables and bookcases produced per week. The formulation yields
Maximize 25x1+ 30x2 subject to
(nonnegativity)
≥ 0 x1, x2
(labor) 120
≤ 5x1+ 4x2
(lumber)
≤ 690 20x1+ 30x2
A Graphical Method
zAn optimal solution to a linear program with a nonempty and bounded feasible region can be found with the following procedures.
zFind all intersection points of the constraints.
zDetermine which intersection points, if any, are feasible to obtain the extreme points.
zEvaluate the objective function at each extreme point.
zChoose the extreme point(s) with the largest (or smallest) value for the objective function.
A Graphical Method
(0, 30)
x1
x2
(0, 0)
A B(24, 0) (34.5, 0)
(12,15) C (0, 23) D
x1
y1
x2y2
≥ 0 x1, x2, y1, y2
120
= 5x1+ 4x2 + y2
690
= 20x1+ 30x2 + y1
-52.5 0 0 34.5 (34.5,0)
0 -210 30 0 (0,30)
28 0 23 0 D(0,23)
0 0 15 12 C(12,15)
0 250 0 24 B(24,0)
120 690 0 0 A(0,0)
y2 y1 x2 x1
x1, x2= decision variables y1, y2= slack variables
3 Complexity
Intersection Point Enumeration
Suppose we have a linear program with m nonnegative decision variables and n constraints of the form ≤. We add nslack variables, yi, to the constraints to get a total of m+ nnonnegative variables. Each intersection point can be determined by choosing mof the variables and set them to 0.
There are possible choices to consider.( )!
! !
m n
m n +
The Simplex Method
zSo far we find an optimal point by searching among feasible intersection points.
zThe search can be improved by starting with an initial feasible point and moving to a
“better” solution until an optimal one is found.
zThe simplex method incorporates both optimalityand feasibilitytests to find the optimal solution(s) if one exists.
The Simplex Method
zAn optimality testshows whether an
intersection point corresponds to a value of the objective function better than the best value found so far.
zA feasibility testdetermines whether the proposed intersection point is feasible.
zThe decision and slack variables are separated into two nonoverlapping sets, which we call the independentand dependentsets.
The Simplex Method
zWrite the carpenter’s problem as
zBegin with an initial extreme point x1=x2= 0.
We determine that y1= 690, y2= 120, z= 0.
Then x1and x2are independent variables where y1, y2, and zare dependent variables.
0
= –25x1– 30x2+ z
120
= 5x1+ 4x2 + y2
690
= 20x1+ 30x2 + y1
The Simplex Method
zIf either x1and x2is increased, zwill increase.
zWe choose to increase x2to the maximum possible value as not to violate the constraints.
At this stage, x2is called the enteringvariable.
zThe first equation implies that
zThe second equation implies that We increase x2to 23, then y1= 0.
At this stage, y1is called the exitingvariable.
2
690 23.
x ≤ 30 =
2
120 30.
x ≤ 4 =
The Simplex Method
zx1and y1become the independent variables, x2and y2become the dependent variables.
zAll equations must be adjusted to reflect the changes in the independent and dependent variables.
2 1
3 1 2 30 1
7 2
3 1 15 1 2
1 1
23 28
5 690
x x y
x y y
x y z
+ + =
− − + =
− + + =
4 The Simplex Method
zWe merely need to know the coefficients of the variables with the right-hand side. It is more convenient to record the numbers in a table format, or a tableau.
0 120 690 RHS
1 0 0 z
0 0 – 30 – 25
120/4 = 30 1
0 4 5
690/30 = 23 0
1 30 20
y2 y1 x2 x1
The Simplex Method
690 28 23 RHS
1 0 0 z
0 1 0 – 5
28/(7/3) = 12 1
– 2/15 0 7/3
23/(2/3) = 34.5 0
1/30 1 2/3
y2 y1 x2 x1
750 12 15 RHS
1 0 0 z
z 15/7
5/7 0 0
x1 3/7
– 2/35 0 1
x2 – 2/7
1/14 1 0
y2 y1 x2 x1