Operations Research 2013/2014

Itroduction
Linear programming applications
Operations Research
Dr Michal̇ Kulej
Room 509, building B4
michal.kulej@pwr.wroc.pl
Slides will be available at www.ioz.pwr.wroc.pl/Pracownicy
Form of the course completion: exam.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Literature
1
H. A. Taha. Operations Research. An Introduction. Pearson
Prentice Hall, New Jersey 2007.
2
F. S. Hillier, G.J. Liberman: Introduction to Operations Research.
Mc Graw Hill, 2001.
3
W. L. Winston. Operations Research: Applications and Algorithms, PWS-KENT Publishing Company, Boston, 1987.
4
M. Kulej. Operations Research. PRINTPAP, Lodz 2012.
5
H.P. Williams. Model Building in Mathematical Programming. Wiley, New York,1990.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Operations Research
Operations Research is a discipline that deals with the application of advanced analytical methods to help make better decisions. As a formal discipline, operations research originated in
the efforts of military planners during World War II.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Operations research methodology
Real world
Problem description
Model construction
Describe a problem.
What are the objectives?
Which constraints must be satisfied?
Build a mathematical model
for the problem. Identify decision
variables, parameters, objective function
and constraints.
Model solution
Apply some algorithm (solver) to
solve the model
Analysis of the results
Provide an interpretation of the
solution. Perform a sensitivity
analysis of the solution
Implementation
Michaş Kulej
Apply the solution in practice
Operations Research 2013/2014
Itroduction
Linear programming applications
Example [Taha 2007] -problem description
Reddy Mikks company produces both interior and exterior paints from
two raw materials M1 and M2. The following table provides the basic
data of the problem:
Raw material M1
Raw material M2
Profit per tone ($1000)
Tons of raw mat. per ton of
Ext. paint
Int. paint
6
4
1
2
5
4
Max. daily
availability (tons)
24
6
A market survey indicates that the daily demand for interior paint cannot exceed that for exterior paint by more than 1 ton. Also, the maximum daily demand for interior paints is 2 tons. Reddy Mikks wants
to determine the best product mix of interior and exterior paints that
maximizes the total daily profit.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Example - model building
1
Decision variables:
x1 - Tons produced daily of exterior paint
x2 - Tons produced daily of interior paint
2
Variable types:
x1 ≥ 0 [Nonnegative reals]
x2 ≥ 0 [Nonnegative reals]
3
Objective function:
Maximize z = 5x1 + 4x2 [The total profit]
4
Constraints
6x1 + 4x2 ≤ 24 [Raw material M1]
x1 + 2x2 ≤ 6 [Raw material M2]
x2 − x1 ≤ 1
[Market limit]
x2 ≤ 2
[Demand limit]
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Model solution
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Model solution
Reddy Mikks should produce 3 tons of interior paints and 1.5 tons of
exterior paints, which gives a maximum total profit of $21 000. This is
the only optimal solution.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Model solution (MathProg)
var x1 >=0;
var x2 >=0;
maximize profit: 5*x1+4*x2;
M1: 6*x1+4*x2<=24;
M2: x1+2*x2<=6;
MarketLim: x2-x1<=1;
DemLim: x2<=2;
solve
solve;
display x1,x2;
end
end;
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Linear programming problem
In a linear programming problem:
1
the objective function is linear;
2
all the constraints have the form of linear inequalities or equalities;
3
all decision variables can take real (rational) values.
Many practical problems can be formulated as linear programming problems. Furthermore, there exist efficient methods of
solving such problems.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Linear programming problem
max (min) z =
c1 x1 + c2 x2 + · · · + cn xn
a11 x1 + a12 x2 + · · · + a1n xn ≥ (≤, =)b1
a21 x1 + a22 x2 + · · · + a2n xn ≥ (≤, =)b2
...
am1 x1 + am2 x2 + · · · + amn xn ≥ (≤, =)b2
xi ≥ 0, i ∈ I
[Obj. function]
[Constraint 1]
[Constraint 2]
...
[Constraint m]
[Non. constr.]
x1 , . . . , xn are decision variables.
All ci , bj and aij are parameters (input data, constants).
I ⊆ {1, . . . , n} denotes a subset of variables which must take
nonnegative values.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Linear programming problem
A solution (x1 , . . . , xn ) which satisfies all the constraints is called
a feasible solution. A feasible solution (x1∗ , . . . , xn∗ ) for which the
value of the objective function is maximal (minimal) is called an
optimal solution.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Diet problem
There are four different foods: bread, milk, cheese, and yogurt. The cost and
nutrition values per unit of each food are displayed in the following table:
Cost per unit
Sugar, g.
Fat, g.
Proteins, g.
Calories
Bread
1.0
0.5
0
4.0
90
Milk
2.5
1
5.0
11.7
120
Cheese
3.0
0.2
9.0
10.0
106
Yogurt
4.0
4
7.0
17.0
110
The objective is to find a minimum-cost diet that contains at least 300 calories,
10 grams of sugar, 6 grams of fat, and 30 grams of proteins.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Diet problem
1
Decision variables:
x1 , . . . , x4 - number of units of bread, milk, cheese, and yogurt
2
Objective function:
min z = Total cost= x1 + 2.5x2 + 3x3 + 4x4
3
Constraints:
90x1 + 120x2 + 106x3 + 110x4 ≥ 300 [Calories]
0.5x1 + x2 + 0.2x3 + 4x4 ≥ 10
[Sugar]
5x2 + 9x3 + 7x4 ≥ 6
[Fat]
4x1 + 11.7x2 + 10x3 + 17x4 ≥ 30
[Proteins]
4
All variables are nonnegative:
x1 , x2 , x3 , x4 ≥ 0
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Modeling production process
Corporation Rylon produces four types of perfumes: Brute, Super Brute, Chanelle and Super Chanelle. From 1 unit of raw material 3 units of Brute and 4
units of Chanelle are produced in 1 hour. Next, 1 unit of Brute can be transformed into 1 unit of Super Brute in 3 hours and 1 unit of Chanelle can be
transformed into 1 unit of Super Chanelle in 2 hours. The corporation can
buy up to 4000 units of the raw material and use up to 6000 hours for the
production process. Establish an optimal production plan.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Modeling production process
1
Decision variables:
x1 , . . . , x4 - number of units of Brute, Super Brute, Chanelle and
Super Chanelle
y - number of units of the raw material used.
2
Objective function
max z = Total profit= 7x1 + 14x2 + 6x3 + 10x4 − 3y
3
Constraints:
x1 + x2 ≤ 3y
x3 + x4 ≤ 4y
y ≤ 4000
y + 3x2 + 2x4 ≤ 6000
4
[Brute and Super Brute]
[Chanelle and Super Chanelle]
[Limit of raw material]
[Limit of working hours]
All variables are nonnegative:
x1 , x2 , x3 , x4 , y ≥ 0
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Multiperiod production-inventory model
A factory must produce a certain product over the next four quarters. The
maximum production level in each quarter equals 60 units. The factory wants
to minimize total costs and has to meet all demands on time. The appropriate
data are given in the following table:
Demand (units)
Production cost ($/unit)
Storage cost ($/unit)
Michaş Kulej
I
30
55
2
II
60
50
2
III
70
50
3
IV
25
55
-
Operations Research 2013/2014
Itroduction
Linear programming applications
Multiperiod production-inventory model
1
Decision variables:
x1 , x2 , x3 , x4 - number of units produced during quarters 1. . .4;
m1 , m2 , m3 - number of units of the product in store at the end of
quarters 1,2,3.
2
Objective function
min z = Total cost = 55x1 + 50x2 + 50x3 + 55x4 + 2m1 + 2m2 + 3m3
3
Constraints
x1 = 30 + m1
m1 + x2 = 60 + m2
m2 + x3 = 70 + m3
m3 + x4 = 25
xi ≤ 60 for i = 1, . . . , 4
4
[Balance at quarter 1]
[Balance at quarter 2]
[Balance at quarter 3]
[Balance at quarter 4]
[Max. production level]
All variables are nonnegative:
x1 , x2 , x3 , x4 , m1 , m2 , m3 ≥ 0
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Multiperiod financial model
Finco Invest. Corp. must determine an optimal investment strategy for the
next three years. At present, $100000 is available for investment. Investments
A,B,C,D and E are available. The cash flow associated with investing $1 in
each investment is given in the table below.
0
1
2
3
A
-1$
+0.5$
+1$
-
B
-
-1$
+0.5$
1$
C
-1$
+1.2$
-
-
D
-1$
-
-
+1.9$
E
-
-
-1$
+1.5$
To ensure that the portfolio is diversified, Finco requires that at most $75000
be placed in any single investment. In addition, Finco can earn interest at 8%
per year by keeping uninvested cash in a bank. Returns from investments may
be immediately reinvested.
Michaş Kulej
Operations Research 2013/2014
Itroduction
Linear programming applications
Multiperiod financial model
1
Decision variables:
xA , xB , xC , xD , xE - dollars invested in investment A,B,C,D, and E respectively;
y0 , y1 , y2 - dollars invested in the bank at time 0, 1 and 2.
2
Objective function
max z = Cash at time 3 = xB + 1.9xD + 1.5xE + 1.08y2
3
Constraints
xA + xC + xD + y0 = 100000
[Balance at time 0]
0.5xA + 1.2xC + 1.08y0 − xB − y1 = 0 [Balance at time 1]
xA + 0.5xB + 1.08y1 − xE − y2 = 0
[Balance at time 2]
xA , xB , xC , xD , xE ≤ 75000
[Limits on dollars inv.]
4
All variables are nonnegative:
xA , xB , xC , xD , xE , y0 , y1 , y2 ≥ 0
Michaş Kulej
Operations Research 2013/2014