Patient Flow Simulator Documentation

Simulator | Help | Developer | About


Simulation overview

This simulation allows you to manage a virtual hospital, analyse the effects of your decisions on performance, and try to iteratively implement changes based on this analysis. The aim is to achieve the highest performance for the lowest cost.

Simulated patients are designed to mimic the actual movements of patients through a typical acute hospital. There are two main ways to use the tool: with new patients generated as the simulation runs, or using a predefined set of known patients. By default, the parameters are balanced so that 1 step of the simulation is 1 hour in the hospital. It isn't required that the steps are interpreted this way, but make sure you're consistent.


Workflows

There are two major workflows for this tool:

  • Manage your hospital over time
  • Optimise your hospital for known patients

Manage your hospital over time

Setup:

  • Simulation history = resume
  • Patients = generate
The main loop is to click “run”, monitor the performance for a few days, then pause to make management changes and click run again to continue. The main dashboard is the history tab where you can monitor day-by-day stats over time. Occupancy, queue length and delays are particularly useful to diagnose where problems are occurring or where savings can be made. The network tab is most useful if you run some of the built in analysis – e.g. nodes with high betweenness centrality will affect a high proportion of patients.

Optimise your hospital for known patients

Setup:

  • Simulation history = resume
  • Patients = preset
In this mode everyone will get the same patients in the same order. If you refresh the page, the sequence goes back to the beginning. The challenge is to keep trying the same patients and optimise performance for them. This is something that is only possible in a simulation, but the value is you can explore “what if” scenarios with consistent inputs. If you get good performance, save the config and test how well it performs with new patients (as in “manage hospital over time” above).


Ward management

In this section you can change the settings for each ward in the hospital, and also change some parameters for the simulation itself.

Ward list

This is a list of all the wards in your hospital. Click a ward on this list to select it for editing in the "Editing" panel. The currently selected ward is highlighted in green.

Editing

This is where you make management decisions about each ward. Remember to click the save button after changing the settings.

Beds
The number of beds in the ward. Cannot be zero.
Resources
Resources is a general term for all requirements other than beds and staff, e.g medicine, equipment, lab tests. The number of resources available doesn't have a unit, it's a relative measure. Think of it as the total cost per hour for whatever resources the ward needs.
Staff
The total number of staff employed to work on this ward, across all roles.
Distribution of resources and staff
How should the available resources and sraff time be divided between the admitted patients? The options are "Equal", "Highest first", "Biased highest first" and "Lowest first". With an "equal" policy, the available resources are divided evenly between all patients. "Highest first" starts by treating patients that need more care, spending time and resources on them first, potentially delaying less serious patients if all available resources or staff are already used. "Biased highest first" attempts to limit the impact on other patients by ensuring all patients receive at least some treatment, but prioritising more serious/ urgent cases. "Lowest first" starts by treating the least costly patients, potentially not leaving enough resources for high-need cases but also potentially allowing a large number of simple cases to be discharged quickly.
Queue policy
If there are more patients that need to be admitted to a ward than there are beds available, how should the choice of who to admit be made? Options are "First-come, first-served", "Highest need first" and "Lowest need first". This means some patients will not be admitted. These patients (that are waiting but are not admitted) will remain in the queue untill they are admitted. With a "First-come, first-served" policy, there is no queue jumping for any reason, regardless of the urgency of the patients waiting. "Highest need first" prioritises urgent cases. "Lowest need first" priortises simple cases.
Accept overflow
If a ward has empty beds, should it make these beds available to accept patients from other wards that are at capacity and need to free up space? The options are "Always" and "Never". If these beds are later needed, they can only become available by transferring the (overflow) patient somewhere else.
Begin boarding after
This option is currently only available for the Emergency department. Patients who are ready for admission from the Emergency department may have to wait for a bed in their destination ward to be available. This parameter specifies the number of hours (steps in the simulation) to allow a patient to wait in the Emergency department before trying to "board" them in another ward.

Simulation setup

Here you can start the simulation, and also change some parameters that would increase or decrease the pressure on your hospital. By default the settings reproduce a fairly typical day with 3 admissions from the Emergency Department expected per hour. You should not use these settings as a way to "improve" the performance of your hospital, but they should be used to investigate how your system copes with increased demand.

The final setting "wait between runs" is the number of seconds the tool will wait between runs when set to run continuously. You can make this longer to give yourself more time to analyse data, or if you are using a less powerful machine to run the tool, e.g. a phone or tablet.

The default hospital is designed to be complex enough to be interesting, but not overwhelming in the context of a 30-60 min session. Every aspect of the hospital can be configured and uploaded, including the number of wards and their default settings and the probability of different types of patients arriving. Changing the core hospital configuration is documented here. Students using the tool are not expected to modify the basic configuration, this is an option for the organisers. However, it may be useful to download your current settings (the "download config" button). This includes all the current options set in the ward management section, so this is a convenient way to save your current settings and return to them later for comparison. You can also reload the configuration of any previous run from the "History" tab in the Analysis section, but these results are lost when the page is closed or refreshed.

Simulation steps
Total number of steps. By default, 1 step is equivalent to 1 hour in the hospital so 24 steps is 1 day and 672 steps is 1 month.
Max patients
Patients arrive at random, so we don't know how many will arrive or when. This parameter sets a limit on the total number of patients that will ever be created in a single run of the simulation. After this point no more patients will arrive but any patients currently in the hospital will continue their visit.
Min arrivals per step
What is the fewest patients that can arrive in the Emergency Department per step of the simulation. Reasonable bounds depend on how long you're taking 1 step to mean. By default 1 step is 1 hour, so 1 admission is reasonable. The simulation is slightly unstable if this is zero.
Expected arrivals per step
The typical number of patients arriving at the Emergency Department per step of the simulation. Reasonable bounds depend on how long you're taking 1 step to mean.
Max arrivals per step
What is the most patients that can arrive in the Emergency Department per step of the simulation. Reasonable bounds depend on how long you're taking 1 step to mean. By default 1 step is 1 hour, so 4 admissions are reasonable.
Emergency wait target
Equivalent to the UK national 4-hour waiting time standard. By default this is 4 as 1 step is interpreted as 1 hour. This does not affect the simulation itself, but is used in the analysis.
Wait between runs (s)
The number of seconds to wait between repeated runs of the simulation. When you click "Run", the simulation runs every few seconds as defined by this parameter. It does not affect the performance in any way.

Simulation controls

This is where you start and stop the simulation, decide how patients should be generated, reset the tool and save/upload your configuration.

Click the green "Run" button to start the simulation. By default it will simulate 1 day every 2 seconds (simulation steps = 24, wait between runs = 2) and will keep going until you click the red "pause" button that appears. To run a single simulation, click "Run once".

Simulation history
How should this run relate to the previous ones? The default mode is "resume", where this run picks up where the last one left off. For example, any patients currently in hospital at the end of the previous run will still be there. This means you are managing once consistent hospital over time. The other options are "clean slate" or "repeat previous". In clean slate mode, each run is completely independent, which is useful to understand the general effects of the ward parameters. "Repeat previous" mode allows you to retry the previous run after making different management decisions for your wards, trying to improve performance. All wards will be reset to their initial state for the previous run, and you will see the same patients in the same order. This is useful to see what you could have done differently if you have particularly low performance one day.
Patients
The patients arriving at your hospital are either generated on the fly ("generate") or predetermined ("preset"). In preset mode you are optimising your hospital for a given set of patients that will arrive at the Emergency department per step of the simulation. By default there are 30 days of patients. In generate mode you can run indefinitely, and you don't know which patients you will see at what time. This is more realistic, but the variability of the patients means it is more difficult to assess the impact of your management decisions.
Change hospital
This allows you to upload a saved configuration, including all of your ward management decisions. You can download your current configuration at any time by clicking "download config" (see below). This is useful to re-load a particularly good configuration to test it under different conditions, such as downloading your optimised configuration for preset mode to then test with new (generated) patients.
Download config
This will save all of your ward management decisions to a local file, which you can upload by clicking "change hospital" (above)
Reset analysis
Clicking this will reset everything in the "analysis" section of the tool, and set the simulation time back to 0. This is useful for preset mode when you reach the end of the sequence of patients. Resetting the analysis will also cause preset patients to start arriving from the beginning of the sequence again.
Run
When you click run, the simulation will keep going until you click "pause" (the pause button appears after you click run). By default it will: simulate one day, wait for 2 seconds, repeat. If you pause the simulation and then click run again, you will continue where you left off (unless you are in "clean slate" mode).
Run once
Clicking "run once" will perform the same simulation as clicking "run", but it will not run continuously. This is useful if you want to step through days more slowly.

Analysis

Find out how well your hospital is performing. Before you run the simulation the first time, most of these tabs will be empty. The main exception is the Network tab, which initially shows the model used by the simulation to generate patients. All tabs are documented in blue information boxes in the simulator itself.

History

The "History" tab is particularly complex. It allows you to track the progress of your hospital (either over time, or as you investigate the effect of changing the simulation parameters on the same patients.). From each row in the results, you can re-load the configuration of the hospital that you used for that run. Above the table, two charts are generated. On the left you can track various performance metrics over time (selected in the dropdown list), which is automatically updated as the simulation runs. On the right, you can track the average performance of your hospital over all runs in the history tab. Note that occupancy is only calculated considering admitted patients, so the Emergency department is ignored.

The efficiency metrics in the history tab (length of stay, resource use, staff time) show how the actual usage in your hospital compares to the minimum requirements needed to treat all patients admitted in the simulation. For example, each patient has a minimum possible length of stay that cannot be reduced, which is due to their treatment needs. If their actual length of stay equals this minimum value, the efficiency is 100%. Similarly, staff time and resource use represent excessive expenditure (due to over-budgeting or unnecessarily long length of stay).