question

Oleksii avatar image
0 Likes"
Oleksii asked Felix Möhlmann commented

Combiner as a resource to load it via ProcessFlow

Dear FLEXSIM experts. When I use Combiner as a resource to load it via ProcessFlow I am missing ports. I want to use the Join operation. Can I use: when loading Combiner for the main port #1 token.Combiner.inputObjects[1] and for port #2 token.Combiner.inputObjects[2]? That being said, for port #2 I need to send 2 parts to start the process. Thank you in advance!

FlexSim 25.0.1
combiner as a resource to load it via processflow
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
The combiner object needs (at least) two input port connections to work correctly. You could just connect two dummy queues and unload to them or specify the port in the unload task.

How much of the logic comes from the Process Flow? If it is already responsible for transporting the right amount of items then you don't need a combiner at all and could just use a queue to hold the items while the Process Flow handles the combining.

0 Likes 0 ·
Oleksii avatar image Oleksii Felix Möhlmann commented ·

Dear Felix ,

thank you for your reply

The combiner object needs (at least) two input port connections to work correctly. You could just connect two dummy queues and unload to them or specify the port in the unload task.

So I can set up two dummy queues to have two input ports and load the required parts into these ports? In this case is it correct to specify when the first port is needed in the unloading direction operation for 1 part (main): token.Combiner.inputObjects[1] and for the second port where I should put 2 more parts to be joined: token.Combiner.inputObjects[2]?


How much of the logic comes from the Process Flow? If it is already responsible for transporting the right amount of items then you don't need a combiner at all and could just use a queue to hold the items while the Process Flow handles the combining.

In my case, the combiner is a press that presses two wheels onto an axle. After the pressing operation is complete, I need to get one part out of the three parts: the wheelset. Also in the future I will need statistics for this pressing operation.

0 Likes 0 ·

1 Answer

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

The correct expression is "inObjects[]", not "inputObjects[]", but yes, that is one option.

You can also use the Custom Task activity which allows you to specify additional parameters of the unload task, including the port number. In that case the position of the dummy queues does not matter.

combiner-load-process-flow.fsm

In theory you can make the combiner work without input objects that way, if you set the "targetcomponentsum" variable to the correct value on model reset. But adding the two dummy queues is certainly easier and not risking any unforeseen issues.

combiner-load-process-flow_1.fsm


· 4
5 |100000

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

Oleksii avatar image Oleksii commented ·

Dear @Felix Möhlmann ,

Thank you for the very detailed explanations!

But in two examples when I set the cycle time for example 60 s - the Combiner overflows and an error appears. It is necessary that no new parts are loaded on the combiner until the end of the cycle time:

1st example:

time: 101.534652 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 101.534652 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

time: 101.534652 exception: Exception caught in TreeNode::receivemessage()

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

time: 117.663954 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 117.663954 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

2nd example:

time: 100.775116 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 100.775116 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

time: 100.775116 exception: Exception caught in TreeNode::receivemessage()

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

time: 100.931323 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 100.931323 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1


Please see what's wrong.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Oleksii commented ·
This is only a problem when unloading directly to the combiner and needs to be prevented in the Process Flow logic. For example by first acquiring the combiner as a resource or waiting until the previous item exits before new transports are started.
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

The combiner object needs (at least) two input port connections to work correctly

Both input connections can be drawn from one object.

combiner-2-input-ports.jpg

0 Likes 0 ·
Oleksii avatar image Oleksii Joerg Vogel commented ·

Dears @Joerg Vogel @Felix Möhlmann ,

Thank you for the very detailed explanations!

But in two examples when I set the cycle time for example 60 s - the Combiner overflows and an error appears. It is necessary that no new parts are loaded on the combiner until the end of the cycle time:

1st example:

time: 101.534652 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 101.534652 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

time: 101.534652 exception: Exception caught in TreeNode::receivemessage()

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

time: 117.663954 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 117.663954 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

2nd example:

time: 100.775116 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 100.775116 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

time: 100.775116 exception: Exception caught in TreeNode::receivemessage()

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

time: 100.931323 exception: Exception Caught in Combiner::onTimerEvent(treenode involved, int code, char *datastr) object: /Combiner1

time: 100.931323 exception: Exception Caught in ObjectFunction246__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Combiner1 class: /Combiner1

Please see what's wrong.

0 Likes 0 ·