Escolar Documentos
Profissional Documentos
Cultura Documentos
Selected aspects of
Operations Research
1 Operations Research
! Operations research (OR) is the development and use of quantitative models and methods for
decision making in companies and organizations. [Suhl/Mellouli (2009), p. 1.]
! Characteristics
• Preparing the decision making process to aim for optimal decisions -> mathematical
modelling
• Use of mathematical methods
1 Operations Research
1 Operations Research
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
2 Decision Making
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
2 Decision Making
• The Decision Theory systematically deals with such action choices or decisions
Decision Theory
2 Decision Making
Decision Model
(or Decision Matrix for small
and discrete problems)
2 Decision Making
! Key Figures
• Definition of all relevant figures (e.g. profit, revenue, cost, ... )
! Preferences
" Value preference
° benefit of a figure based on the value (maximize, minimize, approximate)
" Type preference
° benefit of a figure based on the type
" Risk preference
° benefit of a figure because of the likelihood of the results in diverse possible
situations
" Time preference
° benefit of a target figure because of the temporal occurrence of the results in a
multi-periodic observation period
! Alternatives
amount of all possible alternatives
" principle of completeness and exclusiveness
" finite and endless set of actions
" discrete and continuous set of actions
! Expected Situations
• amount of all possible situations with an impact on the alternatives results
2 Decision Making
• Combination of all parts of the Decision Environment and the objective plan as a mathematic
model.
• This model is to be solved with adequate algorithm.
• The result matrix is successively subordinated to the preferences of the decision maker.
• The decision maker chooses the alternative with the highest benefit.
2 Decision Making
! An optimization model is a mathematical representation of a real decision problem and consists of
• objective function(s)
• decision variables preferences
• constraints
objective function
maximize (or minimize) z = F (x ) (key figures)
$≥(
subject to & & constraints
gi (x )%=)0 , i = 1(1) I (definition of the
&≤& alternatives)
' *
x ∈ R +0
x € variables x ; j=1(1)J
vector of the decision j
F (x ) objective function
x ∈ R +0 non-negative constraint
2 Decision Making
! A company plans to produce two types of products (P1 and P2).
• The company wants to maximize the profit contribution and has to determine the optimal
production mix.
Objective function
key figure: profit contribution
Value preference: max!
pc = 10 ⋅ x1 +20 ⋅ x2 → max! Type preference, Risk preference, Time preference : n/a
s.t.
x1 +x2 ≤ 100 machine
6 ⋅ x1 +9 ⋅ x2 ≤ 720 material Constraints
finite and continuous set
x2 ≤ 60 upper bound of actions
x1, x2 ≥0 non-negative restriction
2 Decision Making
3 Optimization Software
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
3 Optimization Software
• Software intended to solve • Software that can be used • Software that can be used
a particular decision for a class of decision for a wide range of decision
problem. problems. problems.
• This kind of software works • e.g.
like a template that is to be • Spread sheet software
customized by the decision combined with solvers
maker. • Mathematical
Programming Languages
• Algebraic Systems
• APIs of commercial or
Open Source solvers
3 Optimization Software
Optimization
System
Data Specialization
component
Modelling
Specialization
component
Solver Specialization
Analysis
Specialization
component
adaptability
OR knowledge
needed
! CMPL executes the COIN-OR OSSolverService, GLPK, Gurobi, SCIP and CPLEX directly to solve
the generated model instance. Since it is also possible to transform the mathematical problem into
MPS, Free-MPS or OSiL files, alternative solvers can be used.
! CMPL is an open source project licensed under GPLv3. It is written in C++ and is available for most
of the relevant operating systems (Windows, OS X and Linux).
! CMPL is a COIN-OR project initiated by the Technical University of Applied Sciences Wildau and
the Institute for Operations Research and Business Management at the Martin Luther University
Halle-Wittenberg.
! Working steps:
pc = 10 ⋅ x1 +20 ⋅ x2 → max!
s.t.
x1 +x2 ≤ 100
6 ⋅ x1 +9 ⋅ x2 ≤ 720
x2 ≤ 60
x1, x2 ≥0
parameters:
products := 1(1)2;
restrictions := 1(1)3;
variables:
x[products] : real[0..];
objectives:
c[]T * x[] ->max;
constraints:
a[,] * x[] <=b[];
---------------------------------------------------------------------------------------------------------!
Problem first-example.cmpl!
Nr. of variables 2!
Nr. of constraints 2!
Objective name line_1!
Solver name COIN-OR clp!
Display variables (all)!
Display constraints (all)!
---------------------------------------------------------------------------------------------------------!
!
Objective status optimal!
Objective value 1500 (max!)!
!
Variables !
Name Type Activity Lower bound Upper bound Marginal!
---------------------------------------------------------------------------------------------------------!
x[1] C 30 0 Infinity 0!
x[2] C 60 0 60 5!
---------------------------------------------------------------------------------------------------------!
!
Constraints !
Name Type Activity Lower bound Upper bound Marginal!
---------------------------------------------------------------------------------------------------------!
line_2 L 90 -Infinity 100 -!
line_3 L 720 -Infinity 720 1.66667!
---------------------------------------------------------------------------------------------------------!
5 Transportation problems
! A Transportation problem is a special kind of linear programming problem which seeks to minimize
the total shipping costs of transporting goods from several supply locations (origins or sources ) to
several demand locations (destinations).
! Assumptions and definitions:
• The goods available at each supply location are limited – supply si ; i=1(1)m.
• The demand at each demand location is known – demand dj ; j=1(1)n
m n
∑∑ c ij ⋅ xij → min!
i=1 j=1
s.t.
n
∑x ij = si ; i = 1(1) m
j=1
m
∑x ij = dj ; j = 1(1) n
i=1
TUAS Wildau / Prof. Dr. M. Steglich [cf. Anderson/Sweeney/Williams/Martin (2008), p. 261ff; Hillier/Liebermann (2010), p. 305ff.] 20
Selected aspects of Operations Research
5 Transportation problems
! Transportation problems faced by Foster Generators.
• This problem involves the transportation of a product from three plants to four distribution
centers.
• Foster Generators operates plants in Cleveland, Ohio; Bedford, Indiana; and York,
Pennsylvania. The supplies are defined by the production capacities over the next three-month
planning period for one particular type of generator.
• The firm distributes its generators through four regional distribution centers located in
Boston, Chicago, St. Louis, and Lexington.
• The management has to decide how much of its products should be shipped form each plant
to each distribution center. The objective is to minimize the transportation costs.
5 Transportation problems
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
5 Transportation problems
Plants% Centers%
m n
3%
s.t. 1%%
n 5000% Cleveland% 2%
∑x ij = si ; i = 1(1) m
6% 7%
j=1 2%%
m Chicago% 4000%
∑x ij = dj ; j = 1(1) n 7% 5%
i=1
2%%
6000% Bedford% 2%
xij ≥ 0 ; i = 1(1) m, j = 1(1) n 3%
3%
St.%Louis% 2000%
2% 5%
x ij − number of units shipped from plant i to center j 3%%
2500% 4%
cij − cost per unit of shipping from plant i to center j York%
5%
si − supply in units at plant i
d j− demand in units at desitination j 4%%
1500%
Lexington%
m n
s.t.
n
∑x ij = si ; i = 1(1) m
j=1
parameters: m
variables:
x[plants,centers]: real[0..];
objectives:
costs: sum{i in plants, j in centers : c[i,j] * x[i,j] } ->min;
constraints:
supplies {i in plants : sum{j in centers: x[i,j]} = s[i];}
demands {j in centers : sum{i in plants : x[i,j]} = d[j];}
5 Transportation problems
Plants% Centers%
> cmpl transportation.cmpl
---------------------------------------------------------------------------------------------------------
1%%
6000%
Problem /Users/mike/transport.cmpl
Nr. of variables 12
Nr. of constraints 7 Boston%
Status optimal
3500%
Solver name COIN-OR clp
Objective name costs
Objective value 39500 (min!)
---------------------------------------------------------------------------------------------------------
1%%
5000% Cleveland%
1500%
Variables
Name Type Activity Lower bound Upper bound Marginal
---------------------------------------------------------------------------------------------------------
x[1,1] C 3500 0 Infinity 0
x[1,2] C 1500 0 Infinity 0
2%%
x[1,3]
x[1,4]
C
C
0
0
0
0
Infinity
Infinity
8
6 Chicago% 4000%
x[2,1] C 0 0 Infinity 1
x[2,2] C 2500 0 Infinity 0
2500%
x[2,3] C 2000 0 Infinity 0
x[2,4] C 1500 0 Infinity 0
x[3,1] C 2500 0 Infinity 0 2%%
x[3,2]
x[3,3]
C
C
0
0
0
0
Infinity
Infinity
4
6
6000% Bedford%
x[3,4] C 0 0 Infinity 6
---------------------------------------------------------------------------------------------------------
2000%
Constraints
3%
Name Type Activity Lower bound Upper bound Marginal
St.%Louis% 2000%
2500%
---------------------------------------------------------------------------------------------------------
supplies_1
supplies_2
E
E
5000
6000
5000
6000
5000
6000
1
4 1500%
supplies_3 E 2500 2500 2500 -
demands_1 E 6000 6000 6000 2
3%%
2500%
demands_2 E 4000 4000 4000 1
demands_3 E 2000 2000 2000 -2 York%
demands_4 E 1500 1500 1500 -1
---------------------------------------------------------------------------------------------------------
4%%
Lexington%
1500%
5 Transportation problems
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
• The total demand and the total supply are not equal. ∑s ≠ ∑d i j
i=1 j=1
" Change the supply and demand constraints from = constraints to ≤ constraints.
m n n
m n m
5 Transportation problems
Plants% Centers%
1%%
Boston% 6000%
3%
1%% ∑ cij ⋅ xij → min!
5000% Cleveland% 2% (i, j )∈routes
6% s.t.
2%%
Chicago% 4000%
∑ xkj ≤ si ; i = 1(1) m
5% (k, j )∈routes
k=i
2%%
6000% Bedford% 2%
3% ∑ xil = d j ; j = 1(1) n
(i,l )∈routes
3% l= j
St.%Louis% 2000%
2% xij ≥ 0 ; (i, j ) ∈ routes
3%%
5000% York% 4%
4%%
Lexington%
1500%
1''
Boston' 6000'
5 Transportation problems 3'
1''
5000' Cleveland' 2'
6'
2''
Chicago' 4000'
parameters:
5'
routes := set( [1,1],[1,2],[1,4], 2''
6000' Bedford' 2'
[2,2],[2,3],[2,4],
3'
[3,1],[3,3] ); 3'
St.'Louis' 2000'
2'
plants := 1(1)3;
3''
centers := 1(1)4; 5000' York' 4'
s[plants] := (5000,6000,5000);
4''
1500'
d[centers] := (6000,4000,2000,1500); Lexington'
c[routes] := ( 3, 2, 6, 5, 2, 3, 2, 4 );
variables:
x[routes]: real[0..];
objectives:
costs: sum{ [i,j] in routes : c[i,j]*x[i,j] } ->min;
constraints:
supplies {i in plants : sum{j in (routes *> [i,*]): x[i,j]}<= s[i];}
demands {j in centers: sum{i in (routes *> [*,j]): x[i,j]}= d[j];}
5 Transportation problems
yes
problem analysis
Fits the
solution no
to the real
model building problem
pure mathematical
solution analysis
decision model
prognosis and
solution
data allocation
solve model by
decision model
using software
5 Transportation problems
! It is demanded for technological reasons that the supply from Cleveland (i=1) to Boston (j=1) is
either zero, or exactly corresponds to the supply from Cleveland to Chicago (j=2).
! Product of variables
• A product of variables cannot be a part of an LP or MIP model, because such a variable
product is a non-linear term. But if one factor of the product is an integer variable then it is
possible to formulate an equivalent transformation using a set of specific linear inequations.
[cf. Rogge/Steglich (2007)]
5 Transportation problems
! Lemma 1: w := u⋅ v, u ≤ u ≤ u (u real or integer), v ∈ {0,1} x11 = x12 ⋅ y ; y ∈ {0,1}, 0 ≤ x12 ≤ 6000
is equivalent to is equivalent to
u real or integer, v ∈ {0,1} x12 real, y ∈ {0,1}
and and
(a) u⋅ v ≤ w ≤ u⋅v (a) x11 ≤ 6000 ⋅ y
(b) u ⋅ (1− v) ≤ u − w ≤ u ⋅ (1− v). (b) x12 − x11 ≤ 6000 ⋅ (1− y)
! Proof: w : =u ⋅ v is equivalent to
#% 0, u ≤ u ≤ u, für v=0
w= $
&% u, u ≤ u ≤ u, für v=1.
5 Transportation problems
parameters:
routes := set( [1,1],[1,2],[1,4],
[2,2],[2,3],[2,4],
[3,1],[3,3] );
plants := 1(1)3;
centers := 1(1)4;
s[plants] := (5000,6000,5000);
d[centers] := (6000,4000,2000,1500);
c[routes] := ( 3, 2, 6, 5, 2, 3, 2, 4 );
variables:
{i in plants, j in centers:
x[i,j] :real[0..s[i]];}
y:binary;
objectives:
costs: sum{ [i,j] in routes : c[i,j]*x[i,j] } ->min;
constraints:
supplies {i in plants : sum{j in (routes *> [i,*]): x[i,j]}<= s[i];}
demands {j in centers: sum{i in (routes *> [*,j]): x[i,j]}= d[j];}
x[1,1]=x[1,2]*y;
Literature
Anderson/Sweeney/Williams/Martin: An Introduction to Management Science - Quantitative Approaches
to Decision Making, 13th ed., South-Western, Cengage Learning 2008.
Domschke, W./Drexl, A.: Einführung in Operations Research, 8. Aufl., Berlin u.a. 2011.
Hillier F. S./Lieberman, G. J.: Introduction to Operations Research, 9th ed., McGraw-Hill Higher
Education 2010.
Winston, W.L.: Operations Research - Applications and Algorithms, 4th ed., Thomson Press, 2003.