Skip to content

Casualty Rescue Transport and Treatment using Agent Based Simulation

Notifications You must be signed in to change notification settings

imantha-das/CRTT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Casualty Rescue Transport and Treament Model

animated

Table of Contents

What is it?

The Casualty Rescue Tratment and Transport (CRTT) is an Agent Based Simulation model developed by the Volcanic Risk and Hazard Group at the Earth Observatory of Singapore. It simulates the rescue, treatment and transportation of casualties during a hypothetical eruption of La Grande Soufrière volcano, located in the island of Gudaloupe. The model aims to identify critical medical response parameters that affect casualty survivability.

Parameters available by the model

  • Number of rescuers
  • Speed of rescuers
  • Transportation capacity
  • Modes of transportation (helicopter / ambulances)
  • Availability of staff and equipment at medical facilites
  • Distruption to road network

How it works?

The model was created using Netlogo Agent Based Modelling framework and is a gis based network model where input data (road network and location of medical facilities and other infrastructure) are input in the form of gis shape files (.shp). These geospatial data (geometric points and polyline) are replicated by the model as links and nodes while casualties, rescuers and medical facilites are represented as autonomous agents that are capbale of interacting with each other to obtain various outcomes. The links and nodes allow the rescuers (ambulances) to travese through the network to transport casulties (agents) from the impact zones to medical facilites where they would be treated. In a similar manner the helicopters traverse across the model space using grid based system (in netlogo terminology refered to as patches)

The model simulates evacuation scenarios following a volcanic crisis, and explores the impact on casualty survivability under different conditions (availability of resources, staff, infastructure) using an agent based modelling approach in a GIS setting.

Type of agents and their attributes

alt text

Rescue operation procedure

alt text

Model

Versions

There are two models located in vharg/Post-eruption-casualty-RTT/model repository

  • CRTT (Ver 1.0)
  • CRTT (Ver 2.0)

Ver 1.0

The main difference between the two are model are that Version 1.0 allows unlimited rescuers travelling between PMA (field triage) and hospital. As a result, the time required for casualties to recieve treatment is significantly lower (Since rescuers only travel one way from pma to hospital, they donot return back to the PMA). Also note for version 1 of the model, there are two types of rescuers who's functions are mentioned below.

  • Resc-Agent-A : Impact zone <--> PMA (travels both ways, limited number of agents)
  • Resc-Agent-B : PMA --> Hospital (travels one way, unlimited number of agents)

Ver 2.0

Unlike Vesion 1.0 of the model, Version 2.0 allows two main modes of running the model. The two modes differ primarily based on the functions performed by the rescuers.

  • Mode 1 : There is only a single rescuers (Resc-Agent-A) that travels to impact zone to rescue casualties and subsequently transport them to PMA and hospital for treatment
    • Resc-Agent-A : Impact zone <--> PMA <--> Hospital (travels both ways, limited number of agents)
  • Mode 2 : Allow two different types of rescue agents (Resc-Agent-A & Resc-Agent-B) similar to version 1 of the model. The main difference between version of and version 2 - mode 2 is that the number of rescuers traveling between PMA and Hospital are limited. As a result, unlike version 1, these agents travel back and forth from the PMA to hospital.
    • Resc-Agent-A : Impact zone <--> PMA (travels both ways, limited number of agents)
    • Resc-Agent-B : PMA <--> Hospital (travels both ways, limited number of agents)

Agents

This section provides a summary of the different agents used in this model and there functions.

Casualties (Refered to as Cas-Agent in the model) Casualties (cas-agent) are classified into 3 categories and distinguished by the trauma scale attribute (TS). The trauma scales is defined as combination of the severity of injuries (Total Body Surface Area - TBSA) and mortality.

  • TS1 (yellow) : Low injuries, Low mortality
  • TS2 (orange) : Burn wounds 20-40% TBSA, High mortality without treatment
  • TS3 (Red) : Burn wounds > 40% TBSA, High mortality with or without treatment

Rescuers (Refered to as Rescue-Agent-A, Rescue-Agent-B, Heli-Agent in the model) Main functions of rescuers are to rescue casualties and transport casualties from impact zone to medical facilities. As mentioned above there are two ways the model can be run, using either a single rescuer (Resc-Agent-A) or two (Resc-Agent-A & Resc-Agent-B).

  • Single rescuer only
    • Performs rescue operation in impacted zone (TS1, TS2 and TS3) as well as transporting stabalised casualties (TS2 and TS3) from field triage (PMA) to hospitals for treatment.
  • Two rescuers (Type-A and Type-B)
    • Type-A resuers perform rescue operation (TS1, TS2 and TS3) at impactzone and transporting to casualties to PMA (field triage) while Type-B rescuers transport stabalised casualties (TS2 and TS3) from PMA to hospital for further medical treatment.

Additionally helicopters (Heli-Agent) can be added into the model which will aid in the rescuing process. Note that the helicopters only transort agent between the impact zone and PMA and they also only rescue more critical causualties (TS2 and TS3).

Medical Faciilies : Field Traige and PMA (Refered to as PMA's and hospitals in the model) At the PMA (Field triage) stabalising is performed on casualties to alleviate suffering from airway (breathing) problems due to thermal inflammation. STabalising is perfomed on all casualties (TS1, TS2 and TS3). Once stabalised casualties (Only TS2 and TS3) are transported to hospitals where there receive further medical treatment. There are two field triages (PMA) that are setup, in Sainte Marie (SM-PMA) and other at Vieux Habitants (VH-PMA) while the hospital is located in Point Pitre.

Assumptions

This section lists the assumption taken by the model and are described according to agent categories

Resc-Agents(A/B)

The following are general assumptions apply to all rescuers.

  • Rescuers travel at a constant speed on all roads.
  • On occassions where casualties die during transit, rescuers will not return to impactzone for further rescuing or to PMA to collect new casualties to be transported to hospital. So for instance if a rescuer was transporting 2 casualties from PMA to the hospital, and if one or both casualties die during transit, the rescuer will not go back to the PMA to collect more casualties. Rather it would reach its destination (hospital) and make further decision at that point.
  • Rescuers make decisions after completing tasks (i.e once they reach PMA, hospital and rescued a casualties at impact zone)
  • To avoid multiple rescuers attempting to rescue the same agent, this model heavily relies on a targeting mechanism. Each rescuer before commencing the rescue operation will target the casualty they are attempting to rescue at the PMA (mode 1 and 2) or hospital (for mode 1). Hence it is assumed in this model that the locations of casualties are know prior to reaching the impact zone.

These assumptions stated below only apply for mentioned operations

  • For rescue operations (Impactzone -> PMA):

    • Its assumed that it is not possible to distinguish between TS2 and TS3 casualties and hence a joint first priority will be given towards rescuing TS2 and TS3 casulties followed by TS1.
    • Only upon rescuing all TS2 and TS3 casualties will TS1 casualties be rescued. (Note that this means that even if a TS1 casualties is found in the same location (node) as TS2, they will be ignored till all TS2 and TS3 are rescued.)
    • Rescuers select which PMA (Vieux Habitants / Sainte Marie) to travel to based on certain conditions which are detailed under Medical Facilities : Field triage / PMA
  • For transporting operations (PMA -> Hospital) :

    • When transporting casualities from PMA to hospital, TS2 casualties will be given higher priority over TS3 casualties as they are more likely to survive.
    • Casualties who are stabalised at earlier time ranges are given more priority and hence works on First-in First-out basis (FIFO).
      • For example if there 4 casualties (TS3-A @t1, TS2-A @t2, TS3-B @t3, TS2-B @t4) who are stabilised
        • Where t refers to stabalising time and t1 < t2 <t3 < t4. In other words TS3-A was first to be stabilised
        • If a rescuers have a capacity of 2 (Max 2 agents can be transported), TS2-A and TS2-B will be selected over TS3-A since TS2 agents are given more preference.
        • If a rescuer has a capacity of 3 (Max 3 agents can be transported), TS2-A, TS2-B & TS3-A will be selected to be transported to hospital.
  • For mode 1 (only a single rescuer - type A), when the number of casualties awaiting hospital transfer reaches a certain threshold, rescuers will begin to transport casualties at the PMA to hospital until that number falls below the defined threshold. For instance if the defined threshold is 10 and there are 14 casualties awaiting hospital transfer, 2 rescuers will transport 4 of the casualties to hospital before returning bact to impact zone for rescuing (we assuming eaches rescuer can transport 2 casualties at a time).

  • For mode 1 (only a single rescuer - type A), once all TS2 and TS3 casualties are rescued from the impact zone, the rescuers will start transport all remaining casualties at PMA to hospital before commencing rescue operation of TS1 casualities.

    • Saying this note that due to the earlier discussed targeting mechanism there might be rescuers who have already targeted TS1 casualties since all TS2 or TS3 casaulties are not rescued at impact zone. In this case they will transport the targeted TS1 casualties before transporting TS2 or TS3 casualties at PMA to hospital.
  • For mode 2 where there are 2 different types of rescue agents, there are occasions where a certain PMA might be under utilised (as all/most casualties taken to closer PMA or lower queue by type A rescuers). On these instance there might be type B rescuers who are inactive for long durations (as there is nocasualties to be transported to hospital). To account for this type B rescuers will travel from one PMA to the other (more active) to transport available casualties at that PMA.

Medical Facilities : Field triage / PMA

  • Performs stabilisation for casualties of trauma scale categories 1,2,3

  • Capacity of casualties that can be treated at one time is decided by the number of medical staff available.

  • If Stabilisation capacity is reached casualties will be added into queue.

  • The model allows the number of medical staff available to be altered at two specific time intervals as initially there may be shortage of doctors. But as the rescue efforts progress more medical staff can be brought to the PMA's.

  • On occassions where there are not enough doctors, casualties will be transfered to queue where they will be selected once there is availability for stabalisation.

  • Note that the queue is based on First in First Out (FIFO) basis and therfore once there is availability for stabilisation, casualties is brought at earliest time will considered first.

  • Once the casualties are stabalised they will be transfered to a transfer hospital queue from which rescuers (A or B depending on the mode) transport them to the hospital.

  • Its assumed that once stabalised, TS2 and TS3 casualties are distinguishable and hence as discussed previously rescuers will give priority to TS2 casualties from here on.

  • Casualites of Trauma scale category 1 are considered recovered after stabilisation.

  • The PMA selected to travel to, by rescuers are highly dependent upon the queue size (waiting, stabilisation & awaiting transfer to hospital) discussed earlier. Rescuers will select the PMA based on the following rules where the rules at the top will have given higher precedence over the ones below.

    • On instance where the transfer hospital queue length has exceeded the user define threshold (In other words there are stabalised casualties than needs to be transported), rescuers will select that PMA to travel to as stabalised casualties will need to be transported next (Note this only for mode 1 - Version2)
    • If not (above rule), travel to the PMA with the lower waiting queue
    • If not (above rule), travel to the PMA closer to the impact zone
    • Also note if queue lengths are the same for above points (waiting queue, hospital queue length) the closer PMA will be selected.
    • Rescue agents will make decisions to travel to a certain PMA once its capacity has been reached. Once a decision has been made, the rescue agent will not change course to travel to a different PMA if stabilisation capacity has been reached.
    • Once the rescuers reach a PMA if there is availabilty in stabilisation queue, casualties will be transfered to a stabilisation queue.
    • If stabilisation queue isnt open (Usually till the first hour or when there are no doctors) or full, casualties will be added into the queue.

Medical Facilities : Hospital

  • Medical equipment
    • Burn Beds (BB)
      • casualties who are offered burn beds will have reduced mortality rate
      • Priority given to TS2 casualties as they are more likely to survive.
      • However TS3 casulties brought at a later time will be not offered burn beds if TS2 casualties are occupying burn beds.
    • Non Burn Beds (NBB)
      • casualties who are offered treatment at Non burn beds will have reduced mortality rate (lower than burn beds)

General

  • Model will run for 7200 ticks which refers to 5 days since impact in real life

Model Limitations

  • Rescuers (General)

    • Dont stop for activities such as refuling etc.
    • Its assumed that all rescuers travel at the same speed (speed will not change based on road type).
    • The model heavily relies on targeting mechanism to prevent multiple rescuers traveling to rescue or transfer the same casualty.
  • Rescuers (For rescue activities at Impact zone)

    • Munkres assignment algorithm is used to optimise the assignment of casulty to each rescuer based on distance.
      • The algorithm minimises the total distance to travel by selecting the best rescuer-casualty combinations.
      • Ref : J. Munkres, "Algorithms for the Assignment and Transportation Problems", Journal of the Society for Industrial and Applied Mathematics, 5(1):32–38, 1957 March.
      • Two or more rescuers will not be assigned to the same casualty. However two or more rescuers may travel to same node if there are multiple casualties situated within the same node. This may reduce the efficiency of the munkres algorithm.
    • At start of each rescue operation (at the PMA), its assumed that the location and the casualty agent to be rescued is known by every rescue agent. However to account for the time taken for searching (general vicinity) and rescuing (i.e loading to the ambulance etc.) a resue-time parameter is available in the model inteface, which can be set by the user.
    • Rescuers travel a unit distance within a tick (a minute in real life). Usually upon reaching close to casualty, PMA, hospital(Rescuers Type B), the distance to travel to the destination (node) will be less than the distance traveled within a tick. This will impose an casualty rescue time error of up to one tick (a minute in real life) and vice versa.
      • To minimises some of this error rescuers (Rescuers Type A) will travel an extra distance once rescue operation is completed (loaded in to ambulance) or once they reach PMA and drop casulties (remaider distance from previous run).
  • Rescuers (Ambulance Type - B)

    • All points Rescuers, Ambulance Type - A apply to Ambulance Type-B as well.
    • Travel only in one direction, from PMA to Hospital. They do not return to PMA after transferring patients to the hospital (only for version 1 of the model).
    • Its considered that there are unlimited number of Ambulances (only for version 1 of the model - type B recuers).
    • Travels to hospital as soon as there are any stabilised casualties at the PMA (Do not wait for other casualties to be stabilised since there are an unlimited number of ambulances)
  • Rescuers (Helicopters)

    • Helicopters travel in straight lines (from hospital to impacted zones). They do not follow any sort of airline routes that are possibly taken in real life.
    • Do not stop for activities such as refuling etc.
    • Point 1,2,3 & 4 from rescuers (Ambulance Type - A) apply to helicopters as well.
      • Note the munkres algorithm is computed seperately for Helicopter and ambulances (Type - A). Thefore it doesnot compute most efficient assignment for all rescue agents (Helicopters + Ambulance Type -A), just for each agent class.
  • Casualties

    • Casualties are assigned to the closest node from their input location (GIS .shp file). So it is assumed that casualties are within the vicinity of roads in the impacted zone.
  • PMA (Triage / Field Hospitals)

    • Its assumed that PMA's are setup within 1 hour of eruption (Rescuers Type - A, activates at 60 ticks)
  • Hospital

    • Its is assummed that the hospital contains a helipad
  • General

    • All casualties and medical facilities are situated at the closest node from their inputed location (gis .shp file)

How to setup?

Netlogo

  • The netlogo application is required for you to run the model.
  • Download and install Netlogo version 6.1.0
  • If .nlogo files is available to you (not the .nlogo code available on github) double click top open.
  • If .nlogo file is NOT available follow section 'Setting up Netlogo Interface'.

GIS

  • The required GIS files are found in the GIS folder in the repository
    • Description of the GIS files
      • "Edited_Gudaloupe_boundary.shp" : Gudaloupe country boundary shape file
      • "LaSoufrière_ImpactZones.shp" : Boundaries of the impact zones
      • "Primaryrds_edited_04_EPSG36320.shp" : Part of the road network (display the main roads/highways and more denser road network at impact zones)
        • Road network outside of the impact zone was removed to reduce setup loading times.
      • "PMA_and_Hospital_Airport_Volcano_Nodes_EPSG36320.shp" : Locations of infrastructure (PMA/Hospital/Volcano etc.)
      • "PDC_Humans_default.shp" : Location of casualties and their trauma scale category
  • Copy them to the desired directory
  • Specify the directory you copied the GIS files to, by ammending line 113 (set-current-directory <directory>) under Netlogo code tab
    • More information on Netlogo interface is specified under section 'Setting up Netlogo Interface'

Python

  • A section of the RTT.nlogo code is written in python and therefore python must be installed for the model to sucessfully run.
  • The following guide shows how to install python is using Anaconda (python distribution)
  • The following python packages will be required by the model.
  • The recommended method to installing new packages are by setting up a new python enviornment. A new python environment can be created in the following 2 ways. The guide below details creating environments and installing packages using the anaconda prompt (command line). Alternatively Anaconda Navigator provides the same functionality using a GUI.
Create environment and Install packages using .yml file
  • Download RTTEnv.yml file located in the python folder in this repository
  • Open Anaconda Prompt and run the following command
    • conda env create --file envname.yml
      • Example :
      • conda env create --file D:/Python/RTTEnv.yml
      • Note the first line of the RTTEnv.yml file can be changed if you wish to re-name you environment name (i.e abc)
Create Environment and install packages manually
  • There maybe instances where installing packages using .yml file might be unsucessfull, This could arise if different operating systems (OS X) is in use. The following .yml file is generated in windows setting.
  • In this situation use the traditional method of creating environments and installing packages detailed below.
  • Anaconda comes with a base environment with some pre-installed packages, Numpy being one of them. However it is recommended to create a new python environment.
    • To create a new environment,
      • Open Anaconda prompt
      • Create a new environment by running, conda create -n RttEnv python=3.7.5
        • Note "RttEnv" is the environment name (name of the environment your about to create), you can enter any name you wish (i.e abc)
      • To activate the new environment,Enter activate RttEnv in the anconda prompt.
    • To install new packages, use pip (python package manager), alternatively you can use conda (anaconda package manager)
      • To install Numpy,
        • pip install numpy==1.17.4 (pip install "package name == version")
      • To install Munkres,
        • pip install munkres==1.1.2
      • you can view the list of packages installed in your environment by using pip list.
    • If you decided to install the packages in the base environment instead, you can directly install using pip or conda (no need to create a new environment and activate.). However it is recommended to create a isolated new environment for this project to ensure that it has its own dependencies.
Configuring python executable in Netlogo
  • Once the packages are installed you will need locate the python.exe file located in the anaconda folder.
    • This will depend on where you installed python but generally will be located in C:/ProgramFiles/anaconda for the base environment.
    • For newly created environment, it will generally be in C:/ProgramFiles/anaconda/envs/Rtt provided that you named your environment Rtt. Else it will be in the same directory under the name you input during the creation of the new environment.
    • The location of python can be found by typing where python in anconda prompt. (In case of virtual environment ensue that you have activated the environment, activate Rtt before typing the command)
    • Locate the python.exe file in the directory and copy the filepath. This should include python.exe file as well (C:\Program Files\anaconda\envs\Rtt\python.exe)
  • Next open Netlogo
    • Navigate to python (top left) -> configure -> and paste the address under the field Python3.

Setting up Netlogo Interface

If .nlogo model file is available,
  • If the .nlogo model file is available simply double click to open it.
  • Note that this is not the .nlogo file code available in github
  • Netlogo's main window contains 3 tabs which can be found on the upper left cornor
    • Interface : The window in which model will run
    • Info : Information about the model can be found here
    • Code : The code for the model is located here.
If .nlogo model file is NOT availble,
  • If the casualty model .nlogo file is NOT available some additional work will be have to be done before you can run the model.
    • open the Netlogo application using the start menu (in windows)

    • In the github repository, navigate to RTT -> Model and copy RTT.nlogo code in raw format.

    • Next navigate to the code tab, located in the upper left cornor of the Netlogo window and paste the code.

    • The following global variable must be constructed in the interface tab.

    • setup : Button

    • go : Button

    • Helicopter-Capacity : Slider

    • Helicopter-rescue : Switch

    • Number-of-Helicopters : Slider

    • Speed-Helicopter : Chooser

    • Number-of-Rescuers : Slider

    • Resc-Agent-Capacity : Slider

    • Rescue-Time-Mins : Chooser

    • Transfer-Time-Mins : Chooser

    • Speed : Chooser

    • PMA-Capacity-At-Time-1 : Slider

    • PMA-Capacity-At-Time-2 : Slider

    • PMA-Operational-Time-1 : Chooser

    • PMA-Operational-Time-2 : Chooser

    • Time-To-Stabilise : Slider

    • no-of-burn-beds : Slider

    • no-of-non-burn-beds : Slider

    • random-death-percent : Slider

    • To construct button, choosers and slider, select the required option (Slider,Switch,Chooser) from the dropdown panel beneath the interface tab and click anywhere in the white space besides the model run space (black box)

    • plots to visualize the model output can also be added similarly using the dropdown menu.

How to use it?

  • Naviagte to model interface tab.

  • Select the parameters you wish to test (use sliders, switches, dropdown)

    • Description of parameters:
    • Helicopter-Capacity : The number of casualities that can be transported to hospital in single run (from impacted zone to hospital)
    • Helicopter-rescue : If helicopter rescue is considered during the model run (set to off if not required)
    • Number-of-Helicopters : Number of helicopters available for the rescue process
    • Speed-Helicopter : Speed of the helicopter
    • Number-of-Rescuers : Number of ambulances (Ambulance Type A) available for rescuing casualties.
    • Resc-Agent-Capacity : The number of casualties that can be transported in single run (from impacted zone to PMA)
    • Rescue-Time-Mins : Time for rescuing (searching casualtiues, loading to ambulance etc.) - Only for Ambulance Type A
    • Transfer-Time-Mins : Time to transfer casualties from ambulance to PMA, Hospital vice versa (Ambulance Type A and Type B)
    • Speed : Speed of ambulance (Ambulance Type A & B)
    • PMA-Capacity-At-Time-1 : The number of casualties that can be treated at PMA (stabilisation) at time 1
    • PMA-Capacity-At-Time-2 : The number of casualties that can be treated at PMA (stabilisation) at time 2 (more number of doctors available)
    • PMA-Operational-Time-1 : Time when casualties will be considered for stabilisation
    • PMA-Operational-Time-2 : Time at which more doctors available for stabilisation (stabilisation capacity increase)
    • Time-To-Stabilise : Time taken to stabilise casualties
    • no-of-burn-beds : No of burn beds available at the hospital
    • no-of-non-burn-beds : No of non burn beds available at the hospital
    • random-death-percent : Percentage of death for TS2 and TS3 occuring randomly (optional)
  • Click setup to load model environment (Loads GIS files, create nodes and links, create agents)

  • Click go to run the model. (Model will run for 7200 ticks which refers to 5 days since impact in real life)

  • At any moment during the model run, the model can be paused/resumed by clicking go button.

    • Whilst paused or running, agents attributes can be investigated by right clicking on an agent and selecting inspect
    • Similarly netlogo primitives can be used to perform actions such as counting the number of agent, using command center located at the bottom of the interface tab.
  • At the end of the model run, the data releating to any plot can be obtained through the following command export-plot plotname filename

Things to notice or try

  • How often is Sainte Marie PMA used (since its set up further than vieux habitants PMA)?
  • Which parameters affect staibilisation?
  • How effective are burn beds at reducing mortaility rate?

Resources

Code

  • To be added to repository upon completion of project/paper published

About

Casualty Rescue Transport and Treatment using Agent Based Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published