question

carlo.t avatar image
0 Likes"
carlo.t asked Jeff Nordgren commented

On reference to node triggers not firing properly I deliver You a little model.

oncontinuetriggerdoesnotfire.fsmI don't know where I've made a mistake, but when the task executer 1 tries to reach the 1st node on the left and it passes through the previous node NN6, the continue trigger of Node NN6 does not fire. Thanks in advance for your support.

FlexSim 7.7.2
network nodes triggers do not fire sometime
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Source code line in the OnReceiveTasksequence Trigger Taskexecuter1

inserttask(ts,TASKTYPE_TRAVEL,node("NN2", model()),NULL);// JV

force the taskexecuter to travel to NN2 in each tasksequence.

The following line in the OnContinue Trigger of NN6 prints "OnContinue " and the edge the traveler goes to in the Output Console.

pr();pt(concat("OnContinue ", numtostring(toedge)));// JV

And you see, the taskexecuter1 fires in NN6 the OnContinue Trigger

1 Like 1 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·

@carlo.timossi

Carlo,

When I run your model, task executer 1 never goes back through NN6 going to NN2. Your code will only fire in the OnContinue when the node that is being traveled to is NN2. I don't see that ever happening in your model. What am I missing? Can you give more details as to exactly what is supposed to happen in the model?

1 Like 1 ·
carlo.t avatar image carlo.t commented ·

Task Executer1 comes back to node NN2, which is a parking node, in order to allow the Task Executer2 to go to the maintenance position, which is its reset point: this is due to the fact that there is only one rail which connects all the stations in the plant. When the Task Executer1 reaches node NN6 and continues to NN2 it sends a message to dispatcher in order to open the way for the Task Executer2 which is blocked at node NN16.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel carlo.t commented ·

@carlo.timossi, yes, that is OK. But as @Jeff Nordgren has pointed out the attached model runtime ends 480s after start and until that time the Taskexecuter1 has never traveled back to NN6. The Taskexecuter starts from the parking node, then the Taskexecuter travels via NN6 to a processor. Though the Trigger OnContinue fires once for the Taskexcuter1. In my Test I haven't found any error. The model behaves as you have described it. So when should the Taskexecuter1 travel back to the parking node and fire again the OnContinue-Trigger?

1 Like 1 ·
carlo.t avatar image carlo.t commented ·

2348-oncontinuetriggerdoesnotfire.fsmThe TaskExecuter1 travels back to the parking node when the TaskExecuter2, serving the Queue2, enters on maintenance and goes to its reset position. In any case, I've made some changes to my little model, taking into account your suggestions, and now it works fine. In this version the trigger OnArrival of node NN2 fires when TaskExecuter1 reaches it and send a message to the dispatcher in order to allow TaskExecuter2 to cross node NN16 and go towards its reset position. When the replacing machine TaskExecuter3 reaches the node NN16 in order to serve Queue2, the TaskExecuter1 is freed sending freeoperators to dispacher and including TaskExecuter1 as 2nd argument. Perhaps it is possible to block the TaskExecuter1 when it arrives at NN2, without setting it into UTILIZE state, but I haven't had no success in doing it. I annex here .my last version of the model. Thanks all for your support and advices.

0 Likes 0 ·

1 Answer

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered

@carlo.timossi

Carlo,

I found the problem with your model. In the Dispatcher OnMessage trigger line 75, you were setting the first parameter to TEi, which is a reference to a TE. Normally, this would be a reference to a flowitem that is being "worked" on. But because no flowitem is involved in this Utilize task, the first parameter should be NULL and the second parameter, by default, should also be NULL. So I changed that line of code.

Then in NN16 in the OnArrival code on line 22, you specified the dispatcher as the TE to free and as the second parameter (usually the flowitem but per the above paragraph we used NULL) the TE. I changed this line of code to use the TE as the first parameter and NULL as the second parameter.

This seems to have cleared the problem of TE1 not getting freed up. Check out the attached model and see if it is now doing what you are wanting it to do.

oncontinuetriggerdoesnotfire-1-jn1.fsm


5 |100000

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