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 06-26-2013
danielle paniccia danielle paniccia is offline
Flexsim User
 
Join Date: Jun 2013
Posts: 3
Downloads: 1
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
danielle paniccia is on a distinguished road
Default 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  
Old 07-07-2013
Vadim Fooks's Avatar
Vadim Fooks Vadim Fooks is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 67
Downloads: 26
Uploads: 0
Thanks: 50
Thanked 24 Times in 13 Posts
Rep Power: 118
Vadim Fooks will become famous soon enough
Default

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


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.