question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Matthew Gillespie commented

where is the table for the Where statement in restaurant model?

sql-flexsim.jpg 21327-restaurantsample-6.fsm

I am studying (and modifying) the FlexSim restaurant sample to learn more about FlexSim. I understand what the Where statement in the Sit activity does but I don't know how to access the source table(s). I would appreciate some direction here. Thanks, Tee

FlexSim 20.0.0
tableswhere query
· 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.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

The Location field on the Table location resource is showing the entire SQL statement:

  1. WHERE TableAndChairs AND Priority = 0 AND occupancy >= Puller.PartySize ORDER BY occupancy

This model was built last year when the only option for writing a custom query was to write the entire thing yourself in that top field. However, in 20.0 we added two more fields to the resource activities to make it easier to write custom queries. So in 20.0 to get the same effect you would configure the activity like this:

Here's an updated model where I made that change: restaurantsample20.fsm


sql.png (7.2 KiB)
newquery.png (8.4 KiB)
· 2
5 |100000

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