next up previous
Next: REPORT allows to write Up: INSTRUCTIONS Previous: REL takes a message

RELEASE manages the message released in a R type node

Syntax:

    RELEASE / ALL / <associated instruction>;
This instruction is used to manage the messages that abandon the IL of a R type node, when the scheduled time is over. It is used when the default disposition of the message is not desired. The user may program a different procedure in the <associated instruction>. This may includes changes in the fields, conditional sending to different nodes, and a NOTFREE instruction to inhibit the freeing of the used resource. It may also contain common GLIDER instructions and procedures, but their associated instructions must not contain GLIDER instructions with associated instructions.

The instruction, when it is used, must be the first in the code of the node. It is executed only if the node is activated by an event. The execution is not repeated during the scanning of the network.

When the instruction is executed, a scanning of the IL starts, looking for a message with the exit time of the IL (that is recorded in the field XT). If such a message is not found, an error condition occurs. If it is found, its fields are passed to the corresponding field variables and the <associated instruction> is executed. This instruction must execute a SENDTO instruction to dispose of the message.

In the process (unless NOTFREE is used) a quantity of resource is freed that is equal to the value of the USE parameter of the message. So, the variable F_<node> is increased by USE and U_<node> is decreased by USE. If the capacity of the resource is the constant MAXREAL, the resource is considered of infinite capacity and no change in those variables is made.

If the ALL parameter is used, the search for other messages with the same XT continues until all of them are processed.

This instruction can be used in R type nodes.

Example:

       Physician (R) ::
        RELEASE BEGIN Revised := TRUE; SENDTO(Treatment[Disease]) END;
        STAY:=TRIA(4, 6, 9);
Messages (patients) that leave the node Physician after completing its scheduled time of attention (given at the entrance by the instruction STAY) are tagged putting TRUE its field Revised. Then they are sent to one node of the multiple node Treatment according the value of their field Disease.

See examples 9 and 13 (GLIDER examples book).


next up previous
Next: REPORT allows to write Up: INSTRUCTIONS Previous: REL takes a message

domingo c
Mon Mar 20 17:36:19 PST 2000