question

Aldo G11 avatar image
0 Likes"
Aldo G11 asked Felix Möhlmann commented

Change Position of Created Item

agv-trailer-load-and-unload_1.fsmHello everyone, I'm using a model based on the one posted here (https://answers.flexsim.com/questions/70730/how-can-i-simulate-a-tractor-trailer-in-flexsim.html) which I'm using now; so the question is: how can I change it in a different position for a different shape? I'm using a different shape but appears on the Task Executer like this:

1658758608140.png

and I want the edited shape to appear on the Task Executer look like this:

1658758732088.png

In other words; can the position of the axis "y" and "z" be changed from the already existing Process Flow and make every object created from the Process Flow stick to the modified "y" and "z" coordinates?

I looked onto the Custom Code and find out that the marked number changes the position only on the "x" axis, so maybe there's a part of the code that changes "yz"?

1658771372573.png

Hope you see my question, and thank you in advance...cheers!

FlexSim 22.0.5
agvcodeaxis change
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
A Trailer is following or advancing in front of direction of travel. This is typically an x-coordinate. BUT you can also tell your objects additionally to show up at a different location once it is attached as a trailer. You change the item location values after attaching as a trailer
token.item.as(Object).location.z = 1;

This places your item level of 1 distance unit in relation to your Taskexecuter.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·
If you need a trailer, which is following in an offset in normal direction to travel direction, you are changing not only just a location but also a path behavior. Then you should think about a different kinematic approach where you places the shape of your Taskexecuter in relation to your object frame, which looks like your trailer is moving on AGV path and your Taskexecuter shape moves with an offset next to the path.
0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

In the attached model the custom shape objects aren't attached as trailers but moved into the totes that are serving as trailers.

There are multiple ways to adjust their location (easiest to most complex - in my opinion):

1) Use a 'Change Visual' activity in the process flow to adjust the location after the items are moved into the totes.

1658824129032.png1658824145162.pngagv-trailer-load-and-unload-1_1.fsm

2) Edit the packing method of the tote in the FlowItem Bin, so any entering objects are automatically placed correctly. Essentially using 'object.setLocation()' to do the same adjustment as the activity above.

1658824254102.png

3) Edit the shape factors so that the visual location of the custom shape relative to its bounding box is chosen in a way that neither of the two options above is necessary.

1658824221582.png


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

Aldo G11 avatar image Aldo G11 commented ·

Thank you for your answer Felix, I succeed to place it on the right place, but now I'm having an issue adding more AGV's, do you know what's the issue here? The TaskExecuters get stuck when they reach the PickupPoints. I'll attach the model...Trailer Tests.fsm

0 Likes 0 ·
trailer-tests.fsm (151.2 KiB)
Felix Möhlmann avatar image Felix Möhlmann Aldo G11 commented ·

While TaskExecuter2 is loading its second item, the item assigned to the third pickup cp is pulled by TaskExecuter1. Due to this, when TE2 finished loading, it doesn't find any more items to load at the current point, so the token moves back to the beginning of the main loop.

1658988732563.png

1658988813299.png

Because the pickup points don't have a 'NextLookForWork' connection, the token then gets stuck trying to pull the next cp to travel to.

0 Likes 0 ·
1658988732563.png (98.5 KiB)
1658988813299.png (49.9 KiB)