Rule scripts

Asset On Idle Behavior

The Asset On Idle behavior script allows you to choose the asset unit's next location. You can apply an On Idle behavior script in the On Idle Behavior field in the Transportation Assets table.

Arguments: (<AssetUnit Object> object, <Asset Object> object)

Returns the current asset unit and its asset object.

Return <SiteLocation Object>

Return the next location for the asset unit. Each Site, Customer and Waypoint object have a corresponding SiteLocation object in their attributes. If no SiteLocation is returned, the asset unit will remain at its current location.

Asset Unit Selection Rule

An Asset Unit Selection Rule allows you to assign the specific unit of a particular asset to carry out the transportation of a specific shipment. For example, an organization may want to assign the asset that has the least utilization to a new shipment. You can apply an Asset Unit Selection Rule in the Unit Selection Rule field in the Transportation Assets table.

Arguments: (<Asset Object> object, <Shipment Object> object)

Returns the current asset and shipment under review

Return <AssetUnit Object> object

Return an asset unit object. If no asset unit object is returned, the shipment will not move. The best practice is to choose an asset unit as a default so there is something to return if the rest of the script fails to choose an asset unit.

Mode Selection Rule

The Mode Selection Rule allows you to loop through the items queued on a lane and assign a mode. You can apply a single mode to all queued items or you can apply different modes to each item, such as choosing a different mode based on the priority attribute of the queued item.

Arguments: (<Lane Object> object)

Returns the lane object under review with this policy as a string

Return string

Return the name of the chosen mode as a string. This mode will be applied to all items that are pending mode selection on the lane at this review.

Alternatively, you can examine each <ShippingItem Object> object in the <laneobject>.pendingmodelist queue by looping through the queue and calling the global method Global Functions(lane object, item object, modename string) to explicitly assign the mode to a single item.

Process Routing Rule

The Process Selection Rule allows you to dictate the next step for a process. You can apply process selection rule in the Routing Policy field in the Processes table.

Arguments: (<WorkStep Object> object, <ProcessLot Object> object, <WorkProcess Object> object, <Site Object> object)

Returns the current work step, process lot, work process and the site where the process resides

Return string

Return the name of the next work step as a string.

Last modified: Wednesday May 15, 2024

Is this useful?