Presentazione di PowerPoint

Download Report

Transcript Presentazione di PowerPoint

Corso MAE
Metodi Quantitativi per il Management
Quantitative methods for Management
Prof. Gianni Di Pillo
Prof. Laura Palagi
Dipartimento di Informatica e Sistemistica
Universita` di Roma “La Sapienza”
Roma, 18 settembre - 24 ottobre 2003
What is management Science ?
Use of quantitative analysis in supporting large companies to choose
the best decisions among many different possibilities
The key to every management science application is a mathematical
model: quantitative representation, or approximation, of a real
problem.
- growing complexity of systems
Why go through
mathematical
models:
- possibility of extract the essence of
problem in concise form
- growing availability of data
- cheap and abundant computer power
Decision Support Systems
Computer software designed for specific applications which may
include the possibility of solve a model
A decision support system includes:
- data bases easily accessible
- user friendly interface
- mathematical model
- automatic procedure for the solution of the model
Easy interaction with managers or decision makers who need
not to fully understand the mathematical aspects, but can
concentrate on results for their specific application.
The concept of a model
Many applications of science make use of models
The term ‘model’ is usually used for a structure which has
been built purposely to exhibit features and characteristics of
some real object.
Concrete:
model aircraft for wind tunnel experiments
Models
Pure descriptive
Abstract: using mathematical symbolism
Modelling process
The management scientist
Define the
problem
defines the organization
system including
objctives
Estimate the parameters
that
affect the problems
Relationships
in the real world
Formulate a mathematical model
Verify the model, use for prediction
Select a suitable alternative
Valuate the result
Implement
Feedback loops
Collecting data
(technological relationships,
physical laws, marketing constraints)
translated into a set of equations,
The management
scientist
verifies
inequalities,
logical
dependencies
whether the model is an accurate
Optimization
of oneof(orreality
more)
representation
objective function: maximizing
The
management
scientist
valuate
a profit,
minimizing
a cost
the
(possible
more)
alternatives
Use
of software
packages
obtained at the previous step
dummy
Mathematical models
Mathematical model: representation of a real problem in
terms of mathematical expressions.
It reveals not apparent relationships,
makes mathematical analysis possible
benefit
Simulation of scenarios (what happens if …)
Use of mathematical solution procedure
Lack of precision of data
drawback
Impossibility of quantifying some data
(social value)
Optimization models
Optimization models plays a fundamental role in mathematical
programming
mathematical
programming
Different from
computer programming
“planning”
Involve maximize something
Optimization model
or minimize something, choosing
among different alternatives
Optimization model: formal definition
Set of possible
alternatives
Feasible solutions x stays
in a set F
finite
infinite
One
optimization
criterion
min f ( x )
xF
f: F   objective function
or
max f ( x)
xF
An easy example
Definition of the
problem
Which is the shortest path to go from
place A to place B ?
Feasible solutions
F={x=all possible paths from A to B}
Objective function
Minimize the length f of the path
Production planning
An engineering factory produces two types of tools:
pliers and spanners.
Pliers cost to the production 1.5 € each
Spanners cost to the production 1 € each
Production costs
Pliers are sold at 6 € each
Spanners are sold at 5 € each
Selling price
How much should the factory produce
to maximize its profit ?
Objective function
A possible scenario
15000 pliers
Assume that we are constructing
15000 spanners
Let us define the data of the problem
unit profit = selling price – unit cost
4,5 = (6 – 1,5) unit profit for pliers
4 = (5 – 1) unit profit for spanners
Objective function = total profit PTOT
PTOT= number of pliers * unit profit for pliers +
number of spanners * unit profit for spanners
A possible scenario (2)
Formally:
variables
CH = number of spanners to be produced
PI = number of pliers to be produced
Equation of the overall profit
output of our model
15000
PTOT = 4  CH + 4,5  PI = 4 * 15000 + 4,5 * 15000 =
Unit profit
of spanners
Unit profit
of pliers
15000
127500
Is this the
best value ?
First use of Excel for data storing
We use an Excel table to summarize data and objective
B
2
3
4
5
6
7
8
9
Selling price
Cost
Profit
C
D
Tools
Spanners Pliers
5
6
1
1,5
4
4,5
Production
Total profit
15000
127500
PTOT = 4  CH + 4,5  PI
Profit equation
15000
PI = C8 = number of spanners
CH = D8 = number of pliers
4 = unit profit spanners = C4-C5
4,5= unit profit pliers = D4 – D5
C9 = C6 * C8 + D6 * D8
Excel formula
Constraints
Every point in the non negative quadrant is a possible feasible
solution (a possible production planning) F  {x : x  0}
Pliers
(thousands)
16
14
12
10
8
6
4
2
(127500)
(68000)
overall profit
(25000)
2 4 6 8 10 12 14 16 Spanners (thousands)
In principle: the more I produce the more I gain !
In practice: constraints exist that limit the production
A standard constraint: the budget one
Budget constraint: the overall cost must not greater than € 18000
1
2
3
4
5
6
7
8
9
10
11
12
13
D
PI = C8 = number of spanners
pliers
6
1,5
4,5
CH = D8 = number of pliers
unit price
unit cost
unit profit
C
Tools
spanners
5
1
4
production
4000
2000
profit
overall cost
Budget
difference
25000
7000
18000
11000
B
C11 = C5 * C8 + D5 * D8
CTOT= overall cost
CTOT = 1  CH +1,5  PI
Unit cost
spanner
Unit cost
pliers
Cost equation
CTOT = 1  CH + 1,5  PI  budget =18000
Budget
constraint
Geometric view of the constraint
Let draw the set F of the feasible solutions
In the plane (PI, CH), first draw the equation of the budget constraint
Feasible region
All non negative points “below” the line
PI
16
14
12
10
8
6
4
2
1  CH + 1,5  PI = 18
CTOT = 37500
> 18000: non ammissibile
CTOT = 20000
CTOT = 7000
2 4
6
 18000: ammissibile
8 10 12 14 16 18
CH
Geometric view of the problem
We need to find the “right” solution among the feasible ones
It satisfies the budget constraint
PI
16
14
12
10
8
6
4
2
“right”
It maximizes the profit
Points in the red area
satisfies the budget
constraint, which is the
better one ?
2 4
6
8 10 12 14 16 18
CH
Scenarios with Excel
Let us see with different scenarios
7
8 production
9 total profit
10
total cost
11
Budget
difference
spanners pliers
4000
2000
25000
7000
18000
11000
feasible
7
8 production
9 total profit
10
total cost
11
budget
difference
spanners pliers
15000
2000
69000
18000
18000
0
feasible
By chance ?
7
8 production
9 total profit
10
total cost
11
budget
12 difference
spanners pliers
15000
15000
127500
37500
18000
-19500
Not feasible
7
8 production
9 total profit
10
total cost
11
budget
difference
spanners pliers
2000
10000
53000
17000
18000
1000
feasible
Best among the three feasible. Is the
optimum ?
Limit of the “What If” approach
The scenarios are too many: infinite solutions !
It is not possible to look over all of them !!
We may wonder if may be better when the
number of solutions is finite
This is not always true, let see with an example
A first example: capital budgeting
Definition of the
problem
A management firm is considering 3
possible capital projects to invest in
during the coming year
Data
Investment (I) required for
each project
project 1
project 2
project 3
I
8
6
5
Earnings (E) for each project
project 1
project 2
project 3
Budget
15 millions
E
12
8
7
Capital budgeting: a possible scenario
Selected (YES = 1)
Each Project
Not selected (NO = 0)
 project1   yes   1 

 
  
 project2    no    0 
 project3   yes   1 

 
  
Is this the best ?
Investment required =
8 + 0 + 5 = 13
Earning obtained =
12 + 0 + 7 = 19
Capital budgeting: constructing the model
Definition of the
possible alternatives
Feasible solutions
Selected (YES = 1)
Each Project
Not selected (NO = 0)
 project1   no   0 

    
 project2    no    0 
 project3   no   0 

    
 project1   yes   1 

 
  
 project2    no    0 
 project3   yes   1 

 
  
Capital budgeting
All choices
 0   0   0   1   0   1   1  1
               
 0 '  0 '  1 ,  0 ,  1 ,  1 ,  0 , 1
 0   1   0   0   1   0   1  1
               
Are all compatible with the budget ?
project 1
project 2
project 3
total I
I
8 0 0 0
6 0 0 1
5 0 1 0
0 5 6
Budget
1
0
0
8
0
1
1
11
1
1
0
14
15 millions
1
0
1
13
1
1
1
19
Not acceptable
A bad model: capital budgeting
 0   0   0   1   0   1   1 
             
All possible choices F=  0 '  0 '  1 ,  0 ,  1 ,  1 ,  0 
 0   1   0   0   1   0   1 
             
Which is the best with respect to the earnings ?
project 1
project 2
project 3
total E
E
12 0 0 0
8 0 0 1
7 0 1 0
0 7 8
Best value
1
0
0
12
0
1
1
15
1
1
0
20
1
0
1
19
A bad model: capital budgeting
Feasible solutions
Exhaustive representation
2n = huge number for large n
It may be even impossible to write it down
Not independent from data
If data changes, all the model must be change
A good model: capital budgeting
Implicit representation of feasible solutions
Independent from data
1 if project i is selected
Decision variables
xi=
0 if project i is not selected
Budget constraint
Investment for
project 1
8 x1+6 x2+5 x3  15
Investment for
project 2
budget
Investment for
project 3
A good model: capital budgeting
1 if project i is selected
xi=
0 if project i is not selected
earnings
earnings for
project 1
12 x1+8 x2+7 x3
Earnings for
project 2
Earnings for
project 3
If data changes, only coefficients must be changed,
but the model is the same
Construction of a good model:
general rules
Definition of the
decision variables
xi=
1 if project i is selected
0 if project i is not selected
i=1,2,3
Definition of the
objectives
Definition of the
constraints
max
12 x1+8 x2+7 x3
earnings
8 x1+6 x2+5 x3  15
budget
Geometric view of the production problem
The scenarios are too many
We must find another method
Depict the feasible region F (red area)
PI
16
14
12
10
8
6
4
2
Draw the line of the profit PTOT
4  CH + 4,5  PI = 69
Actual best value
2 4 6
8 10 12 14 16 18
CH
Geometric view of the problem
Draw the line of the profit PTOT
PI
16
14
12
10
8
6
4
2
4  CH + 4,5  PI
For growing values of
0
PTOT =
18
56
Growing
direction
2 4 6
Old best value
8 10 12 14 16 18
CH
Optimum !!
Another constraint: technology
To produce 1000 pliers or 1000 spanners is required 1 hour of usage
of a plant
The plant can work for a maximum of 14 hours per day
B
2
3
4
5
6
7
8
9
10
C
D
E
tools
unit price
unit cost
unit profit
unit hour
total amount
toal profit
total cost
total hours
spanner
5
1
4
0,001
4000
25000
7000
6
pliers
6
1,5
4,5
0,001
2000
18000 budget
14 max hours
C11 = C7 * C8 + D7 * D8
PI = C8= number of pliers
CH = D8= number of spanners
HTOT = total hours nedeed
HTOT = 0.001  CH + 0.001  PI
Equation of the total hours
Technological
HTOT = 0.001  CH + 0.001  PI  max_hours=14 constraint
Geometric view of the technological constraint
0.001  CH + 0.001  PI  14
PI
16
14
12
10
8
6
4
2
1  CH + 1  PI  14000
In the plane (PI, CH), first draw the equation
of the technological constraint
hours 16
> 14: not feasible
 14: feasible
hours 6
2 4
6
8 10 12 14 16 18
CH
Feasible region of
the technological
constraint
Mixing the two constraints
We must put together budget and technological constraints.
Spanner
Plier
15000
8
9
10
11
production
total profit
total cost
37500
15000
127500
Budget
18000
8
9
10
11
production
total profit
total cost
20000
2000
62000
Budget
18000
8
9
10
11
production
total profit
total cost
17000
14000
65000
Budget
18000
8
9
10
11
production
total profit
total cost
7000
4000
25000
Budget
18000
working h.
30
Both must be satisfied
Max H.
14
Both violated
12000
working h.
14
Max H.
14
budget violated
technological satisfied
2000
working h.
16
Max H.
14
Budget satisfied
technological violated
2000
working h.
6
Max H.
14
Both satisfied
Geometric view of both constraints
Hours: feasible
Budget: not feasible
PI
16
14
12
10
8
6
4
2
Not feasible points
Hours: not feasible
Budget: not feasible
Hours: not feasible
Budget: feasible
2 4
6
8 10 12 14 16 18 CH
Feasible set F
Hours: feasible
Budget: feasible
Final feasible region
PI
16
14
12
10
8
6
4
2
Feasible solutions
(CH,PI) satisfy:
1  CH + 1,5  PI  18 budget
hours
1  CH + 1  PI  14
CH  0
Non negativity
PI  0
F
2 4
6
8 10 12 14 16 18
CH
Which is the best value for (CH,PI)* among the feasible ones ?
The best one (CH,PI)* maximizes the
profit
4  CH + 4,5  PI
Linear Programming
CH,PI
Real decision variables
Objective function
constraints
CH, PIR
max 4CH + 4,5PI
profit
1CH + 1,5  PI  18 budget
hours
1  CH + 1  PI  14
CH  0 PI  0 Non negativity
CH, PIR
LINEAR PROGRAMMING (LP)
Max or Min of one linear objective function
Constraints are linear equalities (=) or inequalities ( = )
Construction of a good model:
general rules
Definition of the
decision variables
CH, PIR
x1 , x2 R
The name is not important
Definition of the
objectives
Definition of the
constraints
max
4 x1+4,5 x2
x1+ 1,5 x2  18
x1 + x2
 14
x1 , x2  0
profit
budget
hours
Graphical solution for LP
PI
16
14
12
10
8
6
4
2
Let choice a feasible point
(4,4) (4000 spanners e 4000 pliers)
Production
Profit
total cost
10000
4000
34000
Budget
18000
4000
total hours Max hours
8
14
The profit PTOT is
4CH + 4,5PI = 34
(34000 €)
2 4
6
8 10 12 14 16 18
CH
Better solution must have a value of PTOT  34
The idea is looking for solutions that satisfy also the “new
fictitious” constrait 4CH + 4,5PI  34.
Graphical solution for LP
PI
Draw the new feasible region F’
16
14
12
10
8
6
4
2
A better solution (if any) must be in the
new feasible region F’
Let choice (2,10).
F’
with Excel
2 4
6
8 10 12 14 16 18
The profit PTOT is now
4CH + 4,5PI = 53
(53000 €)
CH
Production
profit
total cost
17000
2000
53000
Budget
18000
10000
hours
12
Max Hours
14
Graphical solution for LP
PI
16
14
12
10
8
6
4
2
The feasible region F” is more
and more narrow (violet region)
Behind this point (6,8) with
PTOT = 60, there are non
more feasible better points
2 4
6
8 10 12 14 16 18 CH
The region with the
constraint PTOT > 60
is empty !!!
The point (6,8) is the
best feasible one
Increasing values
of PTOT
Graphical solution of LP: summary
When the number of variables is two:
1. Draw the constraints and the feasible region
2. Choice a feasible point
3. Draw the line of the objective function
passing for this point
4. Parallel move the line of the objective
function in the direction of better values
5. The last feasible point “touched” by the line is
the optimal solution
Solution of LP
Graphical solution can be applied only
when the number of variables is two
Real problems has usually more than two
variables
Computer must be used as a tool to tackle
large quantities of data and arithmetic
Many standard software exist to solve
LP problems of different level of
complexity
We use Excel Solver (www.frontsys.com)
http://www.frontsys.com/