swifco_rs.management module¶
- class swifco_rs.management.CarcassRemovalParams¶
Carcass removal scheduling and detection parameters
- detection_duration¶
maximum duration between death and detection
- detection_probability¶
per carcass probability of detection
- duration¶
duration of each campaign in ticks
- interval¶
interval between repeated campaigns in ticks (defaults to
duration
, must be at least as long asduration
)
- repetitions¶
number of repeated campaigns (defaults to one, must not be equal to zero)
- start¶
tick at which the first campaign will start (defaults to zero)
- class swifco_rs.management.FenceParams¶
Fence parameters
- permeability¶
Permeability of all edges connecting the given zones (must be between zero and one)
- class swifco_rs.management.HuntingParams¶
Hunting scheduling and target parameters
- continuous_estimate¶
continously update estimated mortality required to reach management target.
- duration¶
duration of each campaign in ticks
- females_only¶
limit management to females (note that this implies that management targets are relative to the female population)
- interval¶
interval between repeated campaigns in ticks (defaults to
duration
, must be at least as long asduration
)
- repetitions¶
number of repeated campaigns (defaults to one, must not be equal to zero)
- start¶
tick at which the first campaign will start (defaults to zero)
- target_density¶
target given as the density to be reached at the end of each campaign (conflicts with
target_share
andtarget_number
)
- target_number¶
target given as the number of animals to be hunted during each campaign (conflicts with
target_share
andtarget_density
)
target given as a share of animals to be hunted during each campaign (conflicts with
target_density
andtarget_number
)
- swifco_rs.management.background_event_hunting(buffer, delay, events, store_all_candidates=False)¶
Hunting driven by a given set of events i.e. t, x and y coordinates of hunted animals
Note that this system will not removing living animals, but rather mark animals which died due to normal hunting as died due to management, i.e. it will not introduce additional mortality into the model.
Parameters:
buffer - a hunted animal matches an event if they are within this distance of it w.r.t. the max-norm
delay - if no suitable candidate is available, events can be delayed by up to this number of ticks
events - a callback which is passed the current tick and expected to return a list of x-y coordinates
store_all_candidates - optionally attach all alternative candidates to the chosen entities for further analysis
- swifco_rs.management.carcass_removal_zones(callback)¶
Determines zone identifiers associated with cells and edges used to control carcass removal
Parameters:
callback - a Python function which is passed the x and y coordinates and is expected to return an integer zone identifier or None
- swifco_rs.management.default_carcass_removal(params)¶
Default carcass removal with detection parameters per carcass removal zone
Parameters:
params - dictionary mapping zone identifiers to
CarcassRemovalParams
objects
- swifco_rs.management.default_fences()¶
Default fences with permeabilities per tick and fence zone
Parameters:
params - dictionary mapping ticks to lists of
FenceParams
objects which indicate which permeabilities to modify
- swifco_rs.management.default_hunting(params)¶
Default hunting with scheduling and targets per hunting zone
Parameters:
params - dictionary mapping hunting zone identifiers to
HuntingParams
objects
- swifco_rs.management.event_carcass_removal(buffer, delay, events, store_all_candidates=False)¶
Carcass removal driven by a given set of events i.e. t, x and y coordinates of hunted animals
Parameters:
buffer - a carcass matches an event if they are within this distance of it w.r.t. the max-norm
delay - if no suitable candidate is available, events can be delayed by up to this number of ticks
events - a callback which is passed the current tick and expected to return a list of x-y coordinates
store_all_candidates - optionally attach all alternative candidates to the chosen entities for further analysis
- swifco_rs.management.event_hunting(buffer, delay, events, store_all_candidates=False)¶
Hunting driven by a given set of events i.e. t, x and y coordinates of hunted animals
Parameters:
buffer - a hunted animal matches an event if they are within this distance of it w.r.t. the max-norm
delay - if no suitable candidate is available, events can be delayed by up to this number of ticks
events - a callback which is passed the current tick and expected to return a list of x-y coordinates
store_all_candidates - optionally attach all alternative candidates to the chosen entities for further analysis
- swifco_rs.management.fence_zones(callback)¶
Determines zone identifiers associated with cells and edges used to place fences
Parameters:
callback - a Python function which is passed the x and y coordinates and is expected to return an integer zone identifier or None
- swifco_rs.management.hunting_zones(callback)¶
Determines zone identifiers associated with cells and edges used to control hunting
Parameters:
callback - a Python function which is passed the x and y coordinates and is expected to return an integer zone identifier or None
- swifco_rs.management.movable_fences()¶
Movable fences with permeabilities that are fixed in time but do not assume fixed zones
Parameters:
params - list of
FenceParams
objects which indicate which permeabilities to apply
- swifco_rs.management.reactive_carcass_removal_zone(observed_cells, managed_cells, zone, inverted=False, threshold=1)¶
Reactively assign carcass removal zone identifiers
Parameters:
observed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the observed area
managed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the managed area
zone - the numeric zone identifier assigned to cells in the managed area if the ASF epidemic reaches the observed area
inverted - indicates whether the number of infected/infectious must be greator or equals or less than the threshold
threshold - how many infected animals or infectious carcasses need to be present before the zone is triggered
- swifco_rs.management.reactive_fence_zone(observed_cells, managed_cells, zone, inverted=False, threshold=1)¶
Reactively assign fence zone identifiers
Parameters:
observed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the observed area
managed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the managed area
zone - the numeric zone identifier assigned to cells in the managed area if the ASF epidemic reaches the observed area
inverted - indicates whether the number of infected/infectious must be greator or equals or less than the threshold
threshold - how many infected animals or infectious carcasses need to be present before the zone is triggered
- swifco_rs.management.reactive_hunting_zone(observed_cells, managed_cells, zone, inverted=False, threshold=1)¶
Reactively assign hunting zone identifiers
Parameters:
observed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the observed area
managed_cells - a callback passed x and y coordinates and indicated whether the cell is part of the managed area
zone - the numeric zone identifier assigned to cells in the managed area if the ASF epidemic reaches the observed area
inverted - indicates whether the number of infected/infectious must be greator or equals or less than the threshold
threshold - how many infected animals or infectious carcasses need to be present before the zone is triggered
- swifco_rs.management.white_zone(infected_zone_size, infected_zone, buffer_zone_size, buffer_zone, white_zone_size, white_zone, managed_cells, reaction_time=0)¶
Dynamic zoning scheme marking a buffer zone and a white zone around the infected zone
This zoning scheme is based on the full model state instead of tests of hunted animals and removed carcasses.
While the reaction time delays updating the zones, they are determined based on the current model state.
The same numeric identifier is assigned for fences, hunting and carcass removal.
Parameters:
infected_zone_size - size of the inner zone around infected cells, measured in cells
infected_zone - the numeric zone identifier assigned to cells which are part of the infected zone
buffer_zone_size - size of the buffer zone between infected and white zone, measured in cells
buffer_zone - the numeric zone identifier assigned to cells which are part of the buffer zone
white_zone_size - size of the outer zone beyond the buffer zone, measured in cells
white_zone - the numeric zone identifier assigned to cells which are part of the white zone
managed_cells - callback passes the x and y coordinates indicating whether that cell is being managed by this zoning scheme
reaction_time - number of ticks between infected animals or infectious carcasses being present in a managed cell and the zoning being updated