question

Tommy Heyser avatar image
0 Likes"
Tommy Heyser asked Tommy Heyser commented

Synchronize Release Wave

Has anyone come across the following error message when using Synchonize with the Max Wait Timer option ticked? In the OnWaitTimerFired, the "Release Wave" command is pre-defined. I removed the Set Label command.

time: 1.000000 exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... MAIN:/project/exec/usercommandlist/Process Flow/releasewave/node c: MAIN:/project/exec/usercommandlist/Process Flow/releasewave/node i: MAIN:/project/exec/usercommandlist/Process Flow/releasewave/node thisClass: MAIN:/project/exec/usercommandlist/Process Flow/releasewave/node

I'm running FlexSim 2018 Update 2, 18.2.3.

max wait timersynchronize
· 2
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 ·

Please attach the model.

0 Likes 0 ·
Tommy Heyser avatar image Tommy Heyser Joerg Vogel commented ·

Please see attached file, releasewave.fsm. I couldn't attach my working file, but I created a new model that resulted in the same error.

What I'm trying to achieve is a push to/pull from list logic that triggers on a periodic cycle. If the pull activity before the Synchronize doesn't occur within a set time (Max Wait Timer time) then I expected the Synchronize activity to release the token from the Delay activity. What I'm seeing is the error in the System Console and a token appearing in the Push to List, even though a token remains in the Pull from List.

0 Likes 0 ·
releasewave.fsm (22.2 KiB)
releasewave.jpg (70.4 KiB)

1 Answer

tannerp avatar image
1 Like"
tannerp answered Tommy Heyser commented

The problem we found was that the OnWaitTimerFired logic was incorrectly looking for the token's parent and didn't have a designated connector.

See the attached image for the corrected values.

Let us know if this helps!


hereyago.png (15.9 KiB)
· 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.

Tommy Heyser avatar image Tommy Heyser commented ·

Hi Tanner, thanks for your reply. However, that's not quite what I'm after with the logic. In your example, the token coming down the pull from list side of the Split ends up on the delay side, rather than going to the push to list.

I was hoping to use Release Wave to release any and all tokens waiting at the Synchronize activity to the output connector with the same rank as the input connector. Perhaps my understanding of "Release Wave" is incorrect.

Having said that, I've taken your suggestion of using "Release Token" and instead of specifying a static value for the Destination, I used an Assign Labels activity to set the value of a label on the child token (first declared on the Split activity) with a value of the intended destination. This effectively ties the pull & push activities to a "clock".

I am using this to tie multiple sets of pull & push logic together, using another synchronize after the clock-side Delay, so that when all sets have successfully pulled a token, they all wait for the clock before pushing their respective token. In the event that one or more of the pulls cannot pull a token, their clock still ticks along and doesn't stop others that did successfully pulled a token.

0 Likes 0 ·
releasewave.jpg (188.7 KiB)