Page 118 - ExtendSim User Guide
P. 118

92
Concepts, Tips, and Techniques
Simulation order
model, described in the “Tutorial” on page 65, has feedback and uses a smaller delta time, so the inputs to the Holding Tank must be integrated.
Simulation order
The Run > Simulation Setup > Continuous tab allows you to choose the order in which ExtendSim executes block data for continuous models. (Simulation order is also used by a dis- crete rate system to determine initial bias order settings for Merge and Diverge blocks.)
The choices are Flow order (the default), Left to right, and Custom. To see the order in which blocks are executing, select the command Model > Show Simulation Order before the model is run.
☞ It would be unusual to change the simulation order from the default choice, Flow order.
Flow order
During a simulation, the blocks that compose an ExtendSim model perform calculations that generally depend on their inputs. After doing their calculations, the blocks set their output con- nectors to the results of that calculation so that other blocks may use their results.
In this type of system, there has to be a “first” block: a block that calculates before all of the others that depend on its results. After the first block calculates, the other blocks should calcu- late in the order and direction of their connections. This order is repeated for every time step of the simulation. To see this order, choose Model > Show Simulation Order.
The following are the rules that ExtendSim uses to derive the order of the block calculations in continuous models:
• Blocksthatgenerateinputstothesimulationgofirst.Forexample,LookupTableorCon- stant blocks with only their outputs connected to inputs of other blocks would be put first.
• Next, ExtendSim executes blocks that are connected to those first blocks, in the order and direction of their connections.
• Unconnected blocks and bi-directional network blocks (that have only inputs connected to inputs) are executed in left-to-right order.
☞ The Feedback block (Utilities library) is useful when there are flow-order issues due to feed- back in a continuous model.
Left to right order
‘Use caution when changing from Flow order.
If you choose this option, ExtendSim looks at the left/top corner of each block on the work- sheet. The left-most block gets executed first, and the next left-most block gets executed sec- ond, and so on. Blocks with equal left edges get executed in top to bottom order. If your model flows to the right, and then continues at the left below that flow, this choice will still calculate all the left-most blocks first. If you use this order, be sure that blocks that calculate values are to the left of the blocks which need those values. Otherwise, there will be a one step delay in calculating the values.
Custom order
‘Use caution when changing from Flow order.
In continuous modeling, there are some situations with multiple feedback loops that do not automatically settle into the desired flow order solution. This occurs because there are multiple
Continuous


































































































   116   117   118   119   120