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:
  • Method Details

    • getTargetCellCount

      public Integer getTargetCellCount()
      Specified by:
      getTargetCellCount in interface StochasticModel
      Returns:
      The value of the targetCellCount attribute
    • getImmuneTargetRatio

      public Abstraction.Distribution getImmuneTargetRatio()
      Specified by:
      getImmuneTargetRatio in interface StochasticModel
      Returns:
      The value of the immuneTargetRatio attribute
    • getImmuneActivationRate

      public Abstraction.Distribution getImmuneActivationRate()
      Specified by:
      getImmuneActivationRate in interface StochasticModel
      Returns:
      The value of the immuneActivationRate attribute
    • getImmuneWaningRate

      public Abstraction.Distribution getImmuneWaningRate()
      Specified by:
      getImmuneWaningRate in interface StochasticModel
      Returns:
      The value of the immuneWaningRate attribute
    • getInfectionCarrierProbability

      public Abstraction.Distribution getInfectionCarrierProbability()
      Specified by:
      getInfectionCarrierProbability in interface StochasticModel
      Returns:
      The value of the infectionCarrierProbability attribute
    • getTargetRecoveryRate

      public Abstraction.Distribution getTargetRecoveryRate()
      Specified by:
      getTargetRecoveryRate in interface StochasticModel
      Returns:
      The value of the targetRecoveryRate attribute
    • getBaselineViralInfectionRate

      public Double getBaselineViralInfectionRate()
      Specified by:
      getBaselineViralInfectionRate in interface StochasticModel
      Returns:
      The value of the baselineViralInfectionRate attribute
    • getBaselineViralReplicationRate

      public Double getBaselineViralReplicationRate()
      Specified by:
      getBaselineViralReplicationRate in interface StochasticModel
      Returns:
      The value of the baselineViralReplicationRate attribute
    • getVirionsDiseaseCutoff

      public Integer 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 interface StochasticModel
      Returns:
      the cutoff
    • withTargetCellCount

      public final ImmutableStochasticModel withTargetCellCount(Integer value)
      Copy the current immutable object by setting a value for the targetCellCount attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetCellCount
      Returns:
      A modified copy of the this object
    • withImmuneTargetRatio

      public final ImmutableStochasticModel withImmuneTargetRatio(Abstraction.Distribution value)
      Copy the current immutable object by setting a value for the immuneTargetRatio attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneTargetRatio
      Returns:
      A modified copy of the this object
    • withImmuneActivationRate

      public final ImmutableStochasticModel withImmuneActivationRate(Abstraction.Distribution value)
      Copy the current immutable object by setting a value for the immuneActivationRate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneActivationRate
      Returns:
      A modified copy of the this object
    • withImmuneWaningRate

      public final ImmutableStochasticModel withImmuneWaningRate(Abstraction.Distribution value)
      Copy the current immutable object by setting a value for the immuneWaningRate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      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 the infectionCarrierProbability attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for infectionCarrierProbability
      Returns:
      A modified copy of the this object
    • withTargetRecoveryRate

      public final ImmutableStochasticModel withTargetRecoveryRate(Abstraction.Distribution value)
      Copy the current immutable object by setting a value for the targetRecoveryRate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetRecoveryRate
      Returns:
      A modified copy of the this object
    • withBaselineViralInfectionRate

      public final ImmutableStochasticModel withBaselineViralInfectionRate(Double value)
      Copy the current immutable object by setting a value for the baselineViralInfectionRate attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for baselineViralInfectionRate
      Returns:
      A modified copy of the this object
    • withBaselineViralReplicationRate

      public final ImmutableStochasticModel withBaselineViralReplicationRate(Double value)
      Copy the current immutable object by setting a value for the baselineViralReplicationRate attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for baselineViralReplicationRate
      Returns:
      A modified copy of the this object
    • withVirionsDiseaseCutoff

      public final ImmutableStochasticModel withVirionsDiseaseCutoff(Integer value)
      Copy the current immutable object by setting a value for the virionsDiseaseCutoff attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for virionsDiseaseCutoff
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableStochasticModel that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: targetCellCount, immuneTargetRatio, immuneActivationRate, immuneWaningRate, infectionCarrierProbability, targetRecoveryRate, baselineViralInfectionRate, baselineViralReplicationRate, virionsDiseaseCutoff.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value StochasticModel with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableStochasticModel copyOf(StochasticModel instance)
      Creates an immutable copy of a StochasticModel 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 for ImmutableStochasticModel.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableStochasticModel builder with attributes of this instance
    • builder

      public static ImmutableStochasticModel.Builder builder()
      Creates a builder for ImmutableStochasticModel.
       ImmutableStochasticModel.builder()
          .setTargetCellCount(Integer) // required targetCellCount
          .setImmuneTargetRatio(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required immuneTargetRatio
          .setImmuneActivationRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required immuneActivationRate
          .setImmuneWaningRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required immuneWaningRate
          .setInfectionCarrierProbability(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required infectionCarrierProbability
          .setTargetRecoveryRate(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required targetRecoveryRate
          .setBaselineViralInfectionRate(Double) // required baselineViralInfectionRate
          .setBaselineViralReplicationRate(Double) // required baselineViralReplicationRate
          .setVirionsDiseaseCutoff(Integer) // required virionsDiseaseCutoff
          .build();
       
      Returns:
      A new ImmutableStochasticModel builder