Page 403 - ExtendSim User Guide
P. 403

Rates, Constraints, and Movement 377
Defining a critical constraint
• AcriticalconstraintmayalsobeimplicitlyspecifiedundercertainconditionsbytheMerge and Diverge blocks.
The next sections describe how to set a critical constraint. See also “Meeting the critical con- straint requirement” on page 380 for examples of how to apply the constraint requirement in your models.
The Valve is the block most often used for explicitly setting a critical constraint. You can enter a value in the maximum rate field in the block's dialog, link the field to an ExtendSim database or global array, or con- nect the block’s R (maximum rate) input connector to some value output.
Defining constraints for Valve
For an example of setting a fixed maximum rate for
the Valve, see “Entering dialog parameters and settings” on page 335.
Dynamically changing the maximum rate
There are two ways to change a Valve’s maximum rate during a simulation run:
• Connecttotheblock’sR(maximumrate)inputconnector
• Link the block’s Maximum rate field to an ExtendSim database or global array
Connecting to the Valve’s R input connector or linking its maximum rate field to a data source overrides any values directly entered in the maximum rate field. Instead, that field will display the current maximum rate as determined by the simulation run.
☞ The checkboxes for “Initial maximum rate” and “Poll constraint every”, discussed below, are only used when the Valve's maximum rate is configured to change dynamically.
For an example of using the Valve’s R input connector to cause the maximum rate to change dynamically, see “Add a dynamic constraint” on page 336.
☞ As you saw in “Add maintenance” on page 338, the “Add Shutdown” button in the Valve’s dia- log automatically connects a Shutdown block (Item library) to the Valve's R input connector. This can be used to stop the flow, or reduce its rate of movement, for a period of time. See also “Shutting down” on page 193 for a description of how to use the Shutdown block.
Initializing the maximum rate
When the Valve’s maximum rate is configured to change dynamically, the Initial maximum rate checkbox serves an important role. This is because the first effective rate calculations for a simulation occur just before simulation time starts moving forward. If the Valve’s R connec- tor is connected or if the maximum rate field has been dynamically linked, problems can arise at this stage because neither the block connected to the R connector nor the linked data source has yet had a chance to provide an initial value. The Initial maximum rate checkbox resolves this issue by initializing the maximum rate.
The initial value entered in the dialog will be used until the Valve gets a different value from its R input connector or from the linked data source.
☞ For multiple runs, the Initial maximum rate checkbox prevents the Valve from using the last maximum rate from the current run as the initial maximum rate for the next run.
Discrete Rate

   401   402   403   404   405