question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked Omar Aguilera Rico edited

Query / Array in Acquire

Hi. I'm trying to use the Query in an Acquire, I'm new to this. I've been trying to solve my problem for several hours, but I have not managed it. What I try to do is that in the Query when the name of the station matches the label that is called "Capacitado" of the Operator, only that it is an array labeled "Capacitado". For example, if I need an operator named station "Maquina_6" to fence and search inside the Operator label called "Capacitado", if the same name exists in the array, and if so, pull the operator.

I hope it was clear, if not please tell me and I will try to explain it better.

array-1.fsm

FlexSim 18.2.2
queryacquire resource
array-1.fsm (85.7 KiB)
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

·
Omar Aguilera Rico avatar image
1 Like"
Omar Aguilera Rico answered Omar Aguilera Rico edited

Hi @Jörg Vogel!

I did not find the answer you gave me, apparently it was deleted. On the other hand, I already found the solution. Attach the model to make it clearer. I also write the Query that I use to do it.

WHERE value.Capacitado.indexOf("Maquina_10") >= 1

In this case, use "Maquina_10" since only one operator has assigned it to check that it works correctly. As expected, it worked!

What I'm really doing is looking inside the label that has the resource the word "Maquina_10", since the indexOf returns the position in which it is found to always be greater than one as long as it exists.

array-2.fsm


array-2.fsm (84.7 KiB)
5 |100000

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

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.