Sie sind auf Seite 1von 63

LOGO

Introduction to System
Modelling and Optimization
Annisa Uswatun Khasanah

Sumber: bahan ajar mata kuliah


Optimasi Teknik Industri UGM- Dr.
Nur Aini Masruroh

System modeling

System

Model

Whats a model?

min t n

subject to
t j t i pi
ti 0

(i, j ) A

iN

t j t i pi t i t j p j

(i, j ) E k , k M

Representation of a system

Why we need model?

Simple
Easy to play
Safer to test
Low-cost

Design
Analysis
Control
Experimental
design

Uses of
modeling
Finance

Research

Optimization

What is optimization?
Scientific methods to solve problems
in order to find solutions which best
serve the purposes
Scientific method: an organized approach to
the problem
Build mathematical model to describe the
system
Goal:
minimize the effort required
maximize benefit desired

Why optimization?
Desired goal may not be achievable, and
so we try to get as close as possible to
it.
There may be more ways to achieve the
goal, and so we can choose one by
assigning a quality to all the solutions
and selecting the best one.
We may not know how to solve the
system of equations f(x) = 0, so instead
we minimize the norm If(x)I, which is a
scalar function of the unknown vector x.

Applications of Optimization in Business and


Industry

Finance, budgeting and investments


Cash flow analysis, long range capital requirements,
dividend policies, investment portfolios, etc.
Purchasing, procurement and exploration
Determination of quantities and timing of purchases;
replacement policies
Physical distribution
Location and size of warehouses, distribution
centers; logistics and supply systems
Facilities planning
Number and location of factories, warehouses,
hospitals

Applications of Optimization in Business and


Industry (contd)
Manufacturing
Production scheduling
Maintenance, construction, project
scheduling
Maintenance policies, preventive maintenance,
maintenance crew size, allocation of resources,
project scheduling
Marketing
Product selection, timing, number of salesmen,
advertising strategies
Personnel
Selection of personnel, recruiting policies,
assignment of jobs

Applications of Optimization in Business and


Industry (contd)

Research and development


Reliability, control of development projects
Military
Allocation of military forces and resources
Others
Social and public affairs, population control,
etc

Some definitions
Decision variable
Decision variable is always involved with a
trade-off
Changing the value of a variable may bring
benefits in one part of the system but has
detrimental effects in other parts
There must be an optimum value for the
decision variable need to be optimized

Some definitions (contd)


Types of variables
Continues can take any value in a region
Temperature, pressure, flowrate,

Discrete/integer can only take discrete


values
No of machines, no of personnel,

Binary can only take 0 or 1.


Existence or non-existence of equipment in a
design,

Some definitions (contd)


Objective function
Objective function is expressed in terms of
design variables
The goal of optimization is to find the values
of the variables that yield the optimal value of
the objective function

Some definitions (contd)


Constraints
Constraints arise from the limited available
resources
Constraints are expressed in form of
equalities or inequalities
The whole sets of equalities and inequalities
plus the objective function comprises the
system model, which describes the
interrelationships of design variables

5 steps in optimization
1. Formulation of the problem
Someone has an objective to be achieved
The decision maker must have a choice of
behavior
There must be some doubt as to which
course of action is best in terms of decision
makers objective
There must be an environment to which the
problem is relevant

5 steps in optimization (contd)


2. Construction of the model
A study of the problem environment
Define decision variables, objectives,
interactions between variables and making
some assumptions or necessary
simplifications about the real environment
Construction of symbolic expressions of the
formulation, usually in mathematical terms or
in computer language

5 steps in optimization (contd)


3. Solution of the model
Development of algorithms which are
techniques for solving models
Quality of solution
Feasible solution
Satisfactory (simply working for a good
result)
Optimal solution (want the best solution)

5 steps in optimization (contd)


4. Testing the results
Is the solution intuitively acceptable?
Comparison with historical data
Sensitivity analysis
How do small changes in numbers in the
model affect the final outcome?

5 steps in optimization (contd)


5. Implementation of the final results
Translate the mathematical solution into a set of
easily understood operating procedures or decision
rules for each of the persons involved in using and
applying the solution
Train the people in the proper use of these rules
Plan and execute the transition from the present to
the desired mode of operations
Institute controls to maintain and update the solution
Check the initial performance periodically until the
new model of operations has become routine

Process of optimization study

Mengubah masalah menjadi model


Sebuah perusahaan memproduksi 2 macam
produk A dan B. Setiap unit produk A
membutuhkan 30 unit sumber daya 1, 40 unit
sumber daya 2, dan 20 unit sumber daya 3. setiap
unit produk B membutuhkan 20 unit sumber daya
2 dan 25 unit sumber daya 3. sumber daya 1,2,3
masing masing tersedia sebanyak 1500 unit, 2500
unit, dan 2000 unit. Setiap produk A dan B
masing-masing memberikan keuntungan sebesar
Rp. 200 dan Rp 160. Tentukan banyaknya produk
A dan B yang harus diproduksi dan tentukan
status sumber daya pada kondisi optimal
Fungsi minimum atau maksimum?
Apa tujuan akhirnya? (fungsi tujuan)
Apa yang dioptimalkan? (variabel keputusan)

www.themegallery.com

Sumber
daya

Produk
A

Kapasitas
B

30

1500

40

20

2500

20

25

2000

Keuntungan
/unit

Rp 200

Rp 160

www.themegallery.com

Fungi tujuan : Memaksimumkan profit


perusahaan
Z = 200X1 + 160X2
X1 = jumlah produk A yang harus dibuat
X2 = jumlah produk B yang harus dibuat
Variabel Keputusan :
Berapa produk A dan B yang harus dibuat
Mencari nilai optimal untuk setiap variabel
keputusan

www.themegallery.com

Batasan
30 X1 1500
40 X1 + 20 X2 2500
20 X1 + 25 X2 2000
X1, X2 > 0

www.themegallery.com

How to Solve?
Graphical solution
Simplex Method

www.themegallery.com

Graphical Solution
Find all pairs of (x1, x2) which satisfy
each constraint separately
Find all pairs of (x1, x2) which satisfy
all constraints. That is, find set of
feasible solutions
Choose the one which gives the max
value of objective function

www.themegallery.com

Graphical Solution - example 1


Sebuah perusahaan memproduksi 2 macam
produk A dan B. Setiap unit produk A
membutuhkan 30 unit sumber daya 1, 40 unit
sumber daya 2, dan 20 unit sumber daya 3. setiap
unit produk B membutuhkan 20 unit sumber daya
2 dan 25 unit sumber daya 3. sumber daya 1,2,3
masing masing tersedia sebanyak 1500 unit, 2500
unit, dan 2000 unit. Setiap produk A dan B
masing-masing memberikan keuntungan sebesar
Rp. 200 dan Rp 160. Tentukan banyaknya produk
A dan B yang harus diproduksi dan tentukan
status sumber daya pada kondisi optimal

www.themegallery.com

Graphical Solution - example 1


Sumber
daya

Produk
A

Kapasitas
B

30

1500

40

20

2500

20

25

2000

Keuntungan
/unit

Rp 200

Rp 160

www.themegallery.com

Graphical Solution - example 1


Maximize Z = 200X1 + 160X2
Batasan
30 X1 1500
40 X1 + 20 X2 2500
20 X1 + 25 X2 2000
X1, X2 > 0

www.themegallery.com

Graphical Solution - example 1


Find all pairs of (x1, x2) which satisfy
each constraint separately
30 X1 1500
X1 1500 / 30
X1 50
40 X1 + 20 X2 2500
20 X1 + 25 X2 2000
X,X >0

X1

62,5

X2

125

X1

100

X2

80

www.themegallery.com

Graphical Solution - example 1


Find all pairs of (x1, x2) which satisfy all constraints. That
is, find set of feasible solutions

www.themegallery.com

Graphical Solution - example 1

www.themegallery.com

Choose the one which gives the max


value of objective function
X1 = 37,5
X2 = 50
Optimum solution
Z = 200X1 + 160X2
Z = 200(37,5) + 160(50)
Z = 7500 + 8000
Z = 15.500
www.themegallery.com

Graphical solution example 2


Max z = 40 x1 + 50 x2
Batasan
150 x1 + 350 x2 5000
100 x1 + 50 x2 1500
x1, x2 > 0

Graphical solution example 2

Graphical solution example 3 (no solution)

Max z = 3 x1 + 2 x2
Subject to
2 x 1 + x2 2
3 x1 + 4 x2 12
x1, x2 0

Graphical solution example 3 (no solution) contd

Graphical solution example 4 (unbounded solution)

Max z = 2 x1 + x2
Subject to
x1 - x2 10
2 x1 - x2 40
x1, x2 0

Graphical solution example 4 (unbounded solution)

PR
1.

Tentukan fungsi tujuan, variabel keputusan, batasan, dan


gambarlah grafik solusi untuk permasalahan berikut!
PT LAQUNATEKSTIL memiliki sebuah pabrik yang akan
memproduksi 2 jenis produk, yaitu kain sutera dan kain
wol. Untuk memproduksi kedua produk diperlukan bahan
baku benang sutera, bahan baku benang wol dan tenaga
kerja. Maksimum penyediaan benang sutera adalah 60 kg
per hari, benang wol 30 kg per hari dan tenaga kerja 40
jam per hari. Kebutuhan setiap unit produk akan bahan
baku dan jam tenaga kerja dapat dilihat dalam tabel
berikut:
Jenis Bahan Baku
dan Tenaga Kerja
Benang Sutra
Benang Wol
Tenaga Kerja
Maksimalkan
keuntungan

Kg Bahan Baku & Jam Tenaga Kerja


Kain Sutra

Kain Wol

Maksimum
Penyediaan

2
2

3
2
1

60 kg
30 kg
40 kg

Rp 40

Rp 30
www.themegallery.com

2. Tentukan fungsi tujuan, variabel keputusan, batasan, dan


gambarlah grafik solusi untuk permasalahan berikut!
Perusahaan makanan ROYAL merencanakan untuk
membuat dua jenis makanan yaitu Royal Bee dan Royal
Jelly. Kedua jenis makanan tersebut mengandung vitamin
dan protein. Royal Bee paling sedikit diproduksi 2 unit dan
Royal Jelly paling sedikit diproduksi 1 unit. Tabel berikut
menunjukkan jumlah vitamin dan protein dalam setiap
jenis makanan:
Jenis
Makanan

Vitamin
(unit)

Protein
(unit)

Biaya per unit


(ribu rupiah)

Royal Bee

100

Royal Jelly

80

Minimum
Kebutuhan

12

www.themegallery.com

Simplex method

Simplex algorithm outline


1. Find some feasible corner points and
calculate z
2. While z can be improved by moving to
an adjacent corner point

Select the adjacent corner point giving the greater rate of


improvement in z
Calculate the coordinates of the new point and new z
value

3. Stop

Simplex algorithm example


max z = 7x1+ 10x2
subject to
5x1+ 4x2 24
2x1+ 5x2 13
x1 , x2 0
Convert the inequalities into equations form
max z = 7x1+ 10x2
subject to
5x1+ 4x2 + s1 = 24
2x1+ 5x2 + s2 = 13

Simplex algorithm example


(contd)
Solution # 1: s1 = 24, s2 = 13, x1= 0, x2 = 0, z = 0
Can z be improved by making x1 > 0 ?
Yes, if x1 > 0, then for each unit increase in x1 , z goes up
7
Can z be improved by making x2> 0 ?
Yes, if x2 > 0, then for each unit increase in x2 , z goes up
10
Which variable should be solved for in the next solution?
Since by making x2> 0 , it gives the greatest rate of
improvement, this variable should be chosen to enter the
basic.

Simplex algorithm example


(contd)
Which variable should leave the basic?
This can be determined as follows:
For the constraint c1: 5x1+ 4x2 + s1 = 24, max x2 can
increase is 6
For the constraint c2: 2x1+ 5x2 + s2 = 13, max x2 can
increase is 2.6, in this case s2 = 0.
We obtain the following solution:
Solution # 2: s1 = 13.6, x2 = 2.6, x1= 0, s2 = 0, z = 26

Simplex algorithm example


(contd)

To get this new solution, we need only to eliminate


x2 from the
following Row(0) and Row(1) equations:
Row(0): z - 7x1- 10x2 = 0
Row(1): 5x1+ 4x2 + s1 = 24
Row(2): 2x1+ 5x2 + s2 = 13
This can be done through the following row
operations:
Row(0) Row(0)+(2)Row(2) : z - 3x1 + 2s2 = 26
Row(1) Row(1)-(4/5)Row(2): (17/5)x1 + s1
(4/5)s2 = 68/5
Row(2) (1/5)Row(2) : (2/5)x1+ x2 + (1/5)s2 =
13/5

Simplex algorithm example


(contd)

We note that z still can be improved by making x1> 0.


To get the new solution, we need to eliminate x1 from the Row(0) and
Row(2) equations.
Row(0) Row(0)+(15/17)Row(1): z + (15/17)s1 + (22/17)s2 = 38
Row(1) (5/17)Row(1) : x1 + (5/17)s1 (4/17)s2 = 4
Row(2) Row(2)-(2/5)Row(1): x2 - (2/17)s1 + (5/17)s2 = 1
Since the coefficients in Row(0) are all non-negative now, z can not be
improved any further and hence we have
Optimal Solution: x1 = 4, x2 = 1, s1= 0, s2 = 0, z = 38

Simplex algorithm example (contd)


The above solution procedures can be carried out in
the following Simplex tableau form:
Simplex Tableau
Pivot column
Iteration 1:
Basic

x1

x2

s1

s2

RHS

-7

-10

S1

24

24/4=6

S2

13

13/5=2.6

Pivot row
Pivot element

Ratio

Simplex algorithm example (contd)


Select x2 as the entering variable and s2 as the leaving
variable gives
Set 0 to cells in the pivot column
Iteration 2:
except pivot element
Basic

x1

x2

s1

s2

RHS

-3

26

S1

17/5

-4/5

68/5

(68/5)/(17/5)=4

X2

2/5

1/5

13/5

(13/5)/(2/5)=6.5

All elements in the pivot row are


divided by pivot element

Ratio

Apply Gauss-Jourdan
elimination to other cells

Gauss-Jordan Elimination
New value = old value (new value of
element in the pivot row in the
respective column)(old value of the
pivot column in the respective row)
Example: cell s1 x1
new value = 5 (2/5)(4)
= 17/5

Simplex algorithm example


(contd)
Select x1 as the entering variable and s1 as the leaving
variable gives
Iteration 3:
Basic

x1

x2

s1

s2

RHS

15/17

22/17

38

X1

5/17

-4/17

X2

-2/17

5/17

Since all the coefficients in Row (0) are now all non-negative, the
current solution is optimal

Simplex summary
At each iteration, all variables are
partitioned into 2 classes as shown
below:

Simplex method for solving a


general LP problem
Consider the following LP model:
n

z cjxj

max

j 1

Subject to :
n

a x
j 1

ij

x j 0,

si bi

i 1,2,..., m

j 1,..., n

If bi are all 0, then an initial feasible solution can be obtained


as follows:
xj = 0, j=1,,n
si = bi, i=1,,m

Simplex method for


solving a general LP
problem (contd)
What happens if bi < 0 for some i?
In this case, the LP problem can be solved by the
Two-Phase Method.
Example 2
max z = 7x1+ 10x2
subject to
5x1+ 4x2 24
2x1+ 5x2 13
x1 , x2 0

Simplex method: example 2


Step 1: Define an artificial variable ri for each of the or =
type constraint and add them to the LP model (PhaseI)
max z = -r1
subject to
5x1+ 4x2 - s1 + r1 = 24
2x1+ 5x2 + s2 = 13
x1, x2, s1, s2, r1 0
Step 2: Eliminate r1 from Row(0) before we have the first
solution. That is
Row(0) Row(0)-Row(1)
Row(0): z - 5x1 - 4x2 + s1 = -24

Simplex method: example 2


(contd)
Iteration 1:
Basic

x1

x2

s1

s2

r1

RHS

Ratio

-5

-4

-24

r1

-1

24

24/5=4.8

S2

13

13/2=6.5

Simplex method: example 2


(contd)
Select x1 as the entering variable and r1 as the leaving variable
Iteration 2:
Basic

x1

x2

s1

s2

r1

RHS

x1

4/5

-1/5

1/5

24/5

S2

17/5

2/5

-2/5

3.4

The solution to the Phase-I LP problem is now optimal. Hence we


have obtained a basic feasible solution to the original LP problem

Simplex method: example 2


(contd)

Step 3: Drop the artificial column and optimize the


original objective function:
max z = 7x1+ 10x2
subject to
x1+ (4/5)x2 (1/5)s1 = 4.8
(17/5)x2 + (2/5)s1 + s2 = 3.4
x1, x2, s1, s2 0
An initial basic feasible solution is:
x1 = 4.8, s2 = 3.4

Simplex method: example 2


(contd)
Step 4: Eliminate the coefficient of x1 from Row(0) before we
start the Phase-II solution. That is
Row(0) Row(0)+ 7Row(1)
This gives Row(0): z (22/5)x2 (7/5)s1 = 33.6
The initial Simplex tableau is given below:
Basic

x1

x2

s1

s2

RHS

Ratio

-22/5

-7/5

33.6

x1

4/5

-1/5

4.8

4.8/0.8=6

S2

17/5

2/5

3.4

3.4/3.4=1

Simplex method: example 2


(contd)
Select x2 as the entering variable and s2 as the leaving variable gives
Iteration 2:
Basic

x1

x2

s1

s2

RHS

Ratio

-15/17

22/17

38

x1

-5/17

-4/17

x2

2/17

5/17

17/2

Simplex method: example 2


(contd)
Select s1 as the entering variable and x2 as the leaving variable gives
Iteration 3:
Basic

x1

x2

s1

s2

RHS

15/2

7/2

45.5

x1

5/2

s1

17/2

5/2

17/2

Since all the coefficients in Row(0) are now all nonnegative, the
current solution to the Phase-II LP problem is optimal.

LOGO

Thank You!

Das könnte Ihnen auch gefallen