question

Fauzy Syaputra avatar image
0 Likes"
Fauzy Syaputra asked Fauzy Syaputra commented

How to set up bus stop queuing and integrate it into the transportation network?

So, I want to add a queuing system for each bus stop that the bus passes through, where the bus will stop first and pick up passengers from each queue at the stop. The bus's stopping time at each stop will be influenced by the number of passengers boarding or the duration of passenger boarding.

I have already created the simulation model, but I am still confused about integrating this queuing system into the model. Can anyone help? Thank you.

BuswaySystem.fsm

FlexSim 22.2.0
bustransportation modelbus transportationqueing
buswaysystem.fsm (316.2 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Fauzy Syaputra, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered Fauzy Syaputra commented

Hey @Fauzy Syaputra, here's a thought you could try.

You could add a queue next to each Network Node that acts as a "stop" (or "henti" as they're labeled in your model I think). You have a token circulating in your Process Flow that represents the bus. It has a label "token.bus" and a label "token.henti". Place a queue next to each bus stop and add a label, something like this:

1694805122900.png

With this label on the Network Node:

1694805126360.png

You can fill up the queue with a source or some other method. Then, in the Process Flow, you can use your token to get the number of people in the queue doing something like this:

int queueLength = token.henti.queue.subnodes.length; // save the value to an int if you're using this in code

Then you can use that queueLength in the bus wait time:

1694805265176.png

I used

2 * token.henti.queue.subnodes.length

as an example to say that it takes 2 seconds per person to board, so if there's 5 people to board the bus, it will take 2*5 = 10 seconds for the bus to stop and wait.

Finally, you'll need to empty the queue of people, so maybe you add a subflow to empty the queue while the bus waits.


1694805122900.png (128.9 KiB)
1694805126360.png (6.6 KiB)
1694805265176.png (17.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.

Fauzy Syaputra avatar image Fauzy Syaputra commented ·

can you please explain it in more in depth? i still don't understand it. where do I put int queueLength = token.henti.queue.subnodes.length; in processflow

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Fauzy Syaputra commented ·

Here's an example model that explains the concept.

example-bus-system.fsm

0 Likes 0 ·
Fauzy Syaputra avatar image Fauzy Syaputra Kavika F ♦ commented ·

I understand now, thanks Kavika

1 Like 1 ·