question

Anutt K avatar image
0 Likes"
Anutt K asked Anutt K edited

Use Find slot and ORDER by slot label. Incorrect model run

Hello. I will simulation of auto car parking garage. And I use Find Slot activity for assign priority for select parking slot. But it incorrect from logic

1667324116714.png1667323983518.png

I use Floor Storage to be parking slot and painted slot label for use in logic of car into parking process. The yellow zone are painted slot label and the red zone of Floor Storage are not painted any label. (Zone A : Yellow, Zone B : Red )

1667324189585.png1667324211924.png

I use this logic for find slot for car into parking by condition "WHERE slot.hasSpace($1.car_in) ORDER BY [IN_Lift_1] ASC" (slot must has space and sorting to select parking slot from distance of each lift from the slot label painted)

1667324383458.png

But the slot of red zone are selected to use for parking slot. Even though the red zone are not painted any slot label.

1667324630888.png

Then I test to deleted all of red zone (has a yellow only). It can find and select the slot at nearest of lift from logic. Even though It use the same logic

I has attached 2 file for compare it.

Test1.fsm : Have a Yellow and Red Zone.

Test2.fsm : Yellow Zone only.

Thank You so much for help.

Test1.fsmTest2.fsm

FlexSim 22.1.1
storage systemfloor storageslot labelsfind slot
1667323983518.png (282.8 KiB)
1667324116714.png (275.2 KiB)
1667324189585.png (108.9 KiB)
1667324211924.png (27.5 KiB)
1667324383458.png (461.6 KiB)
1667324630888.png (320.6 KiB)
test1.fsm (608.4 KiB)
test2.fsm (287.1 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Anutt K edited

Since you left the Default Value field of the label blank it is treated as 0 when evaluating the order.

Either use a high default value (which would mean the slots will still be filled, but only after all yellow spaces are taken) or give a second condition "WHERE [IN_Lift_1] > 0", to filter out slots where the label is not set.

1667325502726.png

1667325561926.png



1667325502726.png (8.4 KiB)
1667325561926.png (9.6 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.

Anutt K avatar image Anutt K commented ·

OK. it work. If I have some other problem I will create new post for more people can see it. Thank You so much.

0 Likes 0 ·