You are on page 1of 13

# 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).

inflow

Material in
Transit

outflow

step input
average delay time
ramp input
exponential growth
<Time>
oscillation

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

inflow 400 units/Day 300 200 100 0 -5 -3 -1 1 3 5 7 inflow : normal inflow : step inflow : ramp 9 11 13 15 Time (Day) 17 19 21 23 25 17 19 21 23 25 inflow : exponential inflow : oscillation outflow 400 units/Day 300 200 100 0 -5 -3 outflow : normal outflow : step outflow : ramp -1 1 3 5 7 9 11 13 15 Time (Day) outflow : exponential outflow : oscillation .

Subquestion 3: Third-order delay: Material in Transit 1 inflow outflow 1 Material in Transit 2 outflow 2 Material in Transit 3 outflow 3 step input average delay time ramp input exponential growth <Time> oscillation Outflows of third-order delays (assuming that average delay time is 5 days for each of the three outflows): outflow 3 200 170 140 110 80 -5 -3 -1 outflow 3 : normal 3rd outflow 3 : step 3rd outflow 3 : ramp 3rd 1 3 5 7 9 11 13 15 Time (Day) 17 19 outflow 3 : exponential 3rd outflow 3 : oscillation 3rd 21 23 25 .

100) Outflows of pipeline delay: outflow 400 units/Day 300 200 100 0 -5 -3 -1 1 outflow : normal pipeline outflow : step pipeline outflow : ramp pipeline outflow : exponential pipeline outflow : oscillation pipeline 3 5 7 9 11 13 15 Time (Day) 17 19 21 23 25 . average delay time.Pipeline delay: Material in Transit inflow outflow step input average delay time ramp input exponential growth <Time> oscillation Outflow = DELAY FIXED(inflow.

average delay time) average delay time = 5 Change “average delay time” into: a) A longer delay: 5 + STEP(5. average delay time mailing Letters in Transit delivery mailing = 100 Letters in Transit(0) = 0 delivery = DELAY3(mailing. 5) b) A shorter delay: 5 – STEP (2. 5) .5. 435) Subquestion 1: The Postoffice.Response of Delays to Changing Delay Times (pp.

delivery 200 150 100 50 0 -5 -3 -1 1 3 5 7 9 11 13 15 Time (Day) 17 19 21 23 25 17 19 21 23 25 delivery : postoffice normal delivery : postoffice shorter delay delivery : postoffice longer delay Letters in Transit 600 300 0 -300 -600 -5 -3 -1 1 3 5 7 9 11 13 Time (Day) Letters in Transit : postoffice normal Letters in Transit : postoffice shorter delay Letters in Transit : postoffice longer delay 15 .

a) Determine the number of employees P(t) in the cases A=1 year and A=10 years. Vensim diagram for trainees and employees. Suppose the desired number changes from 30 to 40. when the adjustment time suddenly decreases.Subquestion 2: If the actual order rate (O) is equal to the expected order rate (Ô). P (t ) = 30 at t = 0 . nothing happens. O(t ) = 10 at t = 0 . So. C = the contract duration. C= 5 years. The average contract duration C is 5 years and the training period takes 1 year. A = the system’s adjustment time. The given task can be solved by a system of differential equations describing the model: dO G − P(t ) O(t ) (1) = − dt A B dP O(t ) P(t ) = − dt B C (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 P(t ) : . B=1 year. The situation is described by the following model: A B O P F2 F1 F3 C G Figure 1-1. B = the training period. then the error (see Figure 11-10) is zero. Exercise 1 of handout Assume that initially 30 employees have a contract and 10 future employees are in training. G = 40 employees. G = the desired number of employees. P = the number of actual employees working on a contract basis. where: O = the number of future employees in training. Zero divided by the adjustment time is still zero.

2 = − A( B + C ) ± A 2 ( B − C ) 2 − 4 ABC 2 2 ABC (5) (6) For the positive discriminant in (6). the following function provides the solution to (4): P(t ) = C1e kt cos( wt ) + C2 e kt sin( wt ) (8) where: C1 and C2 are arbitrary constants. By differentiating (3). the general solution for equation (3) is the sum of expressions (7) and (10) for the positive discriminant. the solution of equation (4) has the following form: (7) P(t ) = D1e a1t + D2 e a2t where: D1 and D2 are arbitrary constants. or (8) and (10) for the negative discriminant. then the system experiences an oscillation.d 2P 1 1 dP 1 1 1 1G +( + ) + ( + ) P(t ) = 2 C B dt B C A B A dt (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). For this case. The inhomogeneous differential equation: The partial solution for the inhomogeneous equation is a constant C 0 which satisfies equation (3). we will find the value of C 0 : G (10) C0 = 1+ A C Thus. and − (B + C) k= 2 BC − A 2 ( B − C ) 2 + 4 ABC 2 w= 2 ABC (9) 2. 1. we will receive: ( ABCa 2 + A( B + C )a + ( A + C ))e at = 0 The solutions for (5) are: a1. If the discriminant in equations (6) has a negative value. . The homogeneous differential equation is: d P 1 1 dP 1 1 1 +( + ) + ( + ) P(t ) = 0 2 C B dt B C A dt 2 (4) Substituting P(t ) = e at and multiplying the right-hand side of equation (4) by ABC .

to find P(t ) we need to refer to equation (8). which leads to: For the positive discriminant: P(0) = D1 + D2 + C 0 dP dt (11) = D1 a1 + D2 a 2 t =0 For the negative discriminant: P(0) = C1 + C 0 = C1 + dP dt G 1+ A C (12) = C 2 w + C1k t =0 Through substitution in equations (11) and (12) we will find the following expressions for D1 and D2 or C1 and C2 : For the positive discriminant: ⎞ 1 ⎛ dP ⎜⎜ D1 = − a 2 P(0) + a 2 C0 ⎟⎟ a1 − a 2 ⎝ dt t =0 ⎠ D2 = 1 ⎛ dP ⎜ a2 − a1 ⎜⎝ dt t =0 ⎞ − a1 P(0) + a1 C0 ⎟⎟ ⎠ For the negative discriminant: G C1 = P(0) − C 0 = P(0) − 1+ A C2 = 1 ⎛ dP ⎜ w ⎜⎝ dt t =0 (13) C ⎞ − C1 k ⎟⎟ ⎠ (14) Now. an oscillation is undergone by the system. Then. 2 = − 6 ± − 84 .e. where: . we are ready to solve this exercise numerically for A=1 and 10 years.In order to determine the constants D1 and D2 or C1 and C2 we need to explode the initial conditions for t = 0 . For A=1 year: From (6): a1. 10 i.

For A=10 years: From (6): a1.33 1+ 1 5 Given the values of P(0) .92t ) + 2. 10 20 .33 − 3.92 10 To determine C1 and C2 . Number of employees as a function of time (for A = 1 year).33e −0.84 = 0.17.6t sin(0.92 ⎝ dt t =0 ⎠ From equation (2) we can find the value of the derivative of P(t ) at the initial moment t = 0 : dP 10 30 = − =4 dt t =0 1 5 Hence.6 w= C1 = 30 − 33. we will calculate: C2 = 2. w and k .92t ) Graph for P 40 30 20 0 4 P : Current 8 12 Time (Year) 16 empl/Year Figure 1-2. 2 = −6± 6 . we will determine the solution for P(t ) : P(t ) = 33.17e −0.6t cos(0.33 ⎞ 1 ⎛ dP ⎜⎜ C2 = − 2 ⎟⎟ 0. the parameters C1 and C2 from (14) will be determined as follows: k = −0. C 0 .33 = −3. we calculate C 0 using equation (10): 40 C0 = = 33. Substituting the obtained parameters into equation (8) and summing up the solutions of (8) and (10).

Number of workers in time (for A = 10 years).84e −0. dt t =0 Hence. the system does not go through oscillations.e.84 + 0.51 D2 = −20. From (10): C 0 = 40 = 13.51e −0. we will calculate D1 and D2 as: D1 = 37.36 ⎜⎝ dt t =0 ⎞ + 0.33 ⎟⎟ ⎠ t =0 ⎞ + 0. the solution for P(t ) will be the following: P(t ) = 13.36 P(0) − 0. we will receive: D1 = D2 = ⎛ dP 1 ⎜ − 0.84 × 13.84 P(0) − 0.36 + 0.e.33 + 37.84 Thus.84 ⎜⎝ dt ⎛ dP 1 ⎜ − 0. i. P(0) = 30 and dP = 4.36 × 13.33 ⎟⎟ ⎠ The initial values of P(t ) and its derivative are the same as for A=1 year.i. Graph for P 40 20 0 0 4 8 12 Time (Year) P : Current 16 empl/Year Figure 1-3.84t . b) Which values of A result in an oscillating system? 20 . joining the solutions for equations (7) and (10).33 1 + 10 5 Substituting a1 and a 2 in expressions (13).36t − 20.

a): . the only possible solution is: 4 BC 2 A< (B − C) 2 A < 6. A should satisfy the following inequality: A 2 ( B − C ) 2 − 4 ABC 2 < 0 Since A < 0 is unrealistic.a). Pmax = P(t ) = C0 + w⎜ ⎜ C k + C w ⎟e sin(wt ) 2 ⎝ 1 ⎠ Since the overshoot shows the difference between Pmax and P(∞) . Pʹ′(t ) = e kt ((C1k + C2 w) cos( wt ) + (C2 k − C1 w) sin( wt )) = 0 Pʹ′ʹ′(t ) = e kt ((2C2 kw + C1 (k 2 − w 2 )) cos( wt ) + (−2C1kw + C2 (k 2 − w 2 )) sin( wt )) < 0 The solution of the above mentioned formulas will be: ⎞ ⎡ C k + C 2 w ⎤ 1 ⎛ t * = ⎜⎜ arctg ⎢ 1 ⎥ + π ⎟⎟ w ⎝ ⎣ C1 w − C 2 k ⎦ ⎠ ⎛ C1 2 + C2 2 ⎞ kt * * * ⎟ Hence.25 c) If we want to limit overshoot to a maximum of 1 employee.1. what is the best choice for A? The point of a maximal overshoot is defined by the maximal value of P(t ) . 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.If the discriminant in equations (6) is negative. resulting in A=0. derived from equation (2) (exercise 1. (10) and (14) yield a non-linear equation for A. we need to consider the function P(t ) corresponding to oscillating behavior: P(t ) = C 0 + C1e kt cos( wt ) + C 2 e kt sin( wt ) (see exercise 1. This equation can be solved numerically by Mathematica for Windows 5.840691 years. At this point the first derivative of P(t ) is equal to 0. the maximal overshoot is equal to: ⎛ C 2 + C2 2 ⎞ kt * ⎟e sin(wt * ) Overshoot = w⎜⎜ 1 ⎟ ⎝ C1k + C2 w ⎠ Setting the overshoot to 1 and using equations (9). then the system experiences an oscillation. and the second one is negative. To determine the derivatives. For this case.

6t cos(0. The final expression O (t ) is: O(t ) = 6. we need to substitute the values of P(t ) and its derivative.⎛ dP P(t ) ⎞ O(t ) = B⎜ + ⎟ C ⎠ ⎝ dt Next. Number of trainees in time.a and 1.18e −0.6t sin(0.92t ) Graph for O 10 8 6 0 4 O : Current Figure 1-4.33e −0.92t ) + 2. 8 12 Time (Year) 16 20 .67 + 3.c. obtained for A=1 year in exercise 1.