question

Avelino Palulan avatar image
0 Likes"
Avelino Palulan asked Jason Lightfoot edited

Can I have two conditions for a pull flow system?

Can I tweak the pull system of flow to have two conditions? I need it to match two labels that I've set in my line, one is for its part name, and one is for test type.

FlexSim 7.5.4
pullflexsim 7.5.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.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

Hi Carlo, You can change the pull requirement code to check two lables - open the code editor and replace it with this.

treenode current = ownerobject(c);
treenode item = parnode(1);
int port =  parval(2);
/***popup:SpecificLabel*/
/**Specific Labels*/
string labelname = /** \nLabel1: *//***tag:label*//**/"labelname1"/**/;
double value = /** \nValue: *//***tag:value*//**/1/**/;
string labelname2 = "labelname2";
double value2 = 1;
return getlabelnum(item,labelname) == value&& getlabelnum(item,labelname2)==value2;

The popup will only display one label so altering the values will mean opening the code editor.

As you're on such an old version of FlexSim I'd strongly recommend you consider getting the latest version where your support options and modelling features and greatly enhanced.
· 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.

Avelino Palulan avatar image Avelino Palulan commented ·
Thanks, Jason! I tried it but it didn't work, guess it was the version that is not accepting the additional parameters. Nonetheless, I'm grateful for the help. Being a new FlexSim learner is easier with people like you!
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Avelino Palulan commented ·

What do you mean by it didn't work? The code logic will work - but the pop-up template will only show one parameter. I advise you step through with the debugger to check the labels exist and you have the correct spelling etc. You need to change labelname2 and value2 to reflect the second label you want to check.

0 Likes 0 ·