Enum Class SpeciesType

java.lang.Object
java.lang.Enum<SpeciesType>
epidemic.model.SpeciesType
All Implemented Interfaces:
Serializable, Comparable<SpeciesType>, Constable

public enum SpeciesType extends Enum<SpeciesType>
Definiuje parametry biologiczne dla poszczególnych gatunków obecnych w symulacji.

UWAGA: Zmienne wewnętrzne w enumeracji są domyślnie niezainicjalizowane. Przed rozpoczęciem głównej pętli symulacji należy bezwzględnie wywołać metodę initAllFromConfig(), aby bezpiecznie załadować wskaźniki zjadliwości i wieku dojrzałości ze scentralizowanej konfiguracji.

  • Enum Constant Details

  • Field Details

    • baseVirulence

      private double baseVirulence
    • maturityAge

      private int maturityAge
  • Constructor Details

    • SpeciesType

      private SpeciesType()
  • Method Details

    • values

      public static SpeciesType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpeciesType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • initAllFromConfig

      public static void initAllFromConfig()
      Inicjalizuje parametry wszystkich gatunków na podstawie właściwości załadowanych przez system konfiguracji (Config). Metoda ta powinna być wywoływana jednorazowo podczas fazy bootstrapingu aplikacji, przed wygenerowaniem pierwszych agentów.
    • update

      private void update(double virulence, int maturity)
    • getBaseVirulence

      public double getBaseVirulence()
      Pobiera bazowy wskaźnik siły patogenu przenoszonego przez dany gatunek.
      Returns:
      Wartość zjadliwości wykorzystywana jako mnożnik przy wyliczaniu szans na infekcję.
    • getMaturityAge

      public int getMaturityAge()
      Pobiera próg wiekowy wymagany do osiągnięcia dojrzałości rozrodczej gatunku.
      Returns:
      Minimalny wiek w epokach/latach uprawniający do udziału w procesie reprodukcji.