question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

Triggers not working

I have my resource(queue or processor) available summary in a globaltable(TableCheckAvailableResource).

1631761863543.png


When a task is created, the number of resource available in table minus one, whenever product exit the resource the number +1 by setting in triggers.


I'm using the same way in a process flow from AGV's point of view(the process flow named "Object"), AGV will look for task to execute. Now I'd like to let product create new task, and dispatch the task to AGV. AGV reads the task information from a table(the process flow named "Object2_AGV process flow" and "Product_ProcessFlow").

I cannot find the reason why resource available summary in a globaltable only decrease by using these 2 flows, when product exits, the number never increase again. I think this cause product not able to find it's destination.


0916.fsm

FlexSim 21.2.0
global tabletriggers
1631761863543.png (16.8 KiB)
0916.fsm (1.4 MiB)
5 |100000

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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered shanice.c commented

The triggers work correctly. If you set a break point in the code and step through it you will see the cell value correctly increase. However, the "Process Finish" event also causes the corresponding token in the "Product_ProcessFlow" to move on and re-enter the "Code: Determine TaskType" activity. There the value is decremented again. As this happens at the same model time, the table won't get updated between these when you run the model normally.

Aside from that I get an error at 327s, because you don't cover the case that the query in some of the "Assign [Transporter, FromStation, ToStation] & Look for Destination" activities doesn't return any rows.

· 3
5 |100000

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

shanice.c avatar image
0 Likes"
shanice.c answered shanice.c commented

@Felix Möhlmann

But why the value is decremented again if I have put a delay, and re assigned it's FromStation. Shouldn't it become another new Tasktype, as the token.product label is changed? So the value be decremented will not be the same.

1631779551255.png


1631779551255.png (6.7 KiB)
5 |100000

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