question

craig-dickson avatar image
0 Likes"
craig-dickson asked craig-dickson commented

Person walking to an XY, not a location object

Is it possible to have a person object (not an operator TE) walk to an XY location, based on the values of labels on the person?

At the beginning of the run, the people are created in the model, then each is moved to random XY locations to represent their parking locations, using a Change Visual activity. (It's a big parking lot so I do not want to make a location object for each parking spot.) The people walk to the building and do their business using Walk and other People PF activities. When they are done I want them to walk back to the same parking location, but the Walk activity appears to want a location object.

To get around this, I tried using a Travel to Location activity, and it almost works - but it seems to be using a different origin when calculating the travel path, even if I uncheck "Relative", so they end up in different locations.

Here is a heatmap from early in the run, while they are in the building working. All of the initial parking locations are to the left.

untitled.pngHere is a heatmap after some of them return to their cars. You can see that they went to the right. I expect the heatmaps of this area from early and late in the run to look the same.

after.png

So is there a way to use Walk to get to an XY, or is there a way to fix the destination if I use Travel to Location?





FlexSim 23.1.1
people module
untitled.png (381.2 KiB)
after.png (46.9 KiB)
5 |100000

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

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered craig-dickson commented

The problem is likely going to be the coordinate space - which is where the objects are located. If you created a person at a location then logically they are contained in that coordinate space for travel. You can move the person into the model (and preserve the global position), or you can translate model coordinates to the person's coordinate space using the Vec3 method project. An example of translating (having created the person in a floor spot) is in the attached model.

PersonTravelToLoc.fsm


· 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.

craig-dickson avatar image craig-dickson commented ·

I'll try your example model now.

However, I actually created the people in the model ( model() ) and then moved them using Change Visual. So I assumed they'd still be using the model coordinate space when they get to the Travel to Location activity, but apparently not. (See screenshots of the PF below.)

Is there a way I can tell what coordinate space a person is currently in / using?

Thanks

create-person.pngset-location.png


And at the end of the shift:

walk-back-to-parking.png

The logic in between is strictly Walk and Delay activities - nothing tricky at all.


0 Likes 0 ·
craig-dickson avatar image craig-dickson commented ·

I was able to use your example that used .project() on the location vector to get it back to using the model() coordinates. Thank you.

0 Likes 0 ·