question

Patcharin B2 avatar image
0 Likes"
Patcharin B2 asked Andrew O commented

Assign Token Label vale by Object Location.


Hello every one. In this model I try to building logic of elevator.

1672414813924.png


I assign token label name "Priority" for use in Queue Strategy of resource activity (lift) for switch between OUT Order and IN Order.

When the Priority of some order is higher than another order, it will be just acquire in the same order repeatedly. So, I want to assigned priority by Elevator Z location.

1672415598771.png

From picture.

First I try to assign label "lift high" for collecting Elevator Z location. Then I assign label "Priority" and use condition value for assign value of priority between 2 and 1 condition by Z location of Elevator but it can't.

How can I solving this problem to assign label value condition by object location at any moment of time. Thank You.

Elevator Test.fsm

FlexSim 22.2.2
elevatorlabel valuetoken labelsvalues by casecondition value
1672414813924.png (252.0 KiB)
1672415598771.png (920.2 KiB)
elevator-test.fsm (58.6 KiB)
· 1
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
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

Student tips:

Don't put spaces in your token names.

The syntax for the elevator height is:

  1. elevator.location.z

The traveler height in elevator space is:

  1. traveler.location.project(traveler.up,elevator.up).z

location is an object attribute so you often need to cast the thing you've found using .as(Object) as Model.find returns a treenode.

Read the system console output - it's telling you all these problems.


5 |100000

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