# Assignment: no: 02

System Dynamics

LINEAR AND NON-LINEAR
A process is said to be linear if the process response is proportional to the stimulus given to it. For example, if you work ten percent longer hours, you would hope to accomplish ten percent more work. This is linear response. Models that assume a process is linear have been extensively studied because the mathematics for such models is relatively straight forward and linear models can adequately represent the behavior of many realistic processes over a useful range of conditions. It is often possible to solve the equations for linear models without the need to use computers. Thus, in the era before the widespread availability of computers, the ease of solution for linear models led to their use even in situation where the real-world process was known to be nonlinear. Many business processes are nonlinear, especially when pressed to extremes. For example, while it may be true that if you work ten percent longer hours you will accomplish ten percent more work, it is probably not true that if you work twice as many hours you will accomplish twice as much work. Many of us have attempted to do this, and have soon suffered from “burnout" leading to a reduction in our working effectiveness. This is a nonlinear response. Similarly, the available production capacity may limit the amount of a product that can be sold, regardless of the amount of sales effort or the degree of customer demand. The capability for readily modeling nonlinear processes is an advantage of simulation over hand calculation methods. With hand calculation, nonlinear situations can be complex to address. With simulation, it is often as straightforward to model nonlinear situations as to model ones that are linear.

FUNCTIONS
Addition, subtraction, multiplication and divi sion are the most common components of equations and are used to define linear (simple) process but sometimes it is necessary to use different types of relationships (to define nonlinear process). Vensim has a number of functions that can be used in equat ions to model nonlinear process.

STEP FUNCTION
Step function is used when a variable begin to flow at a constant value then after some time either it step up or down to another constant value. This function helps us to study stepwise means through several steps. Here we take an example of population in a small town that steadily increases with the passage of time. The figure 1.1 (a) shows the stock “population” increases due to inflow of births. It requires very simple calculations to generate graphs and tables. But the conditions make these situations nonlinear.
1

000 5. Vensim Equations Current Population 20. 40 ) FINAL TIME = 100 INITIAL TIME = 0 population= INTEG (births.000 15.000 0 Births 100 75 50 25 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 50 Time (Month) 100 100 year horizon c. Stock & Flow diagram 1) 2) 3) 4) 5) 6) births=STEP(100.000 10. Equation for births set as a step function as illustrated in equation 1 in figure 1.1 (c) shows that for first 40 years the rate of inflow is constant at zero then increase at a rate of 100 for next 60 years. population birth a.1(b).5000) SAVEPER = TIME STEP TIME STEP = 1 b. the figure 1.Assignment: no: 02 System Dynamics Here condition is that for first 40 years there are no births and after which the number of births per year stay at a constant rate of 100. Population --------------------------------------------------------------------------------------------------------------------------Figure 1.1 Step function 2 .

We use if then else function because situation involves following conditions:    For first 30 years there are no births For another 30 years births stay at a constant rate of 200 For next 40 years many deaths occur due to epidemic disease. Here we take the same above example of population but now the “births” set by using If then else function as according to equation 1 in figure 1.2 (c) give clear picture of situation as it shows from year 31 population start to increase till 60th year then it start to decline till year 100.3000) SAVEPER = TIME STEP TIME STEP = 1 b. 200 .Assignment: no: 02 System Dynamics IF THEN ELSE We use if then else function whenever there is any condition/alternatives. -100 ) ) FINAL TIME = 100 INITIAL TIME = 0 population= INTEG (births. IF THEN ELSE(Time<60. population birth <Time> a. By using if then else function. Vensim Equations 3 . 0 . Stock & Flow diagram 1) 2) 3) 4) 5) 6) births=IF THEN ELSE(Time <30.2 (b) that depends on time so we add a shadow variable “Time” as shown in figure 1. thereby reducing population by 100 every year The figure 1. This function says if “a” then “b” else “c”. This function enables us to switch between alternative formulations based on some condition. we can use different/ same functions (several times) at one time.2 (a).

This function tell us that returns 0 until the start time (start) and then slopes upward/downward (slope) until end time (finish) and then holds constant.000 2.000 7. 4 .Assignment: no: 02 System Dynamics Current Population 10.500 0 Births 200 100 0 -100 -200 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 50 Time (Month) 100 c.3 (a) here situation state that for first 30 years there are no births after which the number of births per year increase by 10 every year. Here in equation 1 of figure 1. Population --------------------------------------------------------------------------------------------------------------------------Figure 1.2 If then else function RAMP Ramp function is used when variable show a flow that is either increasing or decreasing linearly at a constant rate but it is not always constant over time.500 5. We take the same above example of population as shown in figure 1. Ramp function results in parabolic growth not in exponential growth means due to ramp function stock exhibit parabolic growth.3 (b) we set the births by using ramp function because there population is increasing linearly after 10th year as shown by figure 1.3 (c).

000 10.000 30. 100 ) FINAL TIME = 100 INITIAL TIME = 0 (4) population= INTEG ( births. Population --------------------------------------------------------------------------------------------------------------------------Figure 1. 30 .Assignment: no: 02 System Dynamics population birth a.3000) SAVEPER = TIME STEP TIME STEP = 1 b. Vensim Equations Current Population 40.3 Ramp function 5 . Stock & Flow diagram 1) 2) 3) 4) 5) 6) births=RAMP(10.000 20.000 0 Births 800 600 400 200 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 50 100 Time (Month) c.

0078125 b.0) SAVEPER = TIME STEP TIME STEP = 0.4 (a) the stock “no bug level” increase every week due to inflow of “dumping rate” but is reduced/ absorbed by river at absorption rate with delay of 1 week. and lasting for interval (duration) and then repeats this pattern every time (repeat time). During course of week the pollutant is absorbed by the river’s clean-up processes. Suppose ABC Company manufacture the pesticides “no bug” and it dumps a specific quantity of waste material into river once a week. no bug level dumping rate absorption rate a. In figure 1. We take the same above example of “no bug level” and set the equation 2 of dumping rate in figure 1.4 (b) as the pulse function by using pulse train.4 (c) shows that with delay of 7 days. 100 ) FINAL TIME = 100 INITIAL TIME = 0 no bug level= INTEG (dumping rate-absorption rate. 2 . then finally finish at time (end). every week the same cycle of dumping is repeated. 0 ) dumping rate=PULSE TRAIN(1. Stock & Flow diagram 1) 2) 3) 4) 5) 6) 7) absorption rate=DELAY1I(dumping rate. PULSE TRAIN We use pulse train when an event show a cyclical behavior means behavior is repeated again and again after a specified time. Equation 1 in figure 1. Vensim Equations 6 .Assignment: no: 02 System Dynamics DELAY Delay function is used whenever time factor is involved either time involved in perceiving and acting upon information or time involved in processing physical/raw materials. 7 . Pulse train says: starting at time (start). 2 . The graphs in figure 1.4 (b) defines this delay function of absorption process.

No bug --------------------------------------------------------------------------------------------------------------------------Figure 1. Population death births birth normal death multiplier population density average life time area a. Lookups are also referred to as "Lookup Functions. another approach to modeling nonlinear responses is provided by many simulation languages using “lookup functions”." "Lookup Tables. Stock & Flow diagram 7 . With this approach.4 Delay and Pulse train function LOOKUP In addition to buildup functions.5 (b) defines this lookup function." A Vensim model for the Population which uses a lookup function is shown in figure 1.5. We use Lookups to create our own specialized functions. the nonlinear response function (which is death multiplier for this example) is modeled by entering several pairs of points. The inputs to the Lookup are positioned relative to the x axis. which is called death multiplier lookup. When there is large number of observations then we use lookup. Equation 6 of figure 1. Lookup is a list of numbers representing an x axis and a y axis. It allows us to define customized relationship between a variable and its causes. and the output is read from the y axis.Assignment: no: 02 System Dynamics no bug level 600 400 absorption rate 600 dumping rate 450 dmnl 300 dmnl dmnl 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 450 300 200 300 150 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 150 0 1 0 10 20 1 0 10 20 30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 30 1 1 40 1 50 60 Time (Day) 1 1 1 70 1 1 80 1 90 1 100 1 0 40 1 50 60 Time (Day) 1 1 1 70 1 1 80 1 90 1 100 1 0 10 20 30 1 1 40 1 50 60 Time (Day) 1 1 1 70 1 1 80 1 90 1 100 1 no bug level : Current absorption rate : Current dumping rate : Current c." "Tables." "Table Functions." and sometimes "Graphical Functions.

1).(90 0.2.5).5.(800.7).(200.500 1.(700.000 1. Vensim Equations Current Population 1.(500.10)].000 500 0 death 2.(1000.0625 b.0) (1000.2).(400.(0.7).1).5 births=birth normal*Population death=(Population/average life time)*death multiplier death multiplier = WITH LOOKUP (population density.1).(600.4.5 Lookup 8 . Population --------------------------------------------------------------------------------------------------------------------------Figure 1.Assignment: no: 02 System Dynamics 1) 2) 3) 4) 5) 6) area=1 average life time=4 birth normal=1.7).1) 10) population density= Population/area 11) SAVEPER = TIME STEP 12) TIME STEP = 0.000 1.000 500 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 50 Time (year) 100 a.7.000 750 500 250 0 births 2.3.1).(100.1.7).([(0.(300.500 1.5) )) 7) FINAL TIME = 100 8) INITIAL TIME = 0 9) Population= INTEG (births-death.