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
|
|||
|
|||
operators passing one another on network node
hello,
i am trying to create an evacuation model and have a question about how the people will move. currently i have people modeled as operators that will travel along network nodes. each person has their own speed as well as their own network node they'll initially travel down. all the nodes eventually meet up at one that will lead them out of the building. since the operators are each moving at different speeds, some will obviously be moving at a slower pace than others. i'd like the faster people to be able to pass the slower ones without visually just walking right through them. is there a way i can get them to simply pass on the side of others? or is there some logic that i can put on a node to look at the speed of an operator on the node ahead of it, then determine if it wants to jump to another travel network? this is my first time working with network nodes so i'm not entirely sure how they work, and would appreciate any help. thank you, danielle |
#2
|
||||
|
||||
Have a look at the "turn to the left" code snippet generated for collision spheres, where one task executer passes the other. IMHO it may be a good starting point:
Code:
treenode thisobject=ownerobject(c); treenode otherobject=parnode(1); treenode thissphere=parnode(2); treenode othersphere=parnode(3); { //************* PickOption Start *************\\ /**Turn to the left.*/ /**\n\n*/ double prevcollision = getvarnum(thisobject,"incollision"); doublearray turn = makearray(3); turn[0] = vectorprojectx(thisobject,3,3,0,model()); turn[1] = vectorprojecty(thisobject,3,3,0,model()); turn[2] = vectorprojectz(thisobject,3,3,0,model()); int preempttype = 0; if (prevcollision == 0) preempttype = PREEMPT_ONLY; else return 0; setpreempt(gettasksequence(thisobject, 0), 0); // This line is required to preempt a preempting task createtraveltoloctask(thisobject,0,turn[0],turn[1],turn[2],0,0,preempttype); return 0; } //******* PickOption End *******\\ |
The Following User Says Thank You to Vadim Fooks For This Useful Post: | ||
Jörg Vogel (07-08-2013) |
Tags |
network node, operators, passing, speed, travel |
Thread | Thread Starter | Forum | Replies | Last Post |
How to set dynamicaly closing node edge in a network node | Preethi Sivaramakrishnan | Tips and Tricks | 8 | 06-27-2013 01:35 PM |
Transporter and network node | Shahin Gelareh | Q&A | 1 | 06-22-2012 07:52 AM |
Network node TreeView | shafizad | Q&A | 5 | 08-25-2010 04:33 AM |
Network Node Question | Gavin Douglas | Q&A | 1 | 10-16-2008 02:24 PM |
Release from Network Node | Gavin Douglas | Q&A | 2 | 06-12-2008 12:39 PM |