Syntax:
DEACT(<node name>);It is used to deactivate a node, i.e. to suppress the future event that would turn out it active. A typical use is to stop the integration in a C type of node that solve differential equations.
This procedure can be used in nodes of any type.
Examples:
Growth (c) :: Diameter' := KGrowth * (1 - Diameter / DMax) * Diameter; If Diameter > 50 then DEACT(Growth); CREATE(CutMessage) SENDTO(Saw);While the node
Growth
is active, it computes the change in time
according to the shown differential equation (logistic growth).
When the variable Diameter
exceeds 50, the process of integration
is stopped and a message is created and sent to Saw
.
Warning (I) :: IT := Week; SENDTO(Debtor); IF Number > Enough THEN BEGIN DEACT(Warning); ACT(Procedure3, 0) END;The node
Warning
produces messages and sends them to Debtor
.
When the NUMBER of the messages exceeds the value Enough
,
the sending is stopped and the node Procedure3
is activated.