Wait for event - On deallocation

Wait for event - On deallocation

JesúsPR_Talumis
Contributor Contributor
367 Views
1 Reply
Message 1 of 2

Wait for event - On deallocation

JesúsPR_Talumis
Contributor
Contributor

[ FlexSim 24.2.1 ]

Hi!

This seems to be a wrong name/field in the wait for event activities for Label Matching/Assignment when listening to the On deallocation event. The description in the web documentation mismatches the one given in Process Flow:


1726237757389.pngscreenshot-2024-09-13-161925.png

Thanks in advance!

Jesús

368 Views
1 Reply
Reply (1)
Message 2 of 2

logan_gold
Community Manager
Community Manager

Hey @Jesús Padilla, sorry we missed this one.

I think having Allocator is appropriate in this case. If you add an On Deallocated trigger to a Control Area (through its Properties), you can open the Code Editor, and it shows this in the code header:

AGV.AllocatableObject current = ownerobject(c);
Object allocator = param(1);
TaskExecuter te = isclasstype(allocator, CLASSTYPE_TASKEXECUTER) ? allocator : 0;
AGV agv = te ? AGV(te) : 0;

The only parameter passed into this trigger is identified as the allocator and initialized as an Object. The code then tries to cast allocator as both a TaskExecuter and an AGV to make it easier to access the properties for both classes.

The On Deallocated trigger can be used to make custom prioritization strategies, and the parameters (TE and AGV) might be used elsewhere in the software too, but I'm not sure about that. But since the trigger can be used elsewhere, I think that is why we have the parameters described in the user manual.

I guess the only thing is if you were to try to set up the On Dellocated trigger for custom prioritization using Process Flow, you may want to set up additional labels on the token for TE and AGV, using similar code to how the code of the trigger does it.

0 Likes