question

Claire Krupp avatar image
0 Likes"
Claire Krupp asked Claire Krupp commented

How to connect many People to a Mandatory Path in AStar?

I have about 1000 people per shift, created by a Date-Time Source in Process Flow. I need them to take a mandatory path in a congested area. I set the condition on the path so that they should use it, but they are ignoring it. The manual says I have to set "Must Use Mandatory Paths" on the properties of the traveler object, but I can't do that as the people are not created yet. (And anyway there are 1000 of them so that is not feasible)

Is there a label or command that I have to use in the process flow logic to make them use mandatory paths?

FlexSim 19.0.0
astarpeople flowmandatory path
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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Claire Krupp commented

We don't currently provide a command to do this, but this code snippet will do it:

treenode person = token.Person; 
treenode traveler = person.find(">variables/navigator/1+");
setsdtvalue(traveler, "useMandatoryPath", 1);

You could place this snippet in a custom code right after creating the person.

· 4
5 |100000

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

Claire Krupp avatar image Claire Krupp commented ·

Thank you! I will try that.

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp commented ·

Well it worked as far as checking the "Use Mandatory Paths" box, but then the behavior goes haywire as every single person jumps directly to the Mandatory Path, even though their desired path is not even close to this area. (It represents a staircase that some of them use to get to the Canteen for lunch.) They get stuck on the path and never get out again!

I have sent the model to [email protected].

Meanwhile I am going to find a different way to deal with the gridlock! Maye if I increase the Preferred Path "weight" it will work better?

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Claire Krupp commented ·

Mandatory paths are designed to work that way. If a traveler is using mandatory paths, then they only walk on mandatory paths. They never walk on nodes that aren't mandatory paths. This is useful for situations such as using AGVs on the A* network on certain paths in conjunction with people who can travel anywhere.

Yes, what you want is probably preferred paths, not mandatory paths.

1 Like 1 ·
Claire Krupp avatar image Claire Krupp Phil BoBo ♦♦ commented ·

Thanks for the clarification. I misinterpreted the manual description.

The preferred paths are mostly working for what I need, although the people do seem to keep trying to get away from them!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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