Package io.github.ai4ci.abm.policy
Interface PolicyModel
- All Superinterfaces:
Serializable
,State<ImmutableOutbreakState.Builder,
,ImmutableOutbreakHistory.Builder, OutbreakState, StateMachine.PolicyState> StateMachine.PolicyState
- All Known Implementing Classes:
NoControl
,ReactiveLockdown
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
updateHistory
(ImmutableOutbreakHistory.Builder builder, OutbreakState 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.PolicyState
name
-
Method Details
-
updateHistory
default void updateHistory(ImmutableOutbreakHistory.Builder builder, OutbreakState 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<ImmutableOutbreakState.Builder,
ImmutableOutbreakHistory.Builder, OutbreakState, StateMachine.PolicyState> - Parameters:
builder
- the next PersonHistory builder (usually)person
- the current PersonHistoryrng
- the sampler
-