20
1 Tutorial: Table Function Tutorial Student Names: Allen Gbatu Lynette Wilcox Roma Bhatkoti-Barthwal Sarah Altarkit Course: ISE 6024: Advanced Dynamic Modeling Instructor: Dr. Hazhir Rahmandad Term: Spring 2009

Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

Embed Size (px)

Citation preview

Page 1: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

1

Tutorial: Table Function Tutorial

Student Names:

Allen Gbatu

Lynette Wilcox

Roma Bhatkoti-Barthwal

Sarah Altarkit

Course: ISE 6024: Advanced Dynamic Modeling

Instructor: Dr. Hazhir Rahmandad

Term: Spring 2009

Page 2: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

2

Table of Contents

1 INTRODUCTION ................................................................................................................................................................... 3

2 STEPS FOR FORMULATING ROBUST TABLE FUNCTIONS .................................................................................... 4

3 BUILDING TABLE FUNCTIONS IN VENSIM ................................................................................................................. 8

4 CONVERTING A TABLE FUNCTION TO AN ANALYTICAL FUNCTION USING MICROSOFT EXCEL ....... 14

REFERENCES: ........................................................................................................................................................................... 20

LIST OF FIGURES

FIGURE 1: BACKLOG MODEL WITHOUT NORMALIZATION ...................................................................................... 4

FIGURE 2: BACKLOG MODEL AFTER NORMALIZATION (STERMAN, P-554)......................................................... 6

FIGURE 3: TABLE FUNCTION SHAPE PLAUSIBILITY .................................................................................................... 8

FIGURE 4: INITIAL BACKLOG MODEL IN VENSIM ........................................................................................................ 9

FIGURE 5: BACKLOG MODEL WITH TABLE FUNCTION VARIABLE INCORPORATION .................................... 9

FIGURE 6: EQUATION EDITOR BOX FOR TABLE EFFECT SCHEDULE PRESSURE ........................................... 10

FIGURE 7: ENTERING TABLE FUNCTION VALUES USING EQUATION EDITOR .................................................. 11

FIGURE 8: GRAPH LOOKUP FOR TABLE EFFECT SCHEDULE PRESSURE ON CAPACITY UTILIZATION .. 11

FIGURE 9: ENTERING TABLE FUNCTION USING GRAPH LOOKUP EDITOR TABLE ......................................... 12

FIGURE 10: MANUAL DRAWING OF TABLE FUNCTION IN GRAPH LOOKUP EDITOR ..................................... 13

FIGURE 11: SIMULATION OF BACKLOG MODEL WITH TABLE FUNCTION ......................................................... 14

FIGURE 12: TABLE FUNCTION DATA IN EXCEL SHEET .............................................................................................. 14

FIGURE 13: COMPUTING MODEL OUTPUT USING EXCEL ........................................................................................ 15

FIGURE 14: CALCULATING ERROR SUM OF SQUARE USING EXCEL .................................................................... 16

FIGURE 15: GRAPH OF TABLE FUNCTION OUTPUT VERSUS MODEL OUTPUT ................................................. 16

FIGURE 16: ADD-INNS WINDOW ......................................................................................................................................... 17

FIGURE 17: SOLVER PARAMETERS WINDOW ............................................................................................................... 17

FIGURE 18: GRAPH COMPARING TABLE FUNCTION OUTPUT TO ADJUSTED MODEL OUTPUT ................. 18

FIGURE 19: CHANGING CAPACITY UTILIZATION TO AN ANALYTICAL FUNCTION ........................................ 19

FIGURE 20: COMPARISON OF BEHAVIOR OF BACKLOG USING TABLE FUNCTION VERSUS ANALYTICAL FUNCTION ........................................................................................................................................................................ 19

LIST OF TABLE

TABLE 1: VALUES FOR TABLE EFFECT OF SCHEDULE PRESSURE ON CAPACITY UTILIZATION ................. 8

Page 3: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

3

1 Introduction Table Functions (also commonly called Lookup Tables) are typically used in system dynamics modeling to represent nonlinear relationships between two variables. A table function can be defined as a list of numbers whereby input values to a function are positioned relative to the x axis and output values are read from the y axis.( Vensim Reference Manual, 2009) One can use a table function to create a specialized function to represent an arbitrary nonlinear relationship between two variables. By using table functions, a "user can control the shapes, slopes, and saturation points, to accurately represent the nonlinear relationship between two variables [more easily than using complicated analytical functions] [1]. Also, table functions are, generally, easier to interpret and visualize than complex algebraic functions. While table functions are sometimes easier than analytical functions to use in representing nonlinear relationships, there are times when analytical functions are needed in the scope of analyzing the entire model, for instance in determining dynamic equilibrium of a model. In this tutorial we will outline the basic steps for formulating table functions, incorporate an example to further explain these steps, present steps for building table functions in Vensim and finally, we will conclude the tutorial with an overview of steps for converting a table function to an analytical function using Microsoft Excel Outline of the Basic Steps for Formulating Robust Table Functions [2]

1. Clearly Define the input and output

2. If possible and appropriate, Normalize the input and output.1

3. Identify the reference points where the values of the function are determined by definition.1

4. Identify reference policies. Reference policies are lines or curves corresponding to standard or extreme conditions.

5. Consider extreme conditions.

6. Identify the plausible shapes for the function and select the best representative shape.

(a) Use quantitative and qualitative data

(b) Justify any inflection points.

1 It is important to mention that normalization and reference points are arbitrary and can be defined many different

ways. Therefore, it is important for the modeler to be both consistent and conceptually clear with definitions throughout the

model.

Page 4: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

4

(c) Interpret the shapes in terms of the physical constraints and policies of the decision maker. (Sources for this information could be statistical studies, field work, interviews, consideration of extreme events, and physical laws [3].

7. Test your formulation for robustness and plausibility

2 Steps for Formulating Robust Table Functions2 We will use the following model (“Backlog Model”) to demonstrate the basic steps for formulating table functions. The model is taken from Sterman [4]. The Backlog model displays the process of order fulfillment by a firm. The firm receives orders in form of a step function which starts from 100 and becomes 120 after 10 Months. The firm also has an initial Backlog of 300 widgets. The model adjusts the delivery delay according to the target delivery delay (goal) which is 5 Months. In this basic model, we have an opportunity to represent a nonlinear relationship between desired production and shipments.

BacklogShipmentsOrders

DesiredProduction

Target DeliveryDelay

Delivery Delay

+ -

+

+

B

CapacityUtilization

Table Effect DesiredProduction on Shipment

Figure 1: Backlog model without normalization

Model Equations

Equations Units Orders = (STEP (0.2, 10) +1)*100 widgets / Month Backlog = INTEGRAL (Orders – Shipments, 300) widgets Shipment s= f (Desired Production) widgets / Month Delivery Delay = Backlog/Shipments Month Desired production = Backlog / Target Delivery Delay widgets / Month Target delivery delay = 5 Month

2 This section has been adapted from J.D. Sterman, Business Dynamics: Systems Thinking and Modeling for a Complex World,

Irwin McGraw-Hill, 2000, pp. 553-557.

Page 5: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

5

Step 1: Clearly define the input and output Since we want to show how desired production affects the shipments, we logically choose “desired production” as the input to our table function and we will use a created “table effect of desired production on shipments” variable as the output of our table function. Shipments = f (Desired Production) Desired

Production Shipments

Step 2: If possible and appropriate, normalize the input and output Normalization is the process of converting a function’s input and output variables into dimensionless ratios. The general benefit in normalizing table functions is the ability to change the model and examine key variables without having to redesign table functions for each change in a given variable. In our example, the formulation for shipments depends on a given physical constraint of a fixed capacity. A firm cannot produce more than its capacity will allow. With our current formulation, if a client desired to explore options for changing the capacity, we would have to recalculate and redesign table functions for each change in capacity. However, if we normalize our table function, we can make adjustments to the capacity while maintaining correct model behavior.

Therefore, we will normalize the relationship between desired production and shipment by incorporating a few new variables and defining shipments (S) as the product of capacity (C) and capacity utilization (CU). More specifically, we will conceptually define capacity utilization as the extent to which we are utilizing the capacity of the firm, depending upon the shipment requirement and schedule pressure (SP), as the pressure to produce above or below the normal rate or production changes; then we will mathematically define capacity utilization as a function of a newly created variable, schedule pressure; and finally, we will define schedule pressure as the ratio of desired production to capacity. We will assume the capacity is the normal rate of production of a firm (150 widgets per Month).

Equations Units

Capacity Utilization = Shipment / Capacity Dmnl

Scheduled pressure = Desired production / Capacity Dmnl

Capacity = 150 widgets / Month

Capacity Utilization = f (Schedule pressure) Dmnl

Page 6: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

6

The following model displays the arrangement of the newly defined variables:

BacklogShipmentsOrders

DesiredProduction

Target DeliveryDelay

Schedule Pressure

CapacityUtilization

Capacity

Delivery Delay

+ -

+

+

+

+ +

-

+

B

CapacityUtilization

Table Effect SchedulePressure on Capacity

Utilization

+

Figure 2: Backlog model after normalization (Sterman, p-554) Step 3: Identify the reference points where the function values are determined by definition. We define our first reference point at the point where there is no Backlog and the schedule pressure is zero. At this point the firm should not produce anything, since the firm has a build to order policy (no inventories). Therefore making capacity utilization also equal to zero, gives us a reference point (0, 0). This is an extreme condition as well because when schedule pressure is zero shipment should also be zero otherwise the Backlog will become negative.

We have two considerations for our second reference point. First, in our current example, capacity is defined as the normal rate of production of the firm. Based on this definition, if the desired production reaches capacity (schedule pressure = 1), the capacity has to be utilized to its normal level to meet the demand. Therefore, we make capacity utilization equal to one when schedule pressure is one, giving us a reference point (1, 1). We could also consider defining capacity as the maximum rate of production, therefore, making capacity utilization less than one under normal conditions. The schedule pressure would then be defined as Desired Production / (Normal Capacity Utilization * Capacity). The utilization function would pass through a normal point through a reference point (1, Normal Capacity Utilization) and saturates at one [4]. These reference policy options reinforce the concept that while normalization is arbitrary, normalization should still result in conceptually sound arguments for variable definitions.

Page 7: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

7

Step 4: Deciding about the domain and range

Range (all the values that y – Capacity utilization can take) We also need to determine the domain (Schedule Pressure values) and the range (Capacity Utilization values.) Schedule pressure should not go negative. It starts from zero and can rise to infinity, but, schedule pressure function only needs to be specified for values large enough to ensure that capacity utilization reaches a saturation value. This information could be easily gathered from data provided by the firm, however, for our example we will assume that value is 2 and the domain becomes [0, 2].

Domain (all the values that x – schedule pressure can take)

Capacity utilization (CU) saturates at maximum value at larger values of schedule pressure because capacity cannot rise indiscriminately. Let us assume it saturates at a value that is 10% more than normal productivity value (CUmax = 1.1). Therefore, the range becomes [0, 1.1]. Step 5: Identify reference policies We can choose different policies for shipment which will determine the shape of our table function. For example, we could choose to make shipments equal to capacity no matter what the value of the Backlog (CU = 1 would result in a horizontal line at value 1). We could also choose to vary capacity utilization such that they meet the shipment requirements. (CU = SP would result in a line with slope 1 beginning at the point (0, 0)).

For our current example, we will choose to deliver with minimum delivery delay (CU = Smax * SP, where Smax is the maximum slope of the function which corresponds to the policy of producing and delivering with minimum delivery delay. Mathematically, Smax = Delivery Delay/Minimum Delivery Delay. Step 6: Plausible shapes for the table function There are several considerations we should take into account when determining appropriate shapes for table functions.

1. According to our reference policy, the table function table function must lie below the line CU = Smax * SP because orders cannot be shipped faster than minimum delivery delay.

2. The table function must also lie below CU = CUmax which is 1.1 (See Step 3) because capacity utilization cannot exceed maximum capacity.

3. When SP > 1, the firm should not produce less than normal rate nor should it produce more than desired.

4. When SP < 1, the firm should not cut production more than needed. Also, the CU should not be greater than 1.

Page 8: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

8

All these conditions give us a fairly good idea about the bounded region where the table function would lie. After generating the appropriate region it is easy to put in numbers in the table. The graph and the table will look like the following:

Figure 3: Table Function Shape Plausibility

Schedule Pressure

(SP)

Capacity Utilization (CU)

0 0 0.4 0.55

0.66 0.8 0.8 0.92 1 1

1.5 1.079 2 1.1

Table 1: Values for Table Effect of Schedule Pressure on Capacity Utilization

3 Building Table Functions in Vensim In this section we will illustrate steps for building table functions using Vensim. These steps have been adapted from Chapter 8 of the Vensim Reference Manual [5]. We will continue to use our current Backlog Model for this illustration.

Page 9: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

9

Step 1 1. Open the “Backlog.mdl” file. You should see the following model

Figure 4: Initial Backlog Model in Vensim Step 2

1. Click on the “Variable-Auxiliary/Constant” button to create a new auxiliary variable that will serve as our table function. Put this variable to the right of Capacity Utilization and name it “Table Effect Schedule Pressure on Capacity Utilization” and press Enter.

2. Link this variable with an “Arrow” to the “Capacity Utilization” variable.

3. The model should look like Figure 5.

Figure 5: Backlog Model with Table Function Variable Incorporation

Page 10: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

10

Step 3 1. With equations tool selected (Figure 5 above), click on the “Table Effect Schedule

Pressure on Capacity Utilization” variable.

2. The Equation Editor box should appear. (Figure 6)

3. Under “Type” select “Lookup”.

4. In the “Units” field, type “Dmnl” which is an abbreviation for “dimensionless”.

Figure 6: Equation Editor Box for Table Effect Schedule Pressure Step 4: Entering values for the table function. There are three different methods to enter values for a table function:

1. Method 1: Enter the input- output values in the Equation Editor as ordered pairs. 2. Method 2: By entering the input- output values in the table within the Graph Lookup

Editor. 3. Method 3: By manually drawing a function in the Graph Lookup Editor.

Method 1: Create the table function by entering the input and output values in the Equation Editor as ordered pairs.

(a) Using the Equation Editor box, type the following values into the “=” field.

Note—the first two pairs represent minimum and maximum values (respectively) for the function while the other pairs represent rest of the input and outputs values of the table function.

[(0,0)-(2,2)],(0,0),(0.415902,0.552632),(0.666667,0.807018), (0.825688,0.921053),(1,1),(1.53517,1.07895),(2,1.1)]

Page 11: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

11

(b) The Equation Editor box should now look like the following figure. Click “OK”.

Figure 7: Entering Table Function Values Using Equation Editor

(c) Congratulations you have created a table function and are ready to run your model. The behavior of the Backlog variable should look like Figure 11 in the next section.

Method 2: Creating a table function by entering the input and output values in the table within the Graph Lookup Editor.

(a) After finishing Step 3, click on the “As Graph” button in the Equation Editor (above the “Units” tab). The Graph Lookup Editor will appear. (Figure 8 below).

Figure 8: Graph Lookup for Table Effect Schedule Pressure on Capacity Utilization

Page 12: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

12

(b) Click on the left hand “New” value box (as shown in Figure 8 above) and enter the value of the first input (which is “0” in our Backlog example) then press Enter and the cursor will go to the right hand “New” value box.

(c) In the right hand “New” value box enter the value for the corresponding output value (which is “0” in our Backlog example), and then press Enter. You will see that the input and output values will move up to the input/output table.

(d) Now you can enter the rest of the points just as you did for the first point (0,0). Continue typing the rest of the pairs of values like you did with first one.

Note—the pairs are automatically arranged to reflect increasing input values going down the column.

The pairs are: (0.4159,0.5526),(0.6667,0.807),(0.8257,0.9211),(1,1),(1.535,1.079),(2,1.1)

Figure 9: Entering Table Function using Graph Lookup Editor Table

(e) You should see a graph automatically forming for each new value you enter. Once you click “Reset Scaling” (to change the scaling of X and Y axis to match our points), the final graph and table should look like the one above.

(f) Click “OK” in the Graph Lookup Editor.

(g) Click “OK” in the Equation Editor.

(h) Congratulations you have learned a new way to create a Table function, and you are ready to run your model. The behavior of the Backlog variable should look like Figure 11 in the next section.

Page 13: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

13

Method 3: Creating a table function by drawing manually a function in the Graph Lookup Editor.

(a) After finishing Step 3, click on the “As Graph” button in the Equation Editor (above the “Units” tab). The Graph Lookup Editor box will appear.

(b) Set the “X-max” and “Y-Max” to “2” and “1.1” respectively.

(c) Sketch the graph by using your mouse and clicking on the graph to add the points you want. Make sure that the point (1, 1) is in the right spot since it is the reference point. You want to be sure that when Schedule Pressure equals 1 (Desired Production = Capacity) the Capacity Utilization also equals 1. You may also want to make sure that you have the point (0, 0) in the correct spot too, since it is another reference point. Don’t worry about the accuracy of the other points in the graph. The shape of the graph should be correct though. You can control the shape of the graph by dragging the points.

(d) Your Graph Lookup Editor box should resemble the one below (not necessarily exact numbers).

Figure 10: Manual Drawing of Table Function in Graph Lookup Editor

(e) Click “OK” in the Graph Lookup Editor.

(f) Click “OK” in the Equation Editor box.

(i) Congratulations you have learned a new way to create a Table function, and you are ready to run your model. The behavior of the Backlog variable should look like Figure 11 in the next section.

Page 14: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

14

4 Converting a Table Function to an Analytical Function Using Microsoft Excel As mentioned in the introduction, there is some benefit in using analytical functions for modeling nonlinear relationships (namely in finding dynamic equilibrium). Therefore, we will conclude our tutorial with this section which shows how to use Microsoft Excel’s data fitting tools to determine an analytical equation that generates the same curve as a given table function. We will also illustrate how to replace the table function with an analytical function in a Vensim model. Figure 11 shows the initial model simulation of the “Backlog model” with the table function we built. We will use this as a reference to determine whether or not the function we convert is “correct”.

Backlog

600

500

400

300

2000 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

Time (Month)

widge

ts

Backlog : Current

Figure 11: Simulation of Backlog Model with Table Function Part 1: Using Microsoft Excel® to convert a table function to analytical function Step 1: Open Microsoft Excel ® and enter the table function data (See Table 1) [6].

Figure 12: Table function Data in Excel Sheet Step 2: Determine the type of equation that has similar behavior as the table function. Since this table function graph has exponential behavior, we will be fitting to an exponential function of the form:

Page 15: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

15

( ) αcbxxy = Equation 1

Where: 10 <<α b and c are parameters (constants)

However, to determine a more precise data fit, we recommend using more than one term in the equation as this allows Excel more degree for variation in the parameters. For our equation, we will use two terms so the fitting equation then becomes:

( ) αα ec dxbxxy −= Equation 2 Where: 5.0=α

b, c, d, e — are parameters

Note— 5.0=α is an arbitrary choice to start the curve fitting process. Also, the negative sign in Equation 2 can be arbitrarily chosen to be positive as well because Excel has a feature that will change the sign to the correct sign automatically in MS Solver command by assigning the correct sign to the parameters values. Step 3: Enter the fitting equation in the first cell of the spread sheet (it may help to label the data). (Figure 13) Step 4: Set the initial parameters values to “1”, (Figure 13) Enter the fitting equation in the column label “Model”(in cell C5, C6,.. etc), and compute the model output using the initial parameters The “Model” column represents the output of the analytical function which we want Excel to make identical to the table function (tbl fctn) output. Use the $ for the parameter cells to keep it fixed in the equation. The equation for cell C5 will look like this in MS excel.

= ($C$3*A5^($D$3*0.5))-($E$3*A5^($F$3*0.5)) Equation 3

Figure 13: Computing Model Output Using Excel

Page 16: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

16

Step 5: Compute the error between the Model output in Column C and the table function output in Column B by subtracting Column B (B5-B11) from Column C (C5-C11). Enter the difference in Column D, Label Column D “Error”. (Figure 14) Step 6: Calculate the squared of the errors in Column D. Enter the error squared in Column E. Label the Column “Error Square”. Calculate the sum of the error squared. Enter the error squared sum in Cell E12. Label the error squared sum as “Error Square Sum” in Cell D12. (Figure 14)

Figure 14: Calculating Error Sum of Square Using Excel Step 7: Create a Graph showing the table function output and the Model output. (Figure 15 below)

TBL FCTN Conversion

0

0.2

0.4

0.6

0.8

1

1.2

0 0.5 1 1.5 2 2.5

Input

Out

pu TBL FCTNMODEL

Figure 15: Graph of Table Function Output versus Model Output

Page 17: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

17

Step 8: Use the “Solver” command in MS Excel to minimize the sum of the squared error. The “Solver” command is under “Tools” on the menu bar. If the “Solver” command is not included in the “Tools” list, then you can use the “Add-Ins” command to add it. Click “Tools”. Go down to “Add-Ins” and click on “Add-Ins”. The “Add-Ins” window opens. Check the Solver “Add-In” and click “OK”.

Figure 16: Add-Inns Window Step 9: Place the cursor on Cell E12 to select the sum of the error squared. Open the Solver command. The Solver window opens. The window title is “Solver Parameters”. Ensure that the address of the sum of the error squared is in the “Set Target Cell” cell. Set the “Equal To” cell to “0”. Click the “Value Of”. In the cell, “By Changing Cells”, enter the parameters cells addresses. Click “Solve”.

Figure 17: Solver Parameters Window The Solver Result window will open. Ensure that “Keep Solver Solution” is selected. Click OK.

Page 18: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

18

Step 10: Create a graph of both the table function output and the adjusted Model output versus input.

TBL FCTN Conversion

0

0.2

0.4

0.6

0.8

1

1.2

0 0.5 1 1.5 2 2.5

Input

TBL FCTNMODEL

Out

put

Figure 18: Graph comparing Table Function Output to Adjusted Model Output

Therefore the analytical function for this table function is

( ) αα ec dxbxxy −= Equation 2 Where:

α 0.5 b 3.0551285 c 2.09781386 d 2.06775926 e 2.680999

The equation is approximated as:

( ) αα 681.2098.2 068.2055.3 xxxy −= Equation 5 Where: 5.0=α Part 2: Using Analytical Function in Vensim Model Step 11: Replace the table function, “Table Effect Schedule Pressure on Capacity Utilization”, with the analytical function in Equation 5 above. The equation for the variable, “Capacity Utilization”, is rewritten as:

Page 19: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

19

( )( )( )( )⎥⎥⎦

⎢⎢⎣

×−

×=

α

α

681.2

098.2

Pr_068.2Pr_055.3

_essureSchedule

essureSchedulenUtilizatioCapacity Equation 6

Where: 5.0=α

Figure 19: Changing Capacity Utilization to an Analytical Function Step 12: Run the Model with the new equation and compare the result.

Backlog

600

500

400

300

2000 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

Time (Month)

wid

gets

Backlog : Analytical Fctn Backlog : TBL FCTN

Figure 20: Comparison of Behavior of Backlog Using Table Function versus Analytical Function

The analytical function graph is the blue graph and the table function is the red graph. In this case both graphs have identical behavior. However, the analytical function equilibrium value is slightly higher than the table function. This happens because the sum of the error squared during the conversion was not exactly zero.

Page 20: Tutorial: Table Function Tutorial - System Dynamics Lab ... · Tutorial: Table Function Tutorial Student Names: Allen Gbatu ... 1 INTRODUCTION ... definition.1 4

20

References: [1] L. Lei and N. Choge, A Table Function Example, January 2001. [Online]. Available:

http://sysdyn.clexchange.org/sdep/Roadmaps/appendix/D-4865.pdf. [Accessed April 15, 2009].

[2] H, Rahmandad, Formulating Table Functions, Spring 2009; Session 7, Slide 8

[3] J.D. Sterman, Business Dynamics: Systems Thinking and Modeling for a Complex World,

Irwin McGraw-Hill, 2000, pp. 553 (Table 14-1).

[4] J.D. Sterman, Business Dynamics: Systems Thinking and Modeling for a Complex World,

Irwin McGraw-Hill, 2000, pp. 553-557.

[5] Vensim Reference Manual, Version 5, User’s Guide, Chapter 8 Building a Function with

Lookups. [Online]. Available: http://www.vensim.com/documentation/. [Accessed April 15,

2009].

[6] Data Fitting Using Excel. [Online]. Available:

http://www.chemistry.nmsu.edu/studntres/chem435/Assignment/fitting.html. [Accessed

23 April 2009].