question

Gijs S avatar image
0 Likes"
Gijs S asked tannerp commented

MultiProcessor Process Time dependent on 'IF'-function

Hi,

For my model I want to make one process of my MultiProcessor dependent on the sign of a label. So, if the label ("ProcessTime") on a flowitem is negative (<0), the Process Time must be equal to 0. If the label ("ProcessTime") on a flowitem is equal or larger than zero, then the ProcessTime should take the value of that label ("ProcessTime"). I tried to construct this logic through the following expression, but it won't work:

if(getlabel(item, "ProcessTime") > 0, getlabel(item, "ProcessTime"), 0)

Can someone help me on constructing this logic, thanks in advance!

FlexSim 19.2.2
process timeif
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

Before you start to assume the structure of a Flow Construct you can read the chapter in the manual:

Writing Logic in FlexSim. There you see the syntax of an if construct under the headline

Flow Constructs. Writing a source code consists of syntax and code words. You can't assume and believe that it will work. You must follow the rules of the language. And a manual isn't the worst document to look for an answer. Maybe you find your answer not on the first three pages, then you look into the content table. And if you think this isn't appropriate way to learn a language by looking into a reference manual, then you can visit training courses.

5 |100000

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