Page 336 - ExtendSim User Guide
P. 336

310 Tips and Techniques
Continuous blocks in discrete event models
parameters. For the period of time between releasing items, the Create block will not react to changes in the input parameters. If the inputs change drastically, this can cause unexpected results as shown in the following example.
Lookup Table example
Assume you connect a Lookup Table block to the mean input connector of a Create bock, varying the interarrival mean according to the schedule in the table at right.
For this example, both the Time and Output 1 columns
of the Lookup Table block are defined using hours as
the time unit. The mean for the interarrival time is 12
hours except for the period between hours 6 and 14
where the mean is 0.5 hours. Because the mean is only an average, it is possible for the Create block to generate an item at time 0 with an arrival time of 14 or more. If that happens, the Cre- ate block will get the message that the mean should have changed to 0.5 between hours 6 and 14, but it will ignore it. In this case, the number of arrivals will be much less than expected.
The Options tab of the Create block has a check box labeled Interarrival time changes occur immediately. When checked, it will cause the Create block to immediately respond to changes to any input parameter. In the case of the above example, the Create block would rec- ognize that the mean had changed from 12 to 0.5 at time 6. It would then generate a new ran- dom number for the arrival time using the new input values.
Using the Holding Tank block to accumulate values
When accumulating data in a model, it is important to not make the error of assuming that you can add attribute values and then accumulate them.
Incorrect approaches
Assume you want to accumulate the sum of two attri- bute values. Your first intuition might be to add the two attribute values together and send the result to a Holding Tank block (Value library).
Two incorrect approaches to do this are shown at right. In the first case the attribute values are obtained from two Get blocks; in the second case the attribute values are captured from one Get block. In both cases the Holding Tank will give incorrect results.
Incorrect approach #1
Lookup Table’s table
Each time an item passes through a Get block, a message is sent out each value output connector. The way this been con- structed, the passing of one item will result in two additions being contributed to the Holding Tank block.
Attributes Error model
The Attributes Error model illustrates the modeling problem
and some potential solutions. The problem with this model is
clear if you look at the numbers, 11 and 42 respectively, displayed by the Exit and Display Value blocks. Since the values of attribute A and attribute B are both 1, the accumulated total
Incorrect approach #2
Discrete Event


































































































   334   335   336   337   338