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
|
||||
|
||||
Set reset position
I'm working on an object in which I can dynamically set the location of a network node. To test it, I made a simple example where I set the location on the OnReset Trigger of the Network Node. However, the 'modified' variable of the DefaultNetworkNavigator is not set to one and thus Dijkstra's algorithm is not re-evaluated to determine the shortest path. I've adjusted the OnReset (and toggled it as Flexscript) of the DefaultNetworkNavigator to always set this variable to one. So, it works, but still I have to reset twice to make sure the new location is used in the algorithm. Is there a better way to solve this?
Thanks, Martijn |
#2
|
||||
|
||||
Martijn,
Call the optimizenetwork(); command from the OnRunStart trigger. (Tools | Model Triggers | On Run Start) That will update the Dijkstra's algorithm and hopefully solve the issue you are having. Thanks, Paul |
Thread | Thread Starter | Forum | Replies | Last Post |
Canceling "Set Object Reset Position" | AlanZhang | Q&A | 8 | 10-15-2007 12:04 PM |
How to display 3D text/shapes in a static position regardless of the view angle. | Regan Blackett | Tips and Tricks | 0 | 08-03-2007 10:51 AM |