Nasr Cheaib
Nasr Cheaib

Reputation: 83

Parallel activities for one agent

Is there a way to have parallel services and/or delays to occur per agent and move on with the activity that takes the longest. For example if I have an agent that can be painted and serviced at the same time, each requiring a different resource pool with different processing times but the agent will move forward when the process that took the longest is over.

Upvotes: 0

Views: 419

Answers (2)

Stuart Rossiter
Stuart Rossiter

Reputation: 2517

Use a Split block to split your agent into two for the two parallel tasks (Service blocks) and then use a Combine to combine them back again afterwards (with the Combine block outputting the original agent 1).

You can also use RestrictedAreaStart and RestrictedAreaEnd blocks (capacity 1) around the split/combine area to ensure that other agents can't 'jump in' whilst the longest parallel process is still running (but the shorter one has already finished).

Something like the below (with resource pools).

Sample process flow

Upvotes: 2

Benjamin
Benjamin

Reputation: 12795

Probably easiest to dynamically setup delay duration and resources needed from within 1 Service element:

calculate the duration your agent will use in each case (painting = 5 mins, servicing = 10 mins) --> use the longer value as the service delay

Also, make the agent require 1 painter and 1 service-engineer as resources.

Only drawback: Your painter will stay for 10 mins as well.

Alternative approach would likely involve creating your own, purely agent-based setup with seizing& releasing

Upvotes: 1

Related Questions