Christopher C3 avatar image
Christopher C3 asked Christopher C3 commented

Multiple conditional 'filter by' statements within the acquire resource flow

I'm experimenting with different ways of pathing through a clinic without needing to split tokens and create many multiple, but very similar, flows. I'm trying to do as much within the GUI rather than the coding side.

The attached model (FilterByMultipleAcquireHC.fsm) has three parts;

1) Creates a patient with a token label of which route they're on (1 or 2), and initially directs them using a 'decide' - the simple solution

2) After a common wait, next sends them to a chair, but instead of using different groups, the chairs are all one group, but the acquire is filtered by a label attached to them which matches the token label.

3) [Where I have the problem] I want to repeat the same for acquiring a staff escort to exit, but as well as a linked member of staff (ie one with a matching label), also being able to draw from another pool of unallocated staff - shown in the model as 'OmniTech'.

I can't seem to get the syntax right in the 'filter by' of the Staff Resource to include multiple OR conditions for staff member, eg carrying a grouping of '3' OR (Routelabel).

How do you include multiple filter statements in this box?


I've also toyed with some kind of 'contains' function and having both 1 and 2 in an OmniTech variable string, but again, don't know how to query into it.

I can see a fallback way of using the max wait timer into a separate loop to acquire from the wider pool, but for my learning and the more complex scenario I had in mind, wondered how to get multiple filters into that 'filter by' box.

Thank you

FlexSim 22.0.1
acquire resourcefilter
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
Felix Möhlmann answered Christopher C3 commented

The resources use SQL syntax, so 'OR' and 'AND' are used to link multiple conditions. You can also use parentheses to further control how the conditions are linked (for example: 'condition1 AND (condition2 OR condition3)').

Multiple 'Sort By' values are separated by commas. 'ASC' and 'DESC' control in which direction the values are sorted. If not specified, the order will be ascending.

Note that, because in your model the token is the puller, the 'distance' evaluation will not work correctly. As the token doesn't have position data in the 3d space, it will return the distance between the staff member and the model origin point.



· 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.

Christopher C3 avatar image Christopher C3 commented ·
Thanks - not sure how I'd missed trying that variant of the code, but achieves exactly what I needed. Appreciate the prompt reply.
0 Likes 0 ·

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.