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.

Joerg Vogel avatar image Joerg Vogel commented ·

@Akhil raja rao K, my polite reply is. I beg you for attaching your model or better a simplified model. Many thanks. Regards Jörg.

0 Likes 0 ·

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:

Array lines = [Model.find("WaitingLine1"), Model.find("WaitingLine4"), Model.find("WaitingLine5"), Model.find("WaitingLine6")];

int minContent = INT_MAX;
Object minLine;

for(int i = 1; i <= lines.length; i++) {
	Object line = lines[i];
	int lineContent = line.subnodes.length;
	if(lineContent < minContent) {
		minLine = line;
		minContent = lineContent;
	}
}
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.

Akhil raja rao K avatar image Akhil raja rao K commented ·

@Matthew Gillespie you simplified everything by using just waiting line & code with out using walk, decision and all, Tq for ur answer sir.

0 Likes 0 ·
Akhil raja rao K avatar image Akhil raja rao K commented ·

@Matthew Gillespie sir. I've applied it for task executer process flow by adding another waiting line in the code i.e totally 5 waiting lines but the people distribution was not even, will you correct me where I did mistake, I'm attaching the model , Please find the attachment.

flexsim-community.fsm

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Akhil raja rao K commented ·

If you're using an instanced flow you use the keyword current to refer to the instance object (the person in this case).

fixed.fsm

1 Like 1 ·