Package io.github.ai4ci.abm.mechanics
Interface StateUtils.DoesPCRIfSymptomatic
- All Superinterfaces:
Serializable
,State<ImmutablePersonState.Builder,
,ImmutablePersonHistory.Builder, PersonState, StateMachine.BehaviourState> StateMachine.BehaviourState
- All Known Implementing Classes:
LockdownIsolation
- Enclosing class:
- StateUtils
Flags a behaviour model as seeking (and performing) a PCR test if the
person has been symptomatic for 2 days in a row and is compliant and has
not had a test in a set number of days (regardless of test outcome).
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
updateHistory
(ImmutablePersonHistory.Builder builder, PersonState person, StateMachineContext context, Sampler rng) Depending on the type this updated the outbreak or person history, and this is the hook for changing the testing, or adding in contacts / exposures if we are looking at people.Methods inherited from interface io.github.ai4ci.abm.mechanics.State
filter, getEnumClass, getName, nextState
Methods inherited from interface io.github.ai4ci.abm.mechanics.StateMachine.BehaviourState
name
-
Method Details
-
updateHistory
default void updateHistory(ImmutablePersonHistory.Builder builder, PersonState person, StateMachineContext context, Sampler rng) Description copied from interface:State
Depending on the type this updated the outbreak or person history, and this is the hook for changing the testing, or adding in contacts / exposures if we are looking at people. Use case is less clear for outbreak/policy, as there is less stored here. The implementation for outbreak (PolicyModel) makes this a no-op. This is called during the history stage of the update cycle.- Specified by:
updateHistory
in interfaceState<ImmutablePersonState.Builder,
ImmutablePersonHistory.Builder, PersonState, StateMachine.BehaviourState> - Parameters:
builder
- the next PersonHistory builder (usually)person
- the current PersonHistoryrng
- the sampler
-