Font size


Defines the end of the flowchart branch modeling the task for the resource unit(s) that have just being released (usually it is a wrap-up process). The wrap-up task’s flowchart branch starts at the lower port of the block that has released the resource(s) (Release) and ends with the ResourceTaskEnd block. The agent can instantly go to the next block in the flowchart, while the released resources will become available only after completion of the wrap-up task.


Demo model: Emergency Department Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).

In the given demo model you can find examples of the preparation and wrap-up tasks. You will find them in the custom USoundProcess agent type, which defines the process of ultrasound examination. For the ultrasound examination, an ultrasound device has to be brought by an ultrasound technician. If you take a look at the flowchart, you will see that patient seizes a technician (in the seizeTech block). When this happens, the resource preparation process starts, since this block has a connection to a flowchart branch via its lower port. The resource preparation flowchart always starts with the ResourceTaskStart block. There we specify the particular resource we define this subprocess for (here it is technician). Here the preparation subprocess consists of the seizeUSound block (seizes the ultrasound device), takeUSound MoveTo block (technician moves to the seized device) and attachUSound ResourceAttach block (attaches the ultrasound device resource to the technician resource). The preparation subprocess ends when the connector goes into the lower port of the Seize block that initiated this task. Since this Seize block has the Send seized resources option selected, the technician will finally bring the ultrasound device to the patient that requested it.

After the examination (the Delay block doUSound), the releaseTechUSound Release block follows. It releases the specified resource (technician) and starts the wrap-up subprocess (since another flowchart branch is connected to its lower port). The technician moves to the home node of the seized usound (block moveTo) and releases this seized resource upon arrival (block release). The wrap-up process always ends with the ResourceTaskEnd block.


Move resource to its home location
If selected (true), the resource(s) will be moved to their home location on finishing the task.
Value type: boolean
Default value: true
Local variable: unit — the resource unit.
Release resources seized by this unit
If selected (true), the resources seized by this resource unit, will be released.
Value type: boolean
Default value: true
Local variable: unit — the resource unit.


On exit
Code executed when the resource unit exits the ResourceTaskEnd block.
Local variables:
unit — the resource unit.
Agent agent — the agent which was serviced before this wrap up.
On remove
Code executed when the resource unit is intentionally removed from this block by calling the unit’s function remove(). This code is automatically executed after the remove() function call.
Local variable: unit — the resource unit.


Function Description
long count() Returns the number of resource units passed through this block.


The input port.
How can we improve this article?