question

Skovdestudents avatar image
0 Likes"
Skovdestudents asked Skovdestudents commented

Combiner stuck collecting, collects wrong item

Hello FlexSim forum,


I have an issue with my model that my combiner is not collecting items from its supposed port.

In this image you can see that it is stuck in collecting even though items are available from Input Port 2: 1681796770617.png


I am using a processflow to move units from source2 in to queue2 when they are created. But for some reason the combiner does not take items that are inside queue2 but instead waits for the source to generate objects and takes those that are sourced and moved into queue2 with processflow.


I also have this error text that I'm not sure how to tackle...


exception: Exception caught in TreeNode::receivemessage()

exception: Exception caught in Executive::processeventinlist().

exception: Exception Caught in Source::onTimerEvent(treenode involved, int code, char *strdata) object: /Source1

exception: Exception Caught in ObjectFunction250__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Source1 i: /Source1 class: /Source1


There is a lot of code etc in the processflow but there is no logic involved in moving items from queue2 to Combiner1.

I move items with processflow from queue1 to Combiner1, before I upload I didnt and it does not seem to affect the current issue. I find it hard to troubleshoot this issue further.


I do found that the Queue2 is in "collecting" mode, and Queue1 is in "releasing" mode, maybe this can be the cause. But I cant understand why. Maybe it has something to do with the error text. I try to manually set the state of Queue2 to releasing state but it stays in collecting.


1681797601973.png

EDIT: Simply deleted the Queue and Combiner and replaced them and Queue2 is no longer stuck in collceting but the same problem still applies.

Regards in advance


test.fsm

FlexSim 23.1.0
combiner
1681796770617.png (103.2 KiB)
1681797601973.png (66.2 KiB)
test.fsm (70.8 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Skovdestudents commented

It's a timing issue. Moving the item from the sources to the queues immediately when the OnCreation event fires interrupts some internal logic in the source (which generates the error messages you are seeing). Something about these errors then stops the items from being from the queue correctly.

Simply placing a 0s delay after the event fires will fix this.

capture1.png


capture1.png (30.8 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.

Skovdestudents avatar image Skovdestudents commented ·
Thanks for the fast respone! This solved the issue
0 Likes 0 ·