question

Leandro Meirelles avatar image
0 Likes"
Leandro Meirelles asked Jeanette F commented

Query array label issue on Acquire Resource

Hello,


I got 3 Machines, each Machine has a label (.numMachine) containing an integer 1, 2 or 3. Ex: Machine1.numMachine = 1.

I got a box (flowitem), storing an array label (.numMachines) containing the number of the Machine that it was processed. Ex: Box1.numMachines = Array[2]: {1,2}.

So now i want to Acquire a new Machine for the box to be processed, but can't be the same that already was processed by, so if my box was processed by Machine1 and Machine2, i want to acquire Machine3.

1737138314019.png

How can i write a correct query logic?

FlexSim 24.2.3
queryarray
1737138314019.png (215.4 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 @Leandro Meirelles, 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
0 Likes"
Joerg Vogel answered Felix Möhlmann commented

Have you tried to use:

NOT IN

followed by an inserted array clause?

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

"Pulled" and "token" are not valid keywords in the query. The thing that is queried can be accessed through "value" (though any text that has no other meaning will automatically be interpreted as a label on the value). Other parameters can be passed into the query through the use of "puller". In an Acquire activity the puller is always the token (in Pull from List the user can specify the puller).

So the query should be

WHERE numMachine NOT IN puller.item.numMachines
0 Likes 0 ·