Page 335 - ExtendSim User Guide
P. 335

Tips and Techniques 309
Continuous blocks in discrete event models
☞ Some Value library blocks, such as the Clear Statistics and the Lookup Table, do generate events in a discrete event model because they need to perform a specific action at a scheduled time.
To prevent modeling errors, it is helpful to understand this relationship between Item and Value library blocks. Common situations where this is important include:
1) Settingtime-basedparametersusingconnectionsfromaRandomNumberorLookuptable block. This is described on page 309.
2) VaryinganargumentforaCreateblock’sdistributionwithaLookupTablewherethereis the possibility of a message being ignored. This can cause a lot fewer items to be created than expected, as discussed on page 310.
3) UsingaHoldingTankblocktoaccumulatetheresultofacalculationperformedontwoor more values coming from Item library blocks. If not modeled properly, the Holding Tank can get duplicate messages and will have incorrect results. This is described on page 310.
☞ For a detailed discussion about messaging between discrete event and continuous blocks, see “Value input and output connector messages” on page 319.
Setting time-based parameters using connectors
Some time-based parameters can be set using a connector value. In these situations, the value sent to the input connector must be defined in the time unit specified in the receiving block. The following examples illustrate issues you should be aware of.
Random Number block
Assume you want the delay for an Activity block to be approximately 30 minutes and you con- nect a Random Number block to the Activity’s D input connector. If the local unit of time for the Activity is minutes, you would set the Random Number block to generate numbers with a mean of 30. However, if the Activity block used hours as its local time unit, the Random Num- ber block should be set to generate numbers with a mean of 0.5.
☞ It is a modeling error to expect the Random Number block to create random values at each event in a discrete event model. The only time this Value library block will be activated to out- put a new value is when it receives a message on one of its connectors. In the above example, the Random Number block will get a message each time an item arrives to the Activity block, so each item will get a random delay time. For more information, see “Value input and output connector messages” on page 319.
Lookup Table block
It is possible that the numbers in one column of a block are based on the time unit for that block, and the numbers in another of its columns are based on the time unit for a second block. An example of this is described in “Choosing time units for the columns” on page 123.
Varying a distribution’s arguments
It is common to use another block to specify the arrival intervals by varying the argument (such as the mean) of a distribution in the Create block. To avoid unexpected results, it is important to understand what happens in the Create block when you do this. The Create block’s default behavior is to send a message to the Executive block giving an arrival time, called “nextTime”, for the next item based on the current input parameters. When simulation time reaches nextTime, the Executive block sends a message to the Create block. The Create then releases the item and generates a new nextTime based on the current values of the input
Discrete Event


































































































   333   334   335   336   337