ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 12-08-2009
Ong Wu Sheng Ong Wu Sheng is offline
Flexsim User
 
Join Date: Nov 2009
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Ong Wu Sheng is on a distinguished road
Default How to clear the people from conveyor

Hi there

If anyone can advise on the following problem.
1. I am using a conveyor as road and the people will cross the conveyor once it is opened. However once my conveyor is closed, the flow of people will remain on the conveyor. But I dont want any people left on the conveyor cause they should cross the road when it was closed.

2. Regarding on the queue, we got a coding of case by value. However, we need to have two outcome in a case. We have an example as following: Case 1: Return 2 || 1;

However, when we run the simulation, only 2 is returned but 1 cannot be returned.
Appreciate any advise where possble, thank you so much.

Ong_Wu_Sheng (Student)
  #2  
Old 12-08-2009
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default

Hello Ong_Wu_Sheng,

I am affraid that your first problem is not clear to me, could you please try to explain better and add the model?

For the second problem: if you want to make a choice in one case, you should first decide what to return (1 or 2) and then return the value. For example:

int MyReturnValue = duniform (1, 2, 1 );
return MyReturnValue;

There might be other or better options, but you did not give enough information to oversee the whole problem.

Esther
The Following User Says Thank You to Esther Bennett For This Useful Post:
Scott Mackay (12-09-2009)
  #3  
Old 12-08-2009
Ong Wu Sheng Ong Wu Sheng is offline
Flexsim User
 
Join Date: Nov 2009
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Ong Wu Sheng is on a distinguished road
Default

Hi Esther

Thank you so much for your replies.
I have attached the flexsim model.

1. If you run the model until 36 secs, you will notice that there is one whole row of people at the conveyor. We do not want any people to remain on the conveyor because we want them to cross to the other side of the queue.

Purpose of the conveyor: It represents the road and we control the flow of the people using the time table to act as traffic lights.

2. ""For the second problem: if you want to make a choice in one case, you should first decide what to return (1 or 2) and then return the value. For example:

int MyReturnValue = duniform (1, 2, 1 );
return MyReturnValue;""

actually we have 1 case but need to return 2 values
so we tried this code:

case 1: return or(1,2); " for case 1, it should return 1 or 2" but from the flexsim model, it only returns 1.

This setting can be found in the "Queue 4" flow setting.

Thanks
ong wu sheng
Attached Files
File Type: zip FYP (latest).zip (54.0 KB, 210 views)
  #4  
Old 12-08-2009
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

Hi,
don´t have much time and couldn´t look into your modell. But for your second promblem it looks like you only have to change your code in:

case 1: return duniform(1,2,1);

Instead of "duniform" you could use "bernoulli" if you got the percentage of your distribution.
greetings
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Scott Mackay (12-09-2009)
  #5  
Old 12-08-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Ong Wu Sheng,

The problem you are having is that you are using the stopobject() command in your time tables. The stops the conveyor as oppose to stopping the people from entering it. You should be using the stopinput() command. This will allow the people in the conveyor to exit while not allowing anymore people to enter.

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Scott Mackay (12-09-2009)
  #6  
Old 12-08-2009
Ong Wu Sheng Ong Wu Sheng is offline
Flexsim User
 
Join Date: Nov 2009
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Ong Wu Sheng is on a distinguished road
Default

Thanks Sebastain and Brandon.
Your solution helps me a lot. Thank you.

However, there is an area that I need to clear my doubt.

In the time table,

I wish to simulate from 0 to 71sec closed, from 71sec to 107 open. Then, 107 to 171 closed. So how can I simulate this timing into the time table by the rows, time, state and duration?


Ong Wu Sheng
  #7  
Old 12-09-2009
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

There will be some different ways for your problem, even you could create an user event on your own which should start at an specific time.
One way I´ve gone for this is to biuld an source queue sink modell. The source sends on an specific time an item and with the triggers you can send messages or close and open ports.
I saw in your modell and think you try to build an trafficlight crossing for walkers. What I saw as an mistake is, that there can´t walk more than one passenger next to each other, and on the conveyor only an maximum number of passengers can be. This is limited by the space of the travelers an the conveyor. Got this problem in some other models, that the conveyor never spaced the maximum content I set, because it had been to short.
Greetings
The Following User Says Thank You to Sebastian Hemmann For This Useful Post:
Scott Mackay (12-09-2009)
  #8  
Old 12-09-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Ong Wu Sheng,

I am making the assumption from the times that you gave that you have an up time of 64 seconds (7 to 71) and a down time of 36 seconds (71 to 107) that is repeated with the same numbers.

With that in mind you could do the following:

First, to use the Time Table you will want to set the Down time to start at 64 with a duration of 36. The state is irrelevant, but the repeat time should be 100. In the down function you need to use stopinput and in the resume function you need to use stopoutput. This will do what you want with the exception of the first down being at 71 seconds.

Second, you could use the MTBF/MTTR. Set the first down time to 71 seconds, the MTTR to 36 seconds and the MTBF to 64 seconds. The down and resume functions would be the same as above. This will do what you want almost exactly.

Third, check out the following example model: http://www.flexsim.com/community/for...?do=file&id=74
It uses conveyors to move the cars and the intersections behave almost exactly the same as the way you have described your conveyors.

Good Luck,
Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Scott Mackay (12-09-2009)


Thread Thread Starter Forum Replies Last Post
What is the difference between a Conveyor and Basic Conveyor shivrash Q&A 2 07-21-2009 04:09 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.