question

WillRS avatar image
0 Likes"
WillRS asked WillRS commented

Help writing SQL syntax

In this model, trucks arrive and use docks for loading and unloading. At first, type 1 trucks arrive. However, when type 2 trucks arrive, they have priority for loading.

I tried to build SQL syntax by integrating WHERE with ORDER, but it didn't work.


1729287031227.png

problem-sql-syntax.fsm

FlexSim 23.0.15
warehouselogisticsload unload
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered WillRS commented

Which token gets to acquire something first is controlled by the "Back Order Queue Strategy" you can set in the resource's properties.

It also takes the form of an SQL query ORDER BY clause where "puller" references the token. The following would allow tokens with a higher "Tipo" label to acquire a dock before others.

1729490555030.png


1729490555030.png (11.8 KiB)
· 3
5 |100000

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

WillRS avatar image WillRS commented ·

Thanks Felix, this worked!

But I have a question about how to write an SQL syntax, using WHERE and ORDER, directly in "Acquire". Isn't that possible?

Thank you very much!

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ WillRS commented ·

Hello @WillRS,

The query on the acquire activity will be for the resources. The back-order strategy query will be for the tokens acquiring the resource. In the case that you want to order the tokens, you will apply a SQL query to the back orders like he described. You will find this in the advanced options for the resource.


1729538113039.png

0 Likes 0 ·
1729538113039.png (35.4 KiB)
WillRS avatar image WillRS Jeanette F ♦♦ commented ·

Okay, I understand

Thanks!

0 Likes 0 ·