question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jeanette F commented

Reassign Label Based On Schedule?

Hi Team,

I am working on problem where waiting patient can be reassigned to provider based on schedule. I am able to model it but I think there may be better approach since it is checking schedule for waiting patient every 0.1 min which is making model running slow.

1659222447469.png

1659222519255.png

1659222236217.png

@Felix Möhlmann @Jason Lightfoot


Thank you!


FlexSim 21.0.10
schedulepatientprovider reassignment
1659222236217.png (72.2 KiB)
1659222447469.png (5.7 KiB)
1659222519255.png (156.3 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jeanette F commented

What you could do is measure the time until the assigned provider is no longer available and use that value as the maximum wait time in the Pull from List activity.

That way, the token only enters the re-assign activity once per provider change.

1659340735752.png1659341022981.png

You also need to handle the case in which no provider is available for the 'WaitingHour' value (once provider C goes off schedule)

Currently you would get an error, when the query doesn't return a row. The 'else' case could involve setting the provider value in a way, that the token is send to a sink by a Decide activity, for example.

  1. Table result = Table.query(...);
  2. if(result.numRows > 0)
  3. {
  4.    return result[1][1];
  5. }
  6. else
  7. ...

1659340735752.png (25.9 KiB)
1659341022981.png (3.2 KiB)
· 7
5 |100000

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