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 03-03-2012
vasiliki grigorakaki vasiliki grigorakaki is offline
Flexsim User
 
Join Date: Apr 2011
Posts: 42
Downloads: 39
Uploads: 0
Thanks: 18
Thanked 0 Times in 0 Posts
Rep Power: 112
vasiliki grigorakaki is on a distinguished road
Default 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  
Old 03-03-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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  
Old 03-12-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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


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.