Table of Contents

Table of Contents

Multi-compartment loading controller

Multi-compartment loading controller

Overview and Key Concepts

The Multi-compartment loading controller coordinates the loading or unloading of multiple loading arms, usually in the case of items (vessels, trucks, ...) with multiple FloWorks tanks. Its intended use is as the loading controller of a loading point.

When a vessel only has one compartment, you usually create one or more loading arms, and select one of them to be the loading controller in the properties of the berth or loading point. The loading arm then controls when the (un)loading process is complete by listening for the events of the transporter's tank, and notifies the loading point when the transporter can be released. When you have multiple loading arms, for example because the vessel has multiple compartments that you want to unload simultaneously or sequentially, the transporter should not listen for the signal of a single loading arm. Instead, all loading arms should report that they are ready before the berth can release the item. The multi-compartment loading controller's purpose is to play this coordinating role. You attach it to the loading point instead of a single loading arm, then connect the loading arms to the multi-compartment loading controller.

The loading or unloading strategy of the multi-compartment loading controller consists of a number of steps, that will be executed consecutively. In each step, you can select one or more loading arms in the model, that will all be given the order to execute their (un)loading operation simultaneously. Which tank they will (un)load and to which level, is determined by each loading arm. Only when all the loading arms in a step report that they have completed the operation, will the multi-compartment loading controller continue to the next step. When all the steps are complete, the berth or loading point is signalled that the vessel has been fully (un)loaded and that it can proceed to the post-processing step (if applicable) before releasing the vessel.

The loading arms in each step can be referenced directly, for example by name or by using an object sampler, but the more common set up is to connect the loading arms to the multi-compartment loading controller by center port ('S') connection and then using the pick options provided by FloWorks to select one or more of these arms for every step. A typical model with a multi-compartment loading controller then looks as follows:

An example model with a flow vessel with four compartments, and a multi-compartment loading controller that controls four loading arms to unload each product to an appropriate tank. Note that the berth has a center port connection to the loading controller so it can reference it; the loading controller has center port connections to three loading arms but references one loading arm explicitly by name.


The multi-compartment loading controller has a minimal set of events: On Reset, On Message and On Draw. These are described on the FloWorks Triggers page. Note that all other events described on that page are not applicable since on flow actually goes through the multi-compartment loading controller.


The multi-compartment loading controller does not have a FloWorks state profile as it is not a flow object, and does not keep any statistics on its primary state profile. In most cases statistics on the loading and unloading process are probably best tracked on the berth or loading point, or on the individual loading arms.


The item to flow object has three tabs with various properties. The first three tabs are standard tabs that are common to all flow objects. For more information about the properties on these tabs, see:

The last three tabs are the standard tabs that are common to all fixed resources. For more information about the properties on these tabs, see:


On the Settings tab, the consecutive steps in the (un)loading process are defined. Steps can be added using the Add button and removed using the Remove button. They can be re-ordered by grabbing them by the beveled grip to the left and dragging them to the desired position. Steps will be executed from top to bottom, only starting the next step when all loading arms in the previous step have completed their operation.


Each step can be given a name. This name is not relevant for the operation of the multi-compartment loading controller, they are purely to help you quickly identify the purpose of the step, for example: "Load all compartments" or "Load Product A and B simultaneously".


In the condition field, you can specify an expression that is evaluated for every executer immediately before the step will be started. When the expression evaluates to false, the step will be skipped for this transporter. By default steps are always executed. A common use case for this field is a model with multiple vessel types, carrying different products. In this case you can create a step for each product type, and skip the steps for the vessels that do not have a compartment for that product based on the item type.


The controller option determines which loading controller(s) need to be activated in the current step. This trigger code returns a reference to a single object in the model, or an array of objects. All objects in the array that are not valid loading controllers are ignored, so you can safely return all center objects here, even if one of them is a berth or loading point.

The default options in the list that allow you to select one or more loading controllers by name or center port index are as follows:

  • Object connected to a center port: allows you to select a single center port number and use the object connected to it as the loading controller.
  • Center port by case: Depending on the value of an expression, such as a label or item type, you can select a single center port object.
  • Direct reference: Allows you to directly reference an object in the model, for example model.find("LoadingArm1"). You may use the object sampler to easily find an object in the model.
  • Loading Controller By Name: Brings up a selection panel that shows all valid loading controllers in the model and allows you to select one or - using the Control key while clicking several options - more.

The following options allow you to quickly select multiple loading controllers connected to center ports of the multi-compartment loading controller:

  • All valid center port objects: Activate all loading arms, connected to the center ports of this controller, ignoring any objects that are not valid loading controllers such as the berth or loading point.
  • Range of center port objects: Enter the lower and upper index of a range, and activate all the loading arms connected to center ports in this range.
  • Array of center port objects: Enter a comma-separated list of center ports. In contrast to the range option above, the array can have gaps, for example center ports 1, 2, 3, 5, 6, 8.