question

Marco B8 avatar image
0 Likes"
Marco B8 asked Marco B8 commented

Find the position of elevator and TaskExecuter

Hi at all.

In my model I have a rack, an elevator and 2 types of task executer (2 shuttle and 2 satellite).

I would like to know how to find the exact position of the task executer when they are not on the ground floor (they can move on x, y - if are on the elevator - and z direction - because the rack can contain more than 1 item on each aisle). This because, based on this information, they have to do different work or going in different way using a "decide" activity.

FlexSim 17.2.5
taskexecuterposition
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

Joshua S avatar image
1 Like"
Joshua S answered Joshua S commented

You can access the objects position using

YourObject.location

which will return the objects x,y,z position. Now there are several things that you might need to do to get the object's location depending on the scenario. If it is part of another object, like you moved it onto the elevator, you need to add it's location to that of the elevators position to get its global position. To reference an object you might need to use this as well so that it recognizes it as an object.

YourObject.as(Object).location
· 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.

Marco B8 avatar image Marco B8 commented ·

Thanks for your answer Joshua!

There is a method to assign to a variable, ad exemple, the z location using a custom code?

0 Likes 0 ·
Marco B8 avatar image Marco B8 commented ·

I'm attacching you the model on which I'm working. As you can see, in some "decide" activity I have to send the lift in a particular position. To do this I need to know where it is in that moment.

I hope you can give me a suggestion because I really don't know how to do!!!

10-versione-1.fsm

0 Likes 0 ·
10-versione-1.fsm (96.7 KiB)
Joshua S avatar image Joshua S Marco B8 commented ·

Can you snapshot which decide activity you want to change?

0 Likes 0 ·
Marco B8 avatar image Marco B8 Joshua S commented ·

I would like to change the 2 activity in the red box and change, consequentelly, the two activity that follow them.

decide.png

0 Likes 0 ·
decide.png (80.3 KiB)
Show more comments