Plant logic

By default the simulator creates one order at a fixed interval, rotating through the selected pickup and drop-off pairs. Plant logic replaces that rule with a block diagram, so orders can follow production times, events at stations, conditions and counters.

When to use it

  • Several production lines with different rhythms and stations.
  • A transport that must start when another one is delivered (chained moves).
  • A source that must be served again only once it is empty (cyclic replenishment).
  • Orders that depend on the state of the plant: free AGVs, queued missions, a stock counter.

If a fixed interval between orders is enough, stay with the periodic generator in Orders and timing.

Sequences, blocks and connections

A diagram is made of blocks joined by connections. A trigger block (Start, Periodic timer, On station drop-off, Cyclic mission) creates a sequence: an independent token that travels from block to block along the connections, waits where a block tells it to wait, and ends at End sequence.

  • Each output (on the right of a block) has exactly one connection. Connect it to the input (on the left) of the next block.
  • Every output must be connected; use End sequence to finish a branch.
  • Many sequences can run at the same time, even through the same blocks. Several connections entering one block do not synchronise sequences.
  • Variables are shared by all sequences and start at zero.
  • Time only advances with the simulation: every duration is in simulated seconds.

Block reference

Triggers

BlockSettingsBehaviour
▶ StartStarts one sequence at time zero.
◷ Periodic timerInterval (s), First start after (s)Starts a new sequence at each interval, even if the previous one is still running.
↧ On station drop-offDrop-offs to observeStarts a sequence each time any AGV completes an unload at one of the selected stations. Arrivals, pickups and parking returns do not trigger it.
↻ Cyclic missionBlock pickups, Block drop-offs, Delay while source is free (s)For each selected source with no pending or active mission (from any block), waits the delay and generates a transport to a reachable drop-off (drop-offs rotate). Repeats by itself.

Flow and conditions

BlockSettingsBehaviour
◴ WaitDuration (s)Holds the sequence for a production or processing time.
⊣ PrerequisiteCheck, Comparison, ValueHolds the sequence until the condition is true. It does not reserve AGVs or resources.
◇ ConditionCheck, Comparison, ValueEvaluates the condition once and continues on the Yes or No output.
# Update variableVariable, Operation (Set / Increment), ValueSets or increments a shared counter. Increments can be negative.
■ End sequenceEnds this sequence. Other sequences and vehicles continue.

Prerequisite and Condition can check Free AGVs, Pending missions, Active missions, Completed missions or a Plant variable, with the comparisons ≥, ≤, =, > and <. Variable names have up to 40 characters: letters, numbers, spaces and underscores.

Missions

BlockSettingsBehaviour
⇢ Generate missionBlock pickups, Block drop-offsEach time a sequence passes, queues one transport, rotating through the reachable pickup/drop-off pairs. The allocator chooses the AGV.
⚄ Random missionBlock pickups, Block drop-offsGenerates one order: a random pickup with at least one reachable drop-off, then a random reachable drop-off. The same pair can repeat.
✓ Wait for deliveryWaits until the last mission generated by this sequence has been unloaded, not every mission. It needs a mission block before it on every incoming branch.

Load and unload times, fleet, speeds and the AGV selection rule stay in SimulateScenario.

Using the editor

  1. Open the workspace. Click Plant logic in the header. An empty diagram offers Start from an example.
  2. Add blocks. Drag a block from the Blocks palette onto the diagram, or click it to add it.
  3. Connect. Click the output port on the right of a block, then the input port on the left of the next block. Esc or Cancel connection aborts.
  4. Configure. Select a block to edit its name and settings in Block properties. Station lists show only stations with the right role.
  5. Check. The status line reports Valid workflow or the number of issues to fix before starting; each issue names the block concerned.
  6. Enable. Tick Use workflow to generate orders. While it is off, the diagram is a draft and the periodic generator is used.
ActionHow
Zoom / panWheel to zoom, middle button to pan; Fit frames the diagram
Select several blocksDrag a rectangle with the left button; Shift/Ctrl+click adds or removes a block
Move a groupDrag one of the selected blocks
Copy / pasteCtrl+C copies blocks with their internal connections; Ctrl+V pastes them beside the existing ones
DeleteSelect a block or a connection and press Delete, or use the delete button in its properties

Changes to the diagram restart the simulation from zero and are saved in the project with Save. The diagram supports undo and redo like the rest of the project.

Watching it run

While the simulation runs, each block shows how many sequences are currently in it and how many have passed through. The status line shows whether the logic is Running or Ready / paused, the number of active and completed sequences and any warnings. Generated orders name the block that created them, for example M12 (3 → 7) from “Line A”.

If the logic hits a runtime problem, such as a loop with no waiting time, Simulate shows an error: open Plant logic, fix the diagram or press Reset.

Common patterns

Production line with a queue limit (the built-in example)

Periodic timer60 sPrerequisitepending ≤ 5Generate missionWait for deliveryWait10 sEnd sequence

Every minute a sequence starts, waits until no more than five missions are pending, generates a transport and waits for it to be delivered before a 10 s processing time.

Chained transports

On station drop-offstation 1Generate mission1 → 2End sequence

Every time something is unloaded at station 1, a new transport from 1 to 2 is created. Station 1 needs both Pickup and Drop roles, and the first delivery to it must come from another sequence of the diagram.

Serve a source whenever it is free

Cyclic missionpickup 1, drop-off 2, delay 30 sEnd sequence

A transport from 1 starts 30 s after the source has no mission pending or active. No timer or loop connection is needed.

Random demand when a vehicle is free

Periodic timer45 sConditionfree AGVs ≥ 1Random missionEnd sequence

Connect the No output of the Condition to a second End sequence. Random choices use the browser's random generator, so two runs are not identical.

A serial loop

StartGenerate missionWait for deliveryWait20 sback to Generate mission

A Periodic timer can start overlapping sequences. For strictly one-after-another work, use Start and connect the last Wait back to the first work block. Always put a Wait in the return connection: a loop with no waiting time is stopped as an instant loop.

More complete studies built on these patterns are in the Scenario cookbook.

Limits

  • 200 blocks and 400 connections per diagram.
  • 500 running sequences and 1000 pending orders: beyond these, new starts are suspended until the queue clears.
  • 200 instantaneous transitions per simulation step.