question

Jason Merschat avatar image
0 Likes"
Jason Merschat asked Joerg Vogel commented

Network Node OnArrival Trigger not Firing

I have a TE on a Network. The Home Node for this TE (NN4) has an OnReset, OnContinue, and OnArrival Trigger to change the state of a label from 1 to 0 to 1, respectively. It seems that the OnArrival trigger is not firing.

I plan to use this label to make the crane wait for the TE to be present before unloading.

@Sam Stubbs, I believe you addressed this in a prior answer, but the user did not post their fix. You had asked for an example if found not to be triggering. I created a simple model to demonstrate. I appreciate any help

Jason

pf-car-test.fsm

FlexSim 17.2.1
network nodetriggeronarrivalnetwork nodes triggers do not fire sometime
pf-car-test.fsm (115.4 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.

Phil BoBo avatar image
3 Likes"
Phil BoBo answered Jason Merschat edited

This is not a bug. This is by design.

Your network path edges are non-blocking. The only time that the OnArrival and OnContinue would not fire at the same time is if the traveler got blocked at a node so that it could not continue. That doesn't happen in this case. Your traveler is always able to continue immediately after arriving at each node in this model.

You can look at the fromedge and toedge parameters to get more detail about what is happening during these triggers.

The toedge parameter will be 0 as he is arriving/continuing at his final destination node.

If you had travel offsets turned on, this behavior would make a little more sense, as you can see time and space where the traveler is off of the node at the destination.

With travel offsets turned off, the traveler is physically sitting at the point where the network node is, so it seems like he is still at that node and hasn't left yet. In reality, he has continued past that node and is no longer blocking it from others who would want to allocate it. That's why OnContinue has fired.

· 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.

Jason Merschat avatar image Jason Merschat commented ·

Thank you for the education. I will find another way to determine that there is a TE (any TE) actually at the particular NN. In the physical world this would act like a proximity switch or photo eye - Jason

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

I didn't take a look into the model. It looks like a runtime problem of when a tasksequence for the crane is created and the timing of the evaluation of the label.If the crane tasksequence doesn't contain a mechanism to test the label when the task sequence is executed and you evaluate the label instead when the tasksequence is created then the timing won't match. For such timing issues you use in the tasksequence the task type callsubtask. This type can divert the tasksequence to a OnMessage trigger or treenode where you can evaluate the state of a label and take an action in the active task sequence. The method you are looking for is waiting until a state changes. That's a typical situation for the ProcessFlow. You find activities which can wait for such event. You have to link the callsubtask with a sub process flow where you wait until an event or a label changes its state, set a state at the crane, suspend the action on the crane. When the label state changes you set a different state at the crane and return to the execution of the task sequence in the crane.

As you see it is a combination of executing a task sequence and ProcessFlow. Sorry that I haven't got an already running model demonstrating this.

· 6
5 |100000

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

Jason Merschat avatar image Jason Merschat commented ·

It's a much more basic problem. The OnArrival trigger is not firing on the Network Node. I haven't added the logic for the crane to wait yet because of the label issue on the node. Have a look at the model to see the problem if you'd like.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jason Merschat commented ·

I put the simple code line

print("i am here");// I add the trigger to the string, too. 

in the triggers of NN4 and I get an output.

0 Likes 0 ·
Jason Merschat avatar image Jason Merschat Joerg Vogel commented ·

I edited my script as you did to see the trigger firing timing. It seems the issue is that the OnArrival and OnContinue both fire simultaneously. They way I understand it is that OnArrival fires when a TE enters and OnContinue fires when a TE leaves a node. So this looks like a bug.

pf-car-test-1.fsm

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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