So, I am modelling an AGV system and I would like to be able to choose where the AGV goes depending on the entity that it is currently carrying, i.e. the transporter carrying the red entity goes to SP1 and the transport with the blue entity goes to SP2.
I would like to be able to access either the name of the entity or a user-defined attribute of the entity.
I hope I made myself clear
Solved! Go to Solution.
You can create a new attribute in your AGV, call it for example "CarriedColor" and when you create an MU on your AGV change this attribute according to the color.
When the carried MU is red :
AGV.CarriedColor := "red" ;
In the FlowControl, choose "MU Attribute" and open list :
Attribute || Value || Successor
CarriedColor red 1
CarriedColor blue 2
I hope it helps.
You can attach the method in the Entrance Control of your AGV.
And when your MU will be transfered on your AGV, the Entrance Method will be woke up in order to change the "CarriedColor" attribute.
The Entrance Method will look like this :
is do local myMU : object := @ ; local myAGV : object := myMU.location -- (OR self.location if the Entrance method is one of the AGV's attributes). myAGV.CarriedColor := myMU.Str_color; -- (Str_color is an MU attribute when you create your MU you should affect the right value according to MU's color) ; end;
Tell me if it's clear for you !