Package io.github.ai4ci.config.inhost
Class ImmutableStochasticModel
java.lang.Object
io.github.ai4ci.config.inhost.ImmutableStochasticModel
- All Implemented Interfaces:
InHostConfiguration
,StochasticModel
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableStochasticModel
extends Object
implements StochasticModel
Immutable implementation of
StochasticModel
.
Use the builder to create immutable instances:
ImmutableStochasticModel.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableStochasticModel
.Nested classes/interfaces inherited from interface io.github.ai4ci.config.inhost.StochasticModel
StochasticModel._PartialStochasticModel
-
Field Summary
Fields inherited from interface io.github.ai4ci.config.inhost.InHostConfiguration
LIMIT, log
Fields inherited from interface io.github.ai4ci.config.inhost.StochasticModel
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableStochasticModel
.static ImmutableStochasticModel
copyOf
(StochasticModel instance) Creates an immutable copy of aStochasticModel
value.boolean
This instance is equal to all instances ofImmutableStochasticModel
that have equal attribute values.Given the parameters for the virus, what is the unit of virions.int
hashCode()
Computes a hash code from attributes:targetCellCount
,immuneTargetRatio
,immuneActivationRate
,immuneWaningRate
,infectionCarrierProbability
,targetRecoveryRate
,baselineViralInfectionRate
,baselineViralReplicationRate
,virionsDiseaseCutoff
.Creates a builder forImmutableStochasticModel
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueStochasticModel
with attribute values.final ImmutableStochasticModel
Copy the current immutable object by setting a value for thebaselineViralInfectionRate
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for thebaselineViralReplicationRate
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for theimmuneActivationRate
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for theimmuneTargetRatio
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for theimmuneWaningRate
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for theinfectionCarrierProbability
attribute.final ImmutableStochasticModel
withTargetCellCount
(Integer value) Copy the current immutable object by setting a value for thetargetCellCount
attribute.final ImmutableStochasticModel
Copy the current immutable object by setting a value for thetargetRecoveryRate
attribute.final ImmutableStochasticModel
withVirionsDiseaseCutoff
(Integer value) Copy the current immutable object by setting a value for thevirionsDiseaseCutoff
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.config.inhost.InHostConfiguration
getSeverityFatalityCutoff, getSeverityHospitalisationCutoff, getSeveritySymptomsCutoff
-
Method Details
-
getTargetCellCount
- Specified by:
getTargetCellCount
in interfaceStochasticModel
- Returns:
- The value of the
targetCellCount
attribute
-
getImmuneTargetRatio
- Specified by:
getImmuneTargetRatio
in interfaceStochasticModel
- Returns:
- The value of the
immuneTargetRatio
attribute
-
getImmuneActivationRate
- Specified by:
getImmuneActivationRate
in interfaceStochasticModel
- Returns:
- The value of the
immuneActivationRate
attribute
-
getImmuneWaningRate
- Specified by:
getImmuneWaningRate
in interfaceStochasticModel
- Returns:
- The value of the
immuneWaningRate
attribute
-
getInfectionCarrierProbability
- Specified by:
getInfectionCarrierProbability
in interfaceStochasticModel
- Returns:
- The value of the
infectionCarrierProbability
attribute
-
getTargetRecoveryRate
- Specified by:
getTargetRecoveryRate
in interfaceStochasticModel
- Returns:
- The value of the
targetRecoveryRate
attribute
-
getBaselineViralInfectionRate
- Specified by:
getBaselineViralInfectionRate
in interfaceStochasticModel
- Returns:
- The value of the
baselineViralInfectionRate
attribute
-
getBaselineViralReplicationRate
- Specified by:
getBaselineViralReplicationRate
in interfaceStochasticModel
- Returns:
- The value of the
baselineViralReplicationRate
attribute
-
getVirionsDiseaseCutoff
Given the parameters for the virus, what is the unit of virions. This is a calibration parameter, and defines the limit of what is considered disease. It should be the lowest value that is transmissible and defines a patient as "infected" it does not follow that an uninfected patient does not have a small in-host viral load.- Specified by:
getVirionsDiseaseCutoff
in interfaceStochasticModel
- Returns:
- the cutoff
-
withTargetCellCount
Copy the current immutable object by setting a value for thetargetCellCount
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetCellCount- Returns:
- A modified copy of the
this
object
-
withImmuneTargetRatio
Copy the current immutable object by setting a value for theimmuneTargetRatio
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for immuneTargetRatio- Returns:
- A modified copy of the
this
object
-
withImmuneActivationRate
Copy the current immutable object by setting a value for theimmuneActivationRate
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for immuneActivationRate- Returns:
- A modified copy of the
this
object
-
withImmuneWaningRate
Copy the current immutable object by setting a value for theimmuneWaningRate
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for immuneWaningRate- Returns:
- A modified copy of the
this
object
-
withInfectionCarrierProbability
public final ImmutableStochasticModel withInfectionCarrierProbability(Abstraction.Distribution value) Copy the current immutable object by setting a value for theinfectionCarrierProbability
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectionCarrierProbability- Returns:
- A modified copy of the
this
object
-
withTargetRecoveryRate
Copy the current immutable object by setting a value for thetargetRecoveryRate
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for targetRecoveryRate- Returns:
- A modified copy of the
this
object
-
withBaselineViralInfectionRate
Copy the current immutable object by setting a value for thebaselineViralInfectionRate
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baselineViralInfectionRate- Returns:
- A modified copy of the
this
object
-
withBaselineViralReplicationRate
Copy the current immutable object by setting a value for thebaselineViralReplicationRate
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baselineViralReplicationRate- Returns:
- A modified copy of the
this
object
-
withVirionsDiseaseCutoff
Copy the current immutable object by setting a value for thevirionsDiseaseCutoff
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for virionsDiseaseCutoff- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableStochasticModel
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:targetCellCount
,immuneTargetRatio
,immuneActivationRate
,immuneWaningRate
,infectionCarrierProbability
,targetRecoveryRate
,baselineViralInfectionRate
,baselineViralReplicationRate
,virionsDiseaseCutoff
. -
toString
Prints the immutable valueStochasticModel
with attribute values. -
copyOf
Creates an immutable copy of aStochasticModel
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable StochasticModel instance
-
toBuilder
Creates a builder forImmutableStochasticModel
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableStochasticModel builder with attributes of
this
instance
-
builder
Creates a builder forImmutableStochasticModel
.ImmutableStochasticModel.builder() .setTargetCellCount(Integer) // required
targetCellCount
.setImmuneTargetRatio(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredimmuneTargetRatio
.setImmuneActivationRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredimmuneActivationRate
.setImmuneWaningRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredimmuneWaningRate
.setInfectionCarrierProbability(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredinfectionCarrierProbability
.setTargetRecoveryRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredtargetRecoveryRate
.setBaselineViralInfectionRate(Double) // requiredbaselineViralInfectionRate
.setBaselineViralReplicationRate(Double) // requiredbaselineViralReplicationRate
.setVirionsDiseaseCutoff(Integer) // requiredvirionsDiseaseCutoff
.build();- Returns:
- A new ImmutableStochasticModel builder
-