Jump to content

How to keep track of assignments to worker


whc563

Recommended Posts

I am modeling a healthcare environment where model entities (patients) are assigned to workers (physicians). For each model entity I keep track of which physician each patient is assigned to (Object Reference State Variable in ModelEntity) and use the same physician through multiple exam steps. Now I would like to count how many patient assignments a physician has, and assign patients to physicians by seizing physicians with the smallest number of patient assignments.


How can I add a NumAssignments feature to workers? I've tried adding Model state variables (Transporter Reference State Variable in Model Definitions>States), but it doesn't show up in the selection expression for resource seizes.


What I am looking for is something along the lines of: seize Physician with selection goal SmallestValue and selection expression Physician.NumAssignments.


I would appreciate any feedback/suggestions. Thank you!

Link to comment
Share on other sites

What you could do is to have a Table that includes two columns - the first column would be your Doctor names and would be of type Object Reference > Transporter - and would have the property Auto-set Table Row Reference set to 'True' (so each worker points into the correct row in the table). Then you could set up a vector type state variable with the number of rows based on the number of doctors listed. Your second column in the table (lets call it NumAssignments) could then be a Standard Property of type 'State' and would list the state variable names, i.e., NumberOfPatients[1], NumberofPatients[2], etc. one corresponding to each Doctor row.


Then, within the Allocated add on process of the workers (Doctors), you could change that state variable value by simply referencing the state column, i.e., Table1.NumAssignments. (or however you want to make your allocations when the patient entity sees dr. for first time). If you don't want to do it within the worker add-on processes, you could access the seized resources function information for an entity to set it there as well.

Link to comment
Share on other sites

×
×
  • Create New...