question

Theresa B avatar image
0 Likes"
Theresa B asked Theresa B edited

Using A* Navigation and Process Flow to avoid new objects in Floor Storage

Hi all,

I've been trying to make boxes deposited in Floor Storage act as obstacles, so that I can work out which is the best order to fill up a large and unwieldly floor storage space but I've come into a couple of obstacles myself.

I've tried the method in this question, Operator in a floor storage, and although the model included in the question functions as expected, when I try to use the same custom code it doesn't seem to work. I confirmed that the items deposited in the floor storage are added as members of the A* network but the transporters still pass through them.

(Perhaps @Emmanuel VS, you have some insight about the setting I need to change apart from the A* Properties?)

Otherwise, after implementing A* navigation, the way the floor storage is filled up is different on every run of the model. I expect each slot to be filled 4 high and yet sometimes, some slots are only filled up to 3 (usually the ones on the edges of the floor storage) and sometimes, boxes are placed outside the floor storage.

The process flow for the placement of the boxes looks like this:

1662392492013.png

You may remember it from my previous question. I tried to turn off the travel offset for load/unload tasks; however, when I do this, the transporter does not travel to slot to drop off (destination set to token.slot.as(Storage.Slot).storageObject) and the box just appears in the slot. There are no error messages with the travel - drop off activity.

Any insight on why this might be happening would be much appreciated!

FlexSim 22.2.0
processflowtaskexecuterfindslota-star
1662392492013.png (59.7 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

·
Emmanuel VS avatar image
1 Like"
Emmanuel VS answered Theresa B edited

Hi @Theresa B

A method recommended in that question was dynamic barriers.

If "token.item" is the reference to the object to be stored:

  • - When the "item" enters Floor Storage it uses the following syntax: AStar.navigator.addDynamicBarrier(token.item,0).

  • - When the "item" leaves Floor Storage, it uses the following syntax: AStar.navigator.removeDynamicBarrier(token.item,0);

In both cases you can do it with a Custom Code activity.

I hope the answer can help you.

· 5
5 |100000

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

Theresa B avatar image Theresa B commented ·

Hi Emmanuel,

Thanks for your help! The syntax you provided works - I had naively copied the lettercase used in the FlexSim manual and put

  • AStar.Navigator.addDynamicBarrier(token.item,0);

which did not work.

Additionally, my model seems to work without implementing the removeDynamicBarrier() function. What unexpected/hidden behaviours are at risk of happening if I don't include removeDynamicBarrier()?

On a different note, in the above process flow, you can see that I add the dynamic barrier after unloading to the Floor Storage but do you know if it's possible to add the dynamic barrier before the TE starts to travel? The object I'm moving is wider than the TE, so it is bumping into other objects, even if the TE is not.

Would this be where I should use the agent systems mentioned in that same question?

Apologies for the mass of questions and thanks in advance!

0 Likes 0 ·
Emmanuel VS avatar image Emmanuel VS Theresa B commented ·

Hi @Theresa B

Regarding remove barrier, I would understand that you shouldn't have any problems, but maybe some developer could answer that with more certainty (I've only used it in demos to test features).

Regarding your second question (which includes the width of the item), I would say that adding the dynamic barrier before the load could help. If you do a simple test (like the attached image) you will notice the difference in the path chosen by the task executors.

I hope the answer can help you.


DB_1.PNG

1 Like 1 ·
db-1.png (139.5 KiB)
Theresa B avatar image Theresa B Emmanuel VS commented ·

Hi, Emmanuel,

Thanks for the suggestion! It was a good little exercise to run and I can see how the operators are changing their paths to avoid the objects being transported.

This doesn't happen every time and there are collisions e.g.

1662496147463.png but I'm assuming this is something to do with the timing of when objects are added as a member of the A* network and when the path of the other operator is determined.

I'll continue to play with this. Thanks for your help.

0 Likes 0 ·
1662496147463.png (41.5 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Theresa B commented ·

The syntax you copied was probably the method title heading that shows the method as an attribute of the class AStar.Navigator. The code examples on that page show that you access the instance using the lower case 'n' for navigator: AStar.navigator.


so use:

AStar.Navigator asn=Model.find("AStarNavigator");
asn.addDynamicBarrier(item);

or:

AStar.navigator.addDynamicBarrier(item);
1 Like 1 ·
Theresa B avatar image Theresa B Jason Lightfoot ♦ commented ·
Ah, yes, that's what I did! Thank you, I'll be able to use the manual to much better effect now.
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.