ATTENTIONThis 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 |
#1
|
|||
|
|||
Model stops and begins running again
Hi. I want my source to stop creating flowitems at a certain time. Then when all flowitems go to the sink, the model stops. How can i make the model starts running again from that model? So the source has to create again flowitems, e.tc. I tried to write a code in on model trigger: On model Stop, using the command go(), but it doesn't work. Is there a way? And this has to be repeated.
|
#2
|
||||
|
||||
Hello Vassiliki,
if you don't want to stop the model at all, you can place a source direct connected to a sink in your model. This source creates eg every 3600s an item. So your real model source can be stopped and started again. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
vasiliki grigorakaki (03-03-2012) |
#3
|
|||
|
|||
If you have a constant amount of flowitems that is sent through your model you can send a message from your sink to your source.
Use this code: int cnt = 123; // 123 is amount of your created flowitems in the first run if (fmod(getinput(current),cnt) == 0) { sendmessage(centerobject(current,1),current); } And use the OnMessage trigger of your source to create your flowitems. Destination should be outobject(current,1) Note that you must connect the sink and source on their central ports and you cannot connect the source and processor directly but must have a queue or conveyor in between. That should do the trick. |
The Following User Says Thank You to Jens Mühlheimer For This Useful Post: | ||
vasiliki grigorakaki (03-16-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
simulation stops before completing the operation | Shahin Gelareh | Q&A | 10 | 02-16-2012 12:39 PM |
Model stop running when properties is opened | David Chan | FlexSim HC: Q&A | 1 | 06-14-2010 02:58 PM |
about model's continuously running | Frans Zeng | Q&A | 10 | 05-21-2010 12:47 AM |
BasicConveyor stops too late? | Steven Hamoen | Q&A | 3 | 04-20-2010 09:51 AM |
reservoir stops releasing | Alistair Smitheman | Q&A | 7 | 08-14-2009 05:54 AM |