AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

question

Gil Cnaan avatar image
1 Like"
Gil Cnaan asked Joerg Vogel edited

How can I send all my flow items to the sink at one time?

I am running a model of a Renaissance festival, and at closing time, I would like to send all my patrons (flow items) to the exit (sink), but can't seem to find a way to program that.

FlexSim 16.0.0
flow itemssinkitem flow
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

·
Brandon Peterson avatar image
4 Likes"
Brandon Peterson answered Joerg Vogel edited

Gil,

Here is a possible solution for you:

  1. Create a global variable called "ParkClosed" (or any other name you like)
  2. Create a time table that will set ParkClosed to 1 when the park is closed and 0 when it is open
  3. Connect your objects to the park exit as the last output port connection
  4. In the flow tabs on your objects you can specify that if ParkClosed == 1 then exit through the last port (use: nrop(current) to get the last output port)

You may run into problems if you have large queues as the send to port is executed when the flowitems enter the queue. You can get around this by having a small one person queue at the front of each long queue. Another alternative would be to set ParkClosed to 1 prior to the park closing as a way of indicating that the lines to any rides/exhibits/etc. are now closed.

I hope this helps,

Brandon

· 5
5 |100000

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

Thanks. Trying that now.

1 Like 1 ·

Sorry for asking more questions, but I did make the global variable. I'm having some issues getting the time table to sync to it, though. I can't seem to add it as a member.

0 Likes 0 ·

If you set in the time table the down time as the state of closed park, then change to the Functions Tab and open the source code editor at the On Down Function. Then you write behind the last line of the source code:

ParkClosed = 1;

4 Likes 4 ·

I have tried that, but for some reason, it doesn't update the variable?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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