Page 220 - ExtendSim User Guide
P. 220

194 Processing
Interrupting processing
stant value or a random number. A shutdown can also be used to block the entry of additional items while the shutdown is in effect.
SD input connector
Once shutdown is enabled in the Shutdown tab, the SD universal input connector appears on the Activity’s icon. It is common to connect from a Create or Shutdown block to the SD input but connections can be made from other blocks as well. The input to the SD connector can either be a value connection or an item connection, depending on what is selected in the Shut- down tab. The type of connection to the SD input determines both which items are shut down and for how long:
• Value connection. This acts like an on/off signal. The entire block will be shutdown when- ever a true (0.5 or greater) value is received at the SD input. This suspends the processing of all items in the block and stops new items from entering it. The Activity will stay shut down until the SD input gets a false (less than 0.5) value.
• Itemconnection.Whena“shutdownitem”arrivesattheSDconnector,theActivitywillshut down the item or items currently being processed, as specified by the shutdown options dis- cussed below. The duration of the shutdown is determined by an item’s attribute or quantity as specified in the Shutdown tab; the value of that property on the shutdown item determines how long the shutdown will be in effect.
The Create block is used to schedule the shutdown for the “Scheduled Shutdown model” on page 195; the Shutdown block provides random shutdowns for random durations for the “Ran- dom Shutdown model” on page 197.
Shutdown options
As discussed above, shutdown occurs when a signal is received at an Activity block’s SD (shutdown) input. Settings in the block’s Shutdown tab determine which items currently in processing will be shut down. Depending on whether the shutdown signal is sent by a value or an item connector, the shutdown options are:
• All items currently in processing
• Arandomlychosenitem
• Items whose attribute matches the attribute at SD • Entireblock
The first three choices are only available if an item connector is connected to SD; “Entire block” is only available, and is the only option, if a value output is connected to SD. If “Items whose attribute matches the attribute at SD” is selected, the Activity looks up the specified attribute value on the shutdown item. The Activity then searches all items currently in process- ing, and any of those items with an attribute value equal to the one on the shutdown item will be shutdown.
Item options
Once a shutdown is in affect, the shutdown items are handled in one of four ways, as specified in the Shutdown tab of the Activity’s dialog:
• The item can be discarded, such as when food is spoiled by the machine going down. • TheActivitycanresumeprocessingtheitemaftertheshutdownends.
• AnActivitycanrestartprocessingtheitemaftertheshutdownends.
Discrete Event

   218   219   220   221   222