6 EXERCISES IN SYSTEM DYNAMICS MODELING WITH DYNAMO
This chapter provides exercises in simple modeling. The exercises emphasize the use of levels and rates in modeling the material flows, and the development of information flows to define the rates.
Exercise 6.1 A Compressor Problem
A simple Stock/Flow Model for manual, spreadsheet, and microcomputer simulation.
An air compressor's holding tank is empty. Its capacity is the equivalent of 50 cubic feet of air, which occurs at the maximum pressure level of 100 psi. When empty at normal pressure (sea level) of 15 psi, it holds 2 cubic feet of air.
The compressor pumps air into the tank at a per minute rate proportional to the difference between its maximum pressure and the current pressure. The constant of proportionality is .4 -- at any instant the flow rate into the tank is 40 percent of the difference between maximum volume and actual volume.
E6.1.1 (A) Draw a stock/flow diagram of this system using pressure as a level.
(B) Write DYNAMO equations for the volume system.
(B) Calculate the same variables using an electronic spreadsheet.
(C) Calculate the variables using DYNAMO on a personal computer, but make LENGTH = 20.
This example provides an introduction to the use of tables, delays and functions, including logic functions, in an easily conceptualized example of two dams forming reservoirs along a river basin.
The two dams prevent sudden flood damage, and also retain water for irrigation. A river provides the inflow to the first reservoir. The river's flow emanates mostly from springs and melting snow, but, on occasion heavy rains augment the flow. There has been no rain for 30 days, and the normal river flow without rain is 50 million cubic feet of water per day. The first reservoir holds up to 4000 million cubic feet (mcf) of water when full, but currently contains 1000 mcf. The second reservoir has capacity of 6,000 mcf, and now contains 2000.
The dam has a series of outflow pipes placed in a vertical row along the center of the dam. The outflow from the first dam is always about 5 percent of the volume of water in the reservoir. It takes about 2 days for water flowing out of the first dam to reach the second reservoir.
If the second reservoir is below 500 mcf, there is no outflow. An outflow pipe near the base of the dam allows a constant outflow of 55 mcf per day when the level exceeds 500 mcf. A sluice valve drains 10 percent of any volume beyond 3000 mcf per day.
At time 0 it begins to rain in the high country above reservoir one. The rainstorm lasts two days, and a meteorologist predicts the increase in water inflow to reservoir one due to these heavy rains will be the following:
TIME (DAYS) EXTRA FLOW RATE (mcf/day)
The intent is to model the dynamics of the reservoir levels after a rainfall above the first dam.
E6.2.1 Draw a stock/flow diagram of this system's conservative components and the material flows through them.
E6.2.2 (A) Complete the stock/flow diagram by adding the information links and auxiliaries.
(B) Explain each information link in your diagram.
E6.2.3 Write DYNAMO equations for the system modeled.
E6.2.4 Using your intuition, describe the behavior you expect of the water levels of the two reservoirs over time.
E6.2.5 Simulate your model on a computer to determine the actual system behavior.
Exercise 6.3 Population Growth
This exercise provides additional modeling practice including the use of the log-linear function.
A population of 200 organisms exists at time 0 in a laboratory enclosure of fixed size. The population's birth rate is 0.5 births per organism per week. The death rate depends on population crowding. Currently (at time 0), the average life expectancy of each individual organism is 4 weeks, but each time the population increases 25%, life expectancy is reduced by 15% due to crowding.
E6.3.1 Use your intuition to consider what happens to this population over time:
(A) Will it grow, shrink or oscillate?
(B) Will it stabilize to a steady state? Why or why not?
E6.3.2 (A) If it stabilizes, can you guess its steady state level?
(B) Can you quantitatively calculate its steady state value?
(C) Comment on the mathematical complexity of your solution.
E6.3.3 Now consider this as a system simulation problem.
(A) What level or levels apply in this system?
(B) What rates of flow would you model?
What auxiliaries would you add to the model?
(C) Draw a stock/flow diagram including just the material stocks and flows.
E6.3.4 Complete the stock/flow diagram of the system by adding auxiliaries and information links.
E6.3.5 (A) Develop a table function approximating the relationship between life expectancy LE and population POP.
(B) Discuss the two forms (analytic and tabular) as to their advantages and disadvantages in modeling.
E6.3.6 Write DYNAMO equations defining your system.
E6.3.7 Using a DT of .5 (weeks), manually calculate three weeks of simulation for this model.
This exercise requires considering the proper time units to index the simulation, and the relationship between the time step DT and the time units selected.
Telecommunications center "A" transmits messages to communications station "B". Assuming there is only one means of electronic communication, and that all message traffic is of the same precedence, try to model the problem of communication between the two sites during a period of heightened activity. Message traffic originates from the following sources: first, activity near A causes reports to be prepared at A and sent to B for delivery to decision makers near B. Then, messages from B's decision makers (based on the information received from A) cause replies to be prepared and sent back to A. These replies request more information or provide orders to the decision makers at A.
Assume the following. Messages received (at either site) can be processed at a maximum rate of 1 message per minute by radio technicians. Each of the five decision makers at A and each of the two at B can analyze as many as ten incoming messages per hour. One-half of all incoming messages require replies, and outgoing messages can be prepared and transmitted at a rate of 1.5 messages per minute. Assume no delay in the transmission itself, and no errors in transmission. Then assume that the activity at A requires the following original A to B message rate per minute when the time after problem start is:
time (hrs): 0 1 2 3 4 5 6 7 8
msg rate : 0.1 2.0 3.0 2.5 2.0 1.0 0.1 0.1 0.1
The main concern is to understand the message delays and backlogs to anticipate when a surge in activity occurs at A, and to determine ways to control these delays and backlogs.
E6.4.1 (A) Simulate this process using system dynamics. Provide a stock/flow diagram and associated DYNAMO equations. Prevent negative values for traffic flow and backlog levels. Run the simulation for two days. Assume no backlog exists at time zero.
(B) What policy recommendation might you make to reduce delays?
(C) What is the approximate maximum time between a transmission from A, and its original analysis by decision makers at B?
This exercise develops model conceptualization, program debugging, and an introduction to policy analysis.
The Slobodian state controlled distribution system for SCHLITZSKY beer consists of a retail store and brewery, each managed independently under a centralized inventory policy. The retail manager is told to keep his inventory at about a thousand cases. He has no experience in inventory control, and tries to keep 1000 cases in stock by each day sending an order to the brewery for one-half as many cases as he is short of 1000. Each order takes five working days to arrive at the brewery. The brewery manager, on receiving an order form the distributor immediately sends the beer, (assuming he has it), from brewery inventory. It takes ten working days for the beer to arrive at the retail store. The brewery manager tries to keep 1000 cases in inventory and each day orders the brewery to produce one-fourth as much beer as the brewery warehouse is short of 1000 cases. The brewery takes 15 days to produce beer once it is ordered to do so.
Each of the two inventories (retail and brewery) starts at 950, and retail sales average fifty cases per day. There are 750 cases in production at the brewery. Orders for 250 cases are in the mail enroute from retailer to brewer, and orders for 50 cases have been received by the brewer, but not filled.
E6.5.1 Draw the conservative (material) flows in the system (hint: there should be two types of "material" flowing, beer and orders).
E6.5.2 (A) Add information flows to the diagram.
(B) Model the beer production/distribution/sales process in DYNAMO code. Assume no beer is on order, either at the retailer or the brewery, at the start of the simulation. Initially, do not constrain any of the model variables. For example, do not restrict sales to be non-negative and also less than inventory.
(C) Determine the initial conditions for the model levels that put the model in equilibrium from time zero. Comment on this equilibrium. Is it stable?
LIMO, Inc. has assets (undepreciated) of $500,000 in limousines, plus $100,000 of liquid assets (retained earnings). Limos last on average 5 years before being scrapped at zero value. For now, there is no delay between ordering new cars and their delivery. The assets are maintained by LIMO, Inc., but often maintenance is deferred, and maintenance backlogs build up. The term "maintenance" is used to include "repairs".
Revenues are obtained by leasing limos, but only operating cars can be leased. Annual revenues average 40 percent of the "ready" assets of the limo fleet, the ready assets are a function of the maintenance backlog MBLOG. The fraction of assets ready to be leased have been estimated to be, in value terms,
5 4 3
Readiness Fraction (RF) = 1 - (6X - 15X + 10X ); 0#X#1
where X is (10*MBLOG)/assets.
The current maintenance backlog is $20,000. The backlog is decreased by expending funds on maintenance, and by natural decay of the backlog as cars are scrapped. Since the cars most likely to be scrapped are the oldest cars with the largest repair needs, it has been determined that the decay in maintenance backlog is 50 percent greater than the proportional rate of depreciation (the scrap rate) of assets. In other words, if 20 percent of assets are to be retired this year, then about 30 percent of the maintenance backlog will also be retired.
The annual maintenance requirement (or demand) averages about 5 percent of total assets. This is in addition to the outstanding backlog. The expenditures on maintenance supplied can be anything from zero to the entire backlog, and the proportion of the backlog to be funded is a policy variable open to management.
E6.6.2 (A) Model this problem. Show a stock/flow diagram and DYNAMO equations. Assume all maintenance is performed as it occurs.
(C) Rerun the model for 25 years assuming 85 percent of all maintenance demand is funded. What do you observe when comparing the two runs?
E6.6.3 What would be involved in trying to "optimize" this model if optimization meant having the maximum net value of total assets at time 25 (that is, assets value less maintenance backlogs) and the only policy variable was the fraction of total outstanding maintenance to be funded?
This refinement of exercise 6.6 incorporates non-linearities, present values, and inflation into the previous model.
Management reviews the LIMO model results, and sees that with maintenance funded at a high level, the firm's assets will eventually grow exponentially. However several major concerns are expressed by the CEO. First, the increasing demand for limos city-wide will lead to delivery lags in procurement. In fact the delay is already estimated to be two years, (yet the manufacturer still demands full payment at the time of ordering). There are $20,000 worth of limos currently on order. Second, if the firm grows, the revenues will not remain at 40% of available assets, because in our small city there is only a small market growth potential, and the expansion will partly saturate the market. Third, there may be increasing maintenance costs, as the firm's maintenance facilities can only handle up to $1 million dollars worth of assets, and any maintenance beyond that must be contracted out. Fourth, the CEO want you to provide future fund flows in inflated dollars, rather than constant dollars (5% inflation is predicted), and wants you to provide your alternatives in terms of net present value, using an 8% assumed real discount rate.
The sales department analyst offers that while 40% was a good assumption for return on operating asset value when assets were $500,000, competition has increased, and market saturation estimates now seem to indicate that the return will be only 30% when assets are $2,000,000 and 22.5% when there are $4,000,000. In fact they will decrease by 25% everytime the firm doubles it's assets. The maintenance manager, meanwhile, advises that it costs five times as much to contract out maintenance as to do it in-house.
E6.7.1 Incorporate these modifications into the model developed in Exercise 6.6.