question

Jim Counts avatar image
0 Likes"
Jim Counts asked Jim Counts commented

Can i make the people not stand on top one another?

I'm trying to get a decent visual for shooting of a video that shows what an elevator lobby would "look" like at various levels of hospital census. When using the elevators, a waiting line, and upstairs acquirable resources, things act as they should statistically....however, once a resource is able to acquire their location upstairs, they'll leave the waiting line and stand in front of an elevator car....but everyone else that gets their resource as well will also do this and they all stand on top one another. Is there an "easy" way to get them to spread out a bit and respect each others space a bit without delving into the agent module? Thanks in advance!

FlexSim 22.1.1
astarpeople moduleelevator bank
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

You might get a better answer if you posted a small sample model demonstrating the problem that people can open and modify.

If you ask a general question with a generic description of the problem, you are likely to only get a general answer with a generic description of possible solutions.

Rather than posting a description of how you built a model, please post an actual sample model demonstrating the problem.

No one can tell you an "easy" way to fix a problem if they first have to divine what your problem actually is and try to build it based on your description instead of just opening a model and pressing run.

0 Likes 0 ·
Jim Counts avatar image Jim Counts Phil BoBo ♦♦ commented ·

Fair point Phil, my apologies. Model attached. You'll notice what im talking about when they come out of the waiting line and get to the elevator. Obviously there are alot of ways around creating these types of visuals without using Flexsim verbatim, but rather incorporating some post editing techniques in other software to fade in a herd of people with he right head count that looks good, etc....but as Flexsim advances, i'm trying to use it for as much of this stuff as i can when it makes sense, hence the "easy" question....but i hate when people ask me for easy buttons too, lol!


Thx,


Jim


body stackers.fsm

0 Likes 0 ·
body-stackers.fsm (133.8 KiB)
Phil BoBo avatar image
1 Like"
Phil BoBo answered Jim Counts commented

Attached is your example model, modified to have the people spread out a bit when they arrive at the elevator bank.

body-stackers_1.fsm

spread-people.gif

It uses an Event-Triggered Source listening to On Traveler Arrival, then a Custom Code activity to add kinematics to the traveler to move around a bit.

When the elevator arrives, those kinematics will be re-initialized to move them from wherever they ended up to where they want to be on the elevator using the Entry/Exit Time, so this shouldn't affect the simulation results at all, just the animation.


spread-people.gif (2.0 MiB)
body-stackers-1.fsm (136.3 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Since all it is doing is executing custom code, I guess I could have just added the On Traveler Arrival trigger to the Elevator Bank and put the code in there without using Process Flow:

body-stackers_2.fsm

1651853174218.png

treenode kinematics = getvarnode(traveler, "kinematics");
initkinematics(kinematics, traveler, 1);

double speed = traveler.getProperty("MaxSpeed");
double acc = traveler.getProperty("Acceleration");
double dec = traveler.getProperty("Deceleration");

Vec2 dir = Vec2(uniform(-6, 6), uniform(-6, 2));
double endTime = addkinematic(kinematics, dir.x, dir.y, 0, speed, acc, dec, speed, speed, time(), KINEMATIC_TRAVEL);

dir = Vec2(uniform(-1, 1), uniform(-1, 1));
addkinematic(kinematics, dir.x, dir.y, 0, speed, acc, dec, speed, 0, endTime, KINEMATIC_TRAVEL);
0 Likes 0 ·
1651853174218.png (87.3 KiB)
body-stackers-2.fsm (134.5 KiB)
Jim Counts avatar image Jim Counts commented ·

Most appreciated Phil! This is great. Thank you!

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jim Counts commented

Depending on how you model a situation, there may be some model-specific things we can do to make things look a bit better.

But in general, no, there's not a way to do that without using the Agent module. There is one checkbox on the AStar navigator that says "Ignore inactive members." Basically, this makes it so that people who aren't travelling don't cause collisions or re-routes. Perhaps try unchecking that box? Note that this can make deadlock issues more likely, and they probably won't act like a natural crowd. If it's a critical component of the simulation, then using Agent is the way to go for now.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jim Counts avatar image Jim Counts commented ·

Thanks Jordan. Yep, there is always a way...but the cost to get there varies! Appreciate the thought on the inactive members in A*, but these folks waiting on the elevator are active ( i believe), as their state is "in transit"....but i'll play with it.

0 Likes 0 ·