question

Meaghan Griffith avatar image
1 Like"
Meaghan Griffith asked Brandon Peterson edited

Two-stage processing with shared resources

Is it possible to set up a model with two stages of processing (in series) where a total of n operators work in both stages? That is operators are capable of working processors in both stage one and stage two; operators switch from one stage to another as required (based on queue length). And is it possible to do so without using code? Can it be done strictly by using the functions suggested by the triggers?

FlexSim 16.0.1
process flowoperatorprioritystaytimestages
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeff Nordgren avatar image Jeff Nordgren commented ·

Have you tried using the Process Flow option (see User Manual)? That usually eliminates a lot of coding if just done in the Model view. Can you send some kind of model we can look at?

0 Likes 0 ·
Meaghan Griffith avatar image Meaghan Griffith Jeff Nordgren commented ·

Part of the problem might be in the set up. I did attempt to set up the model using the Process Flow option but was unclear how to set a priority queue (and there is an error returned for that step as well).

The simplest goal of the model is to track the total system time (staytime) of two types of customers (priority and regular). Ideally, an output of the individual staytimes for each custom divided into classes is what I am trying to resolve from this model.

- in stage 1: (multiqueue, multiserver) parallel processors for specific customer type; based on demand, n number of counters can be opened based on queue lengths

- after processing, customers are sent to the sink, or to secondary processing based on percentage.

- stage 2: of the customers sent for secondary processing, there are 3 processing types based on percentage. Each type of processing can have up to n number of servers (based on availability/demand); each processing type has its own single queue (where 'priority customers' have non-preemptive priority over regular customers)

- arrival rate not usually be static as it fluctuates based on time of day

I've attached a sample process flow model.

0 Likes 0 ·
pf-sample-model.fsm (26.1 KiB)

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

I've modified your sample model and added some tokens representing operators. I've also added a couple of lists to synchronize the customers and operators.

When the model starts I create a bunch of tokens representing operators. All they do is check which queue (stage 1 or stage 2) is longest and then pull from the corresponding partition of the Waiting Customers list. When a customer arrives we decide if they are a priority customer and then we push them onto the Waiting Customer list. When an operator is available they'll pull the customer off the list and the customer will continue on to the delay. Once that's done they pull the operator off the Working Operators list so that it can help another customer. When the operators pull from the Customer list they use a query that sorts the customers based off priority. That way the priority customers get served first. I also turned on some visualization options so that the priority tokens are shown as red stars instead of green circles. Also I added a zone to track the staytime of the customers.


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.