question

Allen Greenwood avatar image
0 Likes"
Allen Greenwood asked Phil BoBo commented

Table reference in query, labelassignment

In the attached model, why can I not use:

  • Table(“Parameters”)[1][1] in place of the constant 180 in The Pull From List query in Processor1? It throws an exception – value never read from table.
  • current.stats.output + 1 as opposed to getoutput(current) + 1 in the Set Label OnCreation trigger in the Source?

Basically, the model selects items by type until the wait exceeds a threshold then it focuses on the “old” items. Use a list query to do this.

FlexSim 17.2.2
label assignmentlists and resources
5 |100000

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

Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo commented

Using the query:

ORDER BY (age > gettablenum("Parameters",1,1)) DESC, Type ASC

is working fine.

I'm not sure why

ORDER BY (age > Table("Parameters")[1][1]) DESC, Type ASC

isn't working correctly.

You could put the expression into a field instead of directly into the query:


field.png (63.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.

Allen Greenwood avatar image Allen Greenwood ♦ commented ·

Thanks! You may want to see if using the dot notation, instead of the command, is a bug.

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Allen Greenwood ♦ commented ·

I added a case to the dev list. We'll look into it. Thanks.

0 Likes 0 ·
Sebastian Hemmann avatar image
0 Likes"
Sebastian Hemmann answered Phil BoBo converted comment to answer

Hi,

the first Point doesn´t work for me, either. Even

gettablenum("Parameters",1,1);

doesn´t work. Maybe a bug!? Certainly if only boxes older than a specific time should be taken you will have to use "WHERE age > 180" and if you want to define the Transport by using a list you also have to erase the Connection between Queue 1 and Processor 1!

Your second Point should be:

current.stats.output.value +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.