St_shi avatar image
St_shi asked Jeanette F commented


Hi, I recently started using this program and I have problems with the logic of the model.

I am creating a simulation in "flexsim 2022 update 2", using the "combiner" element. This element in the simulation connects the "pallet" object and the "Box" object in the amount of 60. I need to create a logic in which the "combiner" connected the "pallet" and the "Box" object in the right amount of the "Box" object with the label "Typ" and a value of 1 on the "pallet", but at the same time if the "Procesor" element is idle, and the next element is "queue" , which is the warehouse for the "Box" object before it enters the "combiner", will be empty. "combiner" will be able to start the process of processing their combination, provided that there is at least one "Box" element on it.

The code looks like this:


Do you have any thoughts that could solve this problem?

FlexSim 22.2.0
combinerlogicusing code
work.png (28.6 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @St_shi, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
Joerg Vogel answered Jason Lightfoot commented

“c” is a reference to the current code node. Currently your code travers through subnodes of current code node. This makes only sense, if you have subnodes for your code node or your code node is a container node. References in a programming language have a meaning. Please test it or read about it in reference manual before you assume something that does not exists. We recommend to attach example models to questions, because then we can identify the environment your code is meant for.

· 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 Lightfoot avatar image Jason Lightfoot ♦ commented ·
Also - if you're unsure, you can place breakpoints in the code and look to see the local variable values when they are set.
1 Like 1 ·