Logic Types

Logic types enable you to customize specific behaviors for resources in Factory Flow Simulation.

This page discusses:

Types and Use Cases

Below is the list of applicable logic types, their use cases, and the resource types to which they apply. They apply to all activity types.

Logic Type Use Case Applicability
Activity Selection Selects the next activity from the same resource based on the current part status. Machine, storage, AGV, AGV decision zone, conveyor, conveyor decision zone.
FlowMode Out Selects the target resource for routing a part according to the cycle count. Machine, storage, AGV decision zone, conveyor, conveyor decision zone.
Mobile Selection Selects the AGV at the decision zone. AGV decision zone.
At Activity Start Modifies the current activity time according to the cycle count. AGV decision zone.
At Activity End Updates the user attribute/part status at the end of the activity. AGV decision zone.
At Travel Start Changes the speed of the AGV and the battery value. AGV decision zone.
At Travel End Changes the speed of the AGV. AGV decision zone.
At Rotation End Changes the speed of the AGV. AGV decision zone.
At Delay End If the AGV decision zone has a delay, modifies the depart requirement and the battery value. AGV decision zone.
AGV Selection
Arrival Mode
At Cycle End
At Cycle Start

Examples

ActivitySelection

During simulation, you can specify the next activity using the Activity Selection user logic. This logic needs to be assigned an activity: set S_NextActivity to the activity's name. To skip all the successor operations, set S_NextActivity to "".

This logic serves to decide a successor operation only, not the first operation. It can also be used to launch failures of user defined type: for this, set S_NextActivity to the repair activity's name.

if (S_ProductStatus == "Good")
                       S_NextActivity = "PRessButton"
else
                       S_NextActivity = "Repair.1"

At Activity End

During simulation, you can update system attributes or user attributes using the At Activity End user logic. It needs to be assigned to an activity.

Status = "ACT1"

FlowModeOut

During simulation, you can specify the next resource the parts need to be routed to using the FlowMode Out user logic. The logic needs to be assigned to a ressource.

To specify the next resource, set S_TargetResource to the resource's name.

if Status == "ACT1"
                 S_TargetResource = "Main Spindle.1"
else
                 S_TargetResource = "UnpackNC.1"

You can also use the user logic to route parts after a specified quantity is achieved on a buffer: update S_Route based on the value of the system attribute S_PartCount.

if (S__PartCount ==5)
                S_Route = true

At Travel Start

During simulation, you can specify the speed of the AGV using the At Travel Start user logic. The logic needs to be assigned to an AGV decision zone.

S_Speed = S_Speed*0.5

You can also use the user logic to specify a path for the AGV: set S_TargetResource to the decision zone at the start of the dedicated path.