Class ImmutableOutbreakBaseline

java.lang.Object
io.github.ai4ci.abm.ImmutableOutbreakBaseline
All Implemented Interfaces:
OutbreakBaseline, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableOutbreakBaseline extends Object implements OutbreakBaseline
Immutable implementation of OutbreakBaseline.

Use the builder to create immutable instances: ImmutableOutbreakBaseline.builder().

See Also:
  • Method Details

    • getViralLoadTransmissibilityProbabilityFactor

      public double getViralLoadTransmissibilityProbabilityFactor()
      This value is a scale factor for the viral load to make a probability that a transmission will occur given a particular viral load.
      Specified by:
      getViralLoadTransmissibilityProbabilityFactor in interface OutbreakBaseline
    • getExpectedContactsPerPersonPerDay

      public double getExpectedContactsPerPersonPerDay()
      Used in calibration of risk models, to help determine the information value of a contact's risk.
      Specified by:
      getExpectedContactsPerPersonPerDay in interface OutbreakBaseline
    • getSeveritySymptomsCutoff

      public double getSeveritySymptomsCutoff()
      Calibrated from the infection case ratio this gives a simulation wide cutoff that the average person will experience symptoms. Obtained from the running the in host model over a set of samples.
      Specified by:
      getSeveritySymptomsCutoff in interface OutbreakBaseline
      Returns:
    • getSeverityHospitalisationCutoff

      public double getSeverityHospitalisationCutoff()
      Calibrated from the infection case ratio and the case hospitalisation rate this gives a simulation wide cutoff that the average person will experience symptoms bad enough to require hospitalisation.
      Specified by:
      getSeverityHospitalisationCutoff in interface OutbreakBaseline
      Returns:
    • getSeverityDeathCutoff

      public double getSeverityDeathCutoff()
      Calibrated from the infection case ratio and the case fatality rate this gives a simulation wide cutoff that the average person will experience symptoms bad enough to die.
      Specified by:
      getSeverityDeathCutoff in interface OutbreakBaseline
    • getDefaultPolicyState

      public StateMachine.PolicyState getDefaultPolicyState()
      Specified by:
      getDefaultPolicyState in interface OutbreakBaseline
      Returns:
      The value of the defaultPolicyState attribute
    • getInfectiveDuration

      public int getInfectiveDuration()
      Calibrated from the 95% quantile of the infectivity profile of the in host model run over a set of unadjusted parameters
      Specified by:
      getInfectiveDuration in interface OutbreakBaseline
    • getSymptomDuration

      public int getSymptomDuration()
      Calibrated from the 95% quantile of the severity profile of the in host model run over a set of unadjusted parameters
      Specified by:
      getSymptomDuration in interface OutbreakBaseline
    • withViralLoadTransmissibilityProbabilityFactor

      public final ImmutableOutbreakBaseline withViralLoadTransmissibilityProbabilityFactor(double value)
      Copy the current immutable object by setting a value for the viralLoadTransmissibilityProbabilityFactor attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for viralLoadTransmissibilityProbabilityFactor
      Returns:
      A modified copy of the this object
    • withExpectedContactsPerPersonPerDay

      public final ImmutableOutbreakBaseline withExpectedContactsPerPersonPerDay(double value)
      Copy the current immutable object by setting a value for the expectedContactsPerPersonPerDay attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for expectedContactsPerPersonPerDay
      Returns:
      A modified copy of the this object
    • withSeveritySymptomsCutoff

      public final ImmutableOutbreakBaseline withSeveritySymptomsCutoff(double value)
      Copy the current immutable object by setting a value for the severitySymptomsCutoff attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for severitySymptomsCutoff
      Returns:
      A modified copy of the this object
    • withSeverityHospitalisationCutoff

      public final ImmutableOutbreakBaseline withSeverityHospitalisationCutoff(double value)
      Copy the current immutable object by setting a value for the severityHospitalisationCutoff attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for severityHospitalisationCutoff
      Returns:
      A modified copy of the this object
    • withSeverityDeathCutoff

      public final ImmutableOutbreakBaseline withSeverityDeathCutoff(double value)
      Copy the current immutable object by setting a value for the severityDeathCutoff attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for severityDeathCutoff
      Returns:
      A modified copy of the this object
    • withDefaultPolicyState

      public final ImmutableOutbreakBaseline withDefaultPolicyState(StateMachine.PolicyState value)
      Copy the current immutable object by setting a value for the defaultPolicyState attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for defaultPolicyState
      Returns:
      A modified copy of the this object
    • withInfectiveDuration

      public final ImmutableOutbreakBaseline withInfectiveDuration(int value)
      Copy the current immutable object by setting a value for the infectiveDuration attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for infectiveDuration
      Returns:
      A modified copy of the this object
    • withSymptomDuration

      public final ImmutableOutbreakBaseline withSymptomDuration(int value)
      Copy the current immutable object by setting a value for the symptomDuration attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for symptomDuration
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableOutbreakBaseline 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: viralLoadTransmissibilityProbabilityFactor, expectedContactsPerPersonPerDay, severitySymptomsCutoff, severityHospitalisationCutoff, severityDeathCutoff, defaultPolicyState, infectiveDuration, symptomDuration.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableOutbreakBaseline copyOf(OutbreakBaseline instance)
      Creates an immutable copy of a OutbreakBaseline 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 OutbreakBaseline instance
    • toBuilder

      Creates a builder for ImmutableOutbreakBaseline.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableOutbreakBaseline builder with attributes of this instance
    • builder

      public static ImmutableOutbreakBaseline.Builder builder()
      Creates a builder for ImmutableOutbreakBaseline.
       ImmutableOutbreakBaseline.builder()
          .setViralLoadTransmissibilityProbabilityFactor(double) // required viralLoadTransmissibilityProbabilityFactor
          .setExpectedContactsPerPersonPerDay(double) // required expectedContactsPerPersonPerDay
          .setSeveritySymptomsCutoff(double) // required severitySymptomsCutoff
          .setSeverityHospitalisationCutoff(double) // required severityHospitalisationCutoff
          .setSeverityDeathCutoff(double) // required severityDeathCutoff
          .setDefaultPolicyState(io.github.ai4ci.abm.mechanics.StateMachine.PolicyState) // required defaultPolicyState
          .setInfectiveDuration(int) // required infectiveDuration
          .setSymptomDuration(int) // required symptomDuration
          .build();
       
      Returns:
      A new ImmutableOutbreakBaseline builder