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
|
||||
|
||||
runspeed with 2 parameters?
If I want to use runspeed in a DLL, I have to pass in 2 parameters. Could development tell me what the second parameter does? And can we get the current speed back with using -1 as the first parameter?
Before the release of V5 I made a remark about the overshooting when the runspeed was set to 1. http://www.flexsim.com/community/for...speed#post5880 That was put on the development list but I was wondering if it has been solved? My simple test as described in the post still gives quite an overshoot I just tested using stop and go compared to using runspeed 2 times. Stop and Go is about 44 times slower then using runspeed So I would like to use the runspeed option very much! |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
mgiubilato (09-23-2010) |
#2
|
||||
|
||||
The 2nd parameter is not used. It may have been used in previous versions, and it is probably still there for compatibility reasons, but the function doesn't actually use the 2nd parameter at all in 5.0.4.
The overshooting issue is still on the development list. I don't think it has been addressed yet. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
mgiubilato (09-23-2010) |
#3
|
||||
|
||||
Ok, then I would like here to get some extra or new ideas:
The problems is that my simulation models communicates with a real time system with several messages per real time second via sockets in a DLL. I have to stop the simulation everytime with the communication because we have to synchronise time. So now the problem is the following: Stop and go are taking from 0.25 seconds upwards. With a number of msg exchanges per seconds this is not acceptable because the model doesn't run at all and you might end up being slower then real time. Using runspeed is fast but doesn't work I've tried combining the runspeed function with delayevents(1000) and delayevents(-1000) but that doesn't help and the model doesn't work correct An option that works but that is not stable is using a while loop when you send the message and get out of the while loop when the returning message is received. But that doesn't block flexsim so when some other code is hit that might continue to work. In any case the model doesn't behave the same as with stop and go and sometimes doesn't continue so it is not stable enough to use. So I'm running out of ideas. Anybody? |
#4
|
||||
|
||||
Yes, calling runspeed(-1) currently does return the run speed.
|
Thread | Thread Starter | Forum | Replies | Last Post |
Passing parameters in executefsnode | Sung Kim | Q&A | 2 | 06-01-2010 09:37 AM |
Influence of runspeed | Maurits Brandt | Q&A | 6 | 12-14-2007 08:10 AM |