Download - Answers-Instructions-week-4.pdf
Instruction 4, October 14
Response of Material Delays to Steps, Ramps, and Cycles (pp. 425 & 426) Subquestion 1 & 2: “In all cases assume that prior to time zero the delay is in equilibrium with the outflow and inflow both equal to 100 units/day.” Because of this statement you can determine that the initial value of the stock equals 500 units (100 units/day * 5 days average delay time).
Material inTransitinflow outflow
step input
ramp input
exponential growth
oscillation
average delay time
<Time>
Step-input: STEP(100,0) Ramp-input: IF THEN ELSE (Time >=0, 5*Time, 0) Exponential growth: IF THEN ELSE (Time>=0, -100+100*(1.05)^Time, 0) Oscillation: IF THEN ELSE (Time>=0, 100*sin(Time/(10/(2*3.14159))), 0) Note that: 3.14159 = π To simulate the Step-input, use the following equation for the inflow: Inflow = 100+step input+0*ramp input+0*exponential growth+0*oscillation Outflow = Material in Transit/average delay time
inflow400
300
200
100
0-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)
units
/Day
inflow : normalinflow : stepinflow : ramp
inflow : exponentialinflow : oscillation
outflow400
300
200
100
0-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)
units
/Day
outflow : normaloutflow : stepoutflow : ramp
outflow : exponentialoutflow : oscillation
Subquestion 3: Third-order delay:
Material inTransit 1inflow outflow 1
step input
ramp input
exponential growth
oscillation
average delay time
<Time>
Material inTransit 2
Material inTransit 3outflow 2 outflow 3
Outflows of third-order delays (assuming that average delay time is 5 days for each of the three outflows):
outflow 3200
170
140
110
80-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)outflow 3 : normal 3rdoutflow 3 : step 3rdoutflow 3 : ramp 3rd
outflow 3 : exponential 3rdoutflow 3 : oscillation 3rd
Pipeline delay:
Material inTransitinflow outflow
step input
ramp input
exponential growth
oscillation
average delay time
<Time>
Outflow = DELAY FIXED(inflow, average delay time, 100) Outflows of pipeline delay:
outflow400
300
200
100
0-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)
units
/Day
outflow : normal pipelineoutflow : step pipelineoutflow : ramp pipelineoutflow : exponential pipelineoutflow : oscillation pipeline
Response of Delays to Changing Delay Times (pp. 435) Subquestion 1: The Postoffice.
average delay time
Letters inTransitmailing delivery
mailing = 100 Letters in Transit(0) = 0 delivery = DELAY3(mailing, average delay time) average delay time = 5 Change “average delay time” into:
a) A longer delay: 5 + STEP(5, 5) b) A shorter delay: 5 – STEP (2.5, 5)
delivery200
150
100
50
0-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)delivery : postoffice normaldelivery : postoffice shorter delaydelivery : postoffice longer delay
Letters in Transit600
300
0
-300
-600-5 -3 -1 1 3 5 7 9 11 13 15 17 19 21 23 25
Time (Day)Letters in Transit : postoffice normalLetters in Transit : postoffice shorter delayLetters in Transit : postoffice longer delay
Subquestion 2: If the actual order rate (O) is equal to the expected order rate (Ô), then the error (see Figure 11-10) is zero. Zero divided by the adjustment time is still zero. So, when the adjustment time suddenly decreases, nothing happens.
Exercise 1 of handout Assume that initially 30 employees have a contract and 10 future employees are in training. The average contract duration C is 5 years and the training period takes 1 year. Suppose the desired number changes from 30 to 40.
a) Determine the number of employees P(t) in the cases A=1 year and A=10 years. The situation is described by the following model:
O PF2F1
G
F3
A B
C
Figure 1-1. Vensim diagram for trainees and employees. where: O = the number of future employees in training, 10)( =tO at 0=t ; P = the number of actual employees working on a contract basis, 30)( =tP at 0=t ; G = the desired number of employees, G = 40 employees; A = the system’s adjustment time; B = the training period, B=1 year; C = the contract duration, C= 5 years. The given task can be solved by a system of differential equations describing the model:
BtO
AtPG
dtdO )()(
−−
= (1)
CtP
BtO
dtdP )()(
−= (2)
After a certain number of transformations of (2) we can substitute it into the equation (1) and obtain the following second order differential equation for )(tP :
AG
BtP
ACBdtdP
BCdtPd 1)()11(1)11(2
2
=++++ (3)
Equation (3) can be solved by finding a general solution to the homogeneous differential equation and partial solution for inhomogeneous one derived from (3).
1. The homogeneous differential equation is:
0)()11(1)11(2
2
=++++ tPACBdt
dPBCdt
Pd (4)
Substituting atetP =)( and multiplying the right-hand side of equation (4) by ABC , we will receive:
0))()(( 2 =++++ ateCAaCBAABCa (5) The solutions for (5) are:
ABCABCCBACBA
a2
4)()( 222
2,1−−±+−
= (6)
For the positive discriminant in (6), the solution of equation (4) has the following form: tata eDeDtP 21
21)( += (7) where: 1D and 2D are arbitrary constants. If the discriminant in equations (6) has a negative value, then the system experiences an oscillation. For this case, the following function provides the solution to (4):
)sin()cos()( 21 wteCwteCtP ktkt += (8) where: 1C and 2C are arbitrary constants, and
ABCABCCBA
wBCCBk
24)(
2)( 222 +−−
=+−
= (9)
2. The inhomogeneous differential equation: The partial solution for the inhomogeneous equation is a constant 0C which satisfies equation (3). By differentiating (3), we will find the value of :0C
CAGC+
=1
0 (10)
Thus, the general solution for equation (3) is the sum of expressions (7) and (10) for the positive discriminant, or (8) and (10) for the negative discriminant.
In order to determine the constants 1D and 2D or 1C and 2C we need to explode the initial conditions for 0=t , which leads to: For the positive discriminant:
22110
021)0(
aDaDdtdP
CDDP
t
+=
++=
=
(11)
For the negative discriminant:
CAGCCCP+
+=+=1
)0( 101
kCwCdtdP
t12
0
+==
(12)
Through substitution in equations (11) and (12) we will find the following expressions for 1D and 2D or 1C and 2C : For the positive discriminant:
⎟⎟⎠
⎞⎜⎜⎝
⎛+−
−=
=022
0211 )0(1 CaPa
dtdP
aaD
t
⎟⎟⎠
⎞⎜⎜⎝
⎛+−
−=
=011
0122 )0(1 CaPa
dtdP
aaD
t
(13)
For the negative discriminant:
CAGPCPC+
−=−=1
)0()0( 01
⎟⎟⎠
⎞⎜⎜⎝
⎛−=
=
kCdtdP
wC
t1
02
1 (14)
Now, we are ready to solve this exercise numerically for A=1 and 10 years. For A=1 year:
From (6): 10
8462,1
−±−=a ,
i.e. an oscillation is undergone by the system. Then, to find )(tP we need to refer to equation (8), where:
92.010846.0 ==−= wk
To determine 1C and 2C , we calculate 0C using equation (10):
33.3351140
0 =+
=C
Given the values of )0(P , 0C , w and k , the parameters 1C and 2C from (14) will be determined as follows: 33.333.33301 −=−=C
⎟⎟⎠
⎞⎜⎜⎝
⎛−=
=
292.01
02
tdtdPC
From equation (2) we can find the value of the derivative of )(tP at the initial moment 0=t :
4530
110
0
=−==tdt
dP
Hence, we will calculate: 17.22 =C . Substituting the obtained parameters into equation (8) and summing up the solutions of (8) and (10), we will determine the solution for )(tP :
)92.0sin(17.2)92.0cos(33.333.33)( 6.06.0 tetetP tt −− +−=
Graph for P40
30
200 4 8 12 16 20
Time (Year)
P : Current empl/Year
Figure 1-2. Number of employees as a function of time (for A = 1 year). For A=10 years:
From (6): 10
662,1
±−=a ,
i.e. the system does not go through oscillations.
From (10): 33.135
10140
0 =+
=C
Substituting 1a and 2a in expressions (13), we will receive:
⎟⎟⎠
⎞⎜⎜⎝
⎛×−+
+−=
=
33.1384.0)0(84.084.036.0
1
01 P
dtdPD
t
⎟⎟⎠
⎞⎜⎜⎝
⎛×−+
+−=
=
33.1336.0)0(36.036.084.0
1
02 P
dtdPD
t
The initial values of )(tP and its derivative are the same as for A=1 year, i.e. 30)0( =P and
40
==tdt
dP .
Hence, we will calculate 1D and 2D as: 51.371 =D 84.202 −=D
Thus, joining the solutions for equations (7) and (10), the solution for )(tP will be the following:
tt eetP 84.036.0 84.2051.3733.13)( −− −+= .
Graph for P40
20
00 4 8 12 16 20
Time (Year)
P : Current empl/Year
Figure 1-3. Number of workers in time (for A = 10 years).
b) Which values of A result in an oscillating system?
If the discriminant in equations (6) is negative, then the system experiences an oscillation. For this case, A should satisfy the following inequality:
04)( 222 <−− ABCCBA Since 0<A is unrealistic, the only possible solution is:
25.6)(
42
2
<
−<
ACB
BCA
c) If we want to limit overshoot to a maximum of 1 employee, what is the best choice for A? The point of a maximal overshoot is defined by the maximal value of )(tP . At this point the first derivative of )(tP is equal to 0, and the second one is negative. To determine the derivatives, we need to consider the function )(tP corresponding to oscillating behavior:
)sin()cos()( 210 wteCwteCCtP ktkt ++= (see exercise 1.a).
0))sin()()cos()(()( 1221 =−++=ʹ′ wtwCkCwtwCkCetP kt 0))sin())(2()cos())(2(()( 22
2122
12 <−+−+−+=ʹ′ʹ′ wtwkCkwCwtwkCkwCetP kt The solution of the above mentioned formulas will be:
⎟⎟⎠
⎞⎜⎜⎝
⎛+⎥⎦
⎤⎢⎣
⎡
−
+= π
kCwCwCkCarctg
wt
21
21* 1
Hence, )sin()( **
21
22
21
0*
max wtewCkC
CCwCtPP kt⎟⎟⎠
⎞⎜⎜⎝
⎛
+
++==
Since the overshoot shows the difference between maxP and )(∞P , the maximal overshoot is equal to:
)sin( **
21
22
21 wte
wCkCCCwOvershoot kt
⎟⎟⎠
⎞⎜⎜⎝
⎛
+
+=
Setting the overshoot to 1 and using equations (9), (10) and (14) yield a non-linear equation for A. This equation can be solved numerically by Mathematica for Windows 5.1, resulting in A=0.840691 years.
d) Determine the function describing the number of employees in training in case of A=1 year? The number of employees in training is described by the following equation, derived from equation (2) (exercise 1.a):
⎟⎠
⎞⎜⎝
⎛ +=CtP
dtdPBtO )()(
Next, we need to substitute the values of )(tP and its derivative, obtained for A=1 year in exercise 1.a and 1.c. The final expression )(tO is:
)92.0sin(18.2)92.0cos(33.367.6)( 6.06.0 tetetO tt −− ++=
Graph for O10
8
60 4 8 12 16 20
Time (Year)
O : Current
Figure 1-4. Number of trainees in time.