Previous section-----Next section


StageSwitch[cnum, test1, const1, test2, const2, ... ] can be used in place of a single constraint supplied to SetConstraints. StageSwitch evaluates each of the testi in turn, and applies the consti corresponding to the first testi that returns True.
StageSwitch[test1, load1, test2, load2, ... ] can be used in place of a load supplied to SetLoads.

StageSwitch functions analogously to Which when used with constraints.
• Each of the consti must be Mech constraint objects that have the head SysCon.
StageSwitch produces an error if any of the testi fail to return True or False at runtime, or if all the testi return False.
• When used with load objects, the loadi may be single loads or lists of loads.
StageSwitch applies all of the loadi to the model for which the corresponding testi returns True (unlike the behavior of Which).
• If all of the testi return False, no loads are applied.
• See also: Constraint, Load, TimeSwitch.

Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information