question

Akhil raja rao K avatar image
0 Likes"
Akhil raja rao K asked Matthew Gillespie commented

How to evenly distribute the people flow to multiple waiting lines?

Problem here I'am facing is, I have multiple waiting lines from a single source but the person flow was not "even" in all the waiting lines i.e even though some waiting lines are empty people were flowing to filled waiting line rather than empty waiting line i have used random connector and round robin too but the flow was not EVEN, please sort out this problem , any suggestion would be grateful. thanks in advance .please find the model in the attachment below.

people-flow-in-the-waiting-line.fsm

FlexSim 19.0.2
round robinrandom connectorpeopleprocess
· 1
5 |100000

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

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

Take a look at the attached model. shortestline.fsm

I wrote a code snippet to send people from the first line to the shortest line in the second row:

  1. Array lines = [Model.find("WaitingLine1"), Model.find("WaitingLine4"), Model.find("WaitingLine5"), Model.find("WaitingLine6")];
  2.  
  3. int minContent = INT_MAX;
  4. Object minLine;
  5.  
  6. for(int i = 1; i <= lines.length; i++) {
  7. Object line = lines[i];
  8. int lineContent = line.subnodes.length;
  9. if(lineContent < minContent) {
  10. minLine = line;
  11. minContent = lineContent;
  12. }
  13. }
  14. return minLine;

shortestline.fsm (26.1 KiB)
· 3
5 |100000

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