Skip to content

SEPARATE

Splits a batch, pallet or lot back into its individual parts, orders or customers, optionally copying the batch's attributes to each.

Parameters ---------- mode : {'retain','all','specific'} - 'retain' children keep their own attributes - 'all' copy all parent attributes to each child - 'specific' copy only the names listed in attrs attrs : list[str] | str | None Comma-separated string or list used when mode == 'specific'. carrier : {'dispose','keep'} 'keep': the parent is a CARRIER (a truck) that lives on. Its members leave one at a time on exit 0, each after its own member_time, and the carrier leaves on exit 1 once it is empty. release_order : {'pattern','fifo','lifo'} 'pattern' (the default): a pallet loaded by a pallet pattern comes off top layer first, its slots in reverse order; any other carrier fifo.

Family: group. Python builder: m.separate(...).

Typical uses

Use SEPARATE to split a batch made by BATCH or MATCH back into its members: unpack a pallet, split a lot, free a truck's load. It differs from DUPLICATE, which makes new copies and does not need a batch.

Behaviour and rules

The batch entity must carry members. An entity that is not a batch stops the run with an error. The batch leaves the work in progress and its members come back to it, one after the other in the same instant, along the first outgoing link. The release_order is fifo or lifo.

The batch's cost is split evenly across its members. The mode sets what a member takes from the batch. The default keeps its own values and records the batch in its batch_info. Take all representative values copies the batch's attributes. Take specific representative values copies only the ones listed in attrs.

With carrier set to keep, the batch is a vehicle that lives on, such as a truck. Its members leave on the first link one at a time, each after member_time. The carrier then leaves on the second link, which is required. Each member takes the cost it brought.

Ports

  • Inputs: any number of incoming links.
  • Outputs: one outgoing link.

Parameters

Parameter Type Default Required Quantity Unit key Description
mode str 'Retain original entity values' How children get their attributes: retain their own values, take all of the parent's, or take only the ones listed in attrs.
attrs list [] Attribute labels to copy from the parent, used when mode is "specific".
carrier str 'dispose' "dispose": the batch ends here and its parts leave together. "keep": the batch is a carrier (a truck) that lives on -- its members leave one at a time by the first link, each after member_time, and the carrier leaves by the SECOND link once it is empty.
member_time str '' time member_time_unit Keep mode only: time for one member to come off, e.g. "2" or "TRIA(1, 2, 3)", evaluated for each member in its own scope when its turn starts. Empty = every member leaves in the same instant.
member_time_unit str 'base' Unit member_time is expressed in: "base" (the model's own unit) or one of seconds/minutes/hours/days.
release_order str 'pattern' Order the members leave in: "pattern" (a pallet loaded by a pallet pattern comes off top layer first, any other carrier as fifo), "fifo" (the order they were loaded) or "lifo" (last loaded first off, a rear-door truck).
place_per str 'item' Keep mode, a pattern pallet: "item" unloads one member per member_time; "layer" a whole layer in one member_time.
pattern str '' With a robot: the record of "pallet_patterns" its cycle is planned for, one cycle per slot; a pallet of another pattern is a run error.
robot str '' Name of a record in "robots": with a pattern, each item's time is this robot's cycle to that item's own slot, and member_time is not used. Empty = member_time.
robot_at list [0, 0, 0] Where the robot stands, from this block (the pallet's place): [dx, dy, rotation] in the model's length unit and degrees, dx along the block's facing, dy toward the floor plan's +y side at rotation 0.
targets dict {} The robot's named targets, as on MOTION; "slot" (the item's pick on the pallet) and "slot_above" (approach higher) are given per slot and are not defined here.
segments list [] The robot's cycle, as on MOTION: ptp and lin moves to targets, with timed pick and place segments, every time in seconds. A move without its own payload_kg carries the pattern's item weight.
approach str '' length How far slot_above is over the slot, in the model's length unit. Empty = 0.3 m.

Statistics

Every run fills system and entity_summary (see the KPI reference). The example below also fills:

Frame Columns
store_summary Run, Store, Capacity, Average Size, Max Size, Mode Size, Mode Size %, P95 Size, P99 Size, Std Size, Avg Time in Store, Mode Time in Store, Mode Time in Store %, P95 Time in Store, P99 Time in Store, Std Time in Store, Util % (time-weighted)
material_flow_summary Run, From, To, Entities

Problem codes

A check of the model reports these about this block:

Code Meaning
E_INITIAL_BATCH A formed batch in initial_state does not fit the model: an entry that meets a SEPARATE has no members, or its members are not records of one batch the model can form.
E_ROBOT_TARGET A robot move names no target of its block, a target is not a joint vector, a frame or a point on a block, or a pattern BATCH or SEPARATE defines the per-slot target slot or slot_above itself.
E_ROBOT_UNKNOWN A MOTION block, or a BATCH or SEPARATE that works by a pallet pattern, names a robot the model does not declare, or has robot moves and names none.
E_SEPARATE_CARRIER A SEPARATE's carrier is not "dispose" or "keep".
E_SEPARATE_CARRIER_LINK A SEPARATE that keeps the carrier does not have exactly two outgoing links (0 = the members, 1 = the carrier).
E_SEPARATE_MEMBER_TIME A SEPARATE has a member_time but disposes of the carrier.
E_SEPARATE_RELEASE_ORDER A SEPARATE's release_order is not "pattern", "fifo" or "lifo".

Example

The snippet seeds itself; its output is from a run made when this page was generated.

from nagasim import build as nb

m = nb.Model(time_limit=200)
m.create(distribution=nb.Constant(value=2), max_arrivals=30) >> m.batch(batch_size=5, batched_entity_type="PALLET") >> m.separate() >> m.dispose()

results = m.run(seed=1)
print(int(results.kpi("system/Total Entities Completed")), "entities completed: 6 pallets, then the 30 parts they carried")
36 entities completed: 6 pallets, then the 30 parts they carried

Used in

Bundled models: Order-driven warehouse (library assets), Make-to-order line (library assets).

Guides: Batching and matching, How do I pack parts on a pallet and unpack them later?, Coming from Arena, Costing, Entities and attributes, Finite buffers and blocking after service and 2 more.

See also