question

Paula Carneiro Martins avatar image
0 Likes"
Paula Carneiro Martins asked Paula Carneiro Martins commented

Acquire resource using a negative query saved in a token label

Good morning,

I am working in a project that I need to acquire an specific Manifold (Resource), depending on the restrictions of access.

We have 3 Manifolds available, and the raw material (MP) can have 3 main sets:

1) Access only 1 manifold : Query needs to be : "WHERE manifold==possible manifold"

2) Access all manifolds :Query needs to be : "None"

3) Access more than 1 and less than all:
Query needs to be : WHERE manifold!=impossible manifold[1] AND manifold!=impossible manifold[2] AND manifold!=impossible manifold[n]

For the 2 first situations, I have sucess using the code that I used (Model attached) , But for the situation 3, the code is not working.


Can you please, help me out!

FX_Example_Manifold_v01.fsm


FlexSim 21.0.4
queryacquire resourceflexsim 21.0.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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Paula Carneiro Martins commented

The label lb_numManifold has a string value, but the query in the 3rd case is putting a number in the query.

WHERE  lb_numManifold != 2

You need to put quotes around the number so the query is looking for the string version of that number

WHERE  lb_numManifold != "2"

fx-example-manifold-v01_string.fsm


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

Paula Carneiro Martins avatar image Paula Carneiro Martins commented ·

Thanks @Matthew Gillespie , it works for me! The model was with the manifold2 was inside manifold3, because of that I will attached the correct model here with your solution. Thanks.fx-example-manifold-v01-string.fsm

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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