FloWorks Concepts

Events

The following sections explain important considerations related to flow object events. For information on events, see the Event Listening page.

On Reset

This function is called when the model is reset. You usually use it to initialize the object to a known state. Note that when you dynamically change an object's parameters (such as the product type or maximum flow rate) during a model run, they are not reset to their previous values by default. If you have such behavior in the model, use the On Reset trigger to set these parameters back to their initial value, otherwise your model will give different results on every run, depending on the point at which you stop and reset it.

On Message

This function is called on an object when another object sends a message to it using the sendmessage() or senddelayedmessage() commands.

On Empty

This function is called on content-holding objects such as tanks when their content drops to zero. Note that you cannot use this for pipes or conveyors as they are not strictly considered content holding objects in FloWorks.

On Full

This function is called on content-holding objects such as tanks when their content drops reaches the maximum capacity of the tank. Note that you cannot use this for pipes or conveyors as they are not strictly considered content holding objects in FloWorks.

On Rate Change

This function is called after a recalculation of the flow rates in the model, when FloWorks detects that at least the input rate or the output rate has changed. If you want to execute a function after every recalculation, regardless of whether any flow rates have actually changed, you may use the Post Calculation event on the flow control.

On Input

This function is called when the total input so far matches the value defined earlier. This value can be defined using the "Set flow trigger" option in the trigger dropdowns, or by setting input.triggeramount or input.triggerinterval.

On Output

This function is called when the total output so far matches the value defined earlier. This value can be defined using the "Set flow trigger" option in the trigger dropdowns, or by setting output.triggeramount or output.triggerinterval.

On Start Impact Factor

This function is called when an event starts to impact the flow of this object. This can be because an MTBF/MTTR event applied, or because the stop() or impact() function was called on a FlowObject.

On End Impact Factor

This function is called when an event stops impacting the flow of this object. This can be because an MTBF/MTTR event finished, or because the resume() function was called on a FlowObject.

Custom Draw

This picklist allows you to define your own draw code for the object. If this field returns a 1, then the object's default draw code will not be drawn. Note that an object's draw code is different than its 3D shape being drawn. While most objects just show their 3D shape and don't have any draw code, some objects, like conveyors and racks, need more dynamic drawing capability, rather than a static 3D shape to draw. Returning 1 overrides this special drawing code, not the drawing of the object's 3D shape. To hide the 3D shape, un-check the show 3D shape box in the General tab.

Properties

Below are the set of property names supported by all flow objects.

PropertyType
FlowControl Object
Product Number or String
MaxInflowRate Number
MaxOutflowRate Number
InflowRule Options
OutflowRule Options

Below are the additional set of property names supported by content-holding objects, such as flow tanks.

PropertyType
InitialContent Number
MaxContent Number
DrawBar Boolean
BarOrCylinder Options
BarLocation Array
BarRotation Array
BarSize Array

States

For information about collecting state statistics see the Statistics section below. Each fixed resource implements its own set of states. For information on a fixed resource's states, see the reference page for that fixed resource.

Statistics

The following sections explain important considerations related to fixed resource statistics.

State

A categorical tracked variable is used to collect state history for each object. FloWorks objects keep their state in a separate state profile called Flow States. This data can be used to get the total time at a each state, display the current state of the object on a dashboard or to display the state history for an entire model run. See the Dashboard, Statistics Collector and Tracked Variables pages for more information.

Throughput

Throughput is made up of the input statistic and the output statistic. These are kinetic tracked variables whose rate and value represent the input or output rate, and the cumulative input or output flow, respectively. Throughout statistics always increase.

Content

The content statistic records how much flow is currently inside of the flow object. Note that, contrary to basic FlexSim objects, not all FloWorks objects support this statistic. Those objects that do are referred to as content-holding objects, and includes tanks, mixers and conveyors.

Utilization

For non-content holding objects with a constrained maximum flow rate, the utilization is calculated as the current total throughput of the object, as a fraction of the maximum possible throughput.