Package epidemic.model
Enum Class SpeciesType
- All Implemented Interfaces:
Serializable,Comparable<SpeciesType>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublePobiera bazowy wskaźnik siły patogenu przenoszonego przez dany gatunek.intPobiera próg wiekowy wymagany do osiągnięcia dojrzałości rozrodczej gatunku.static voidInicjalizuje parametry wszystkich gatunków na podstawie właściwości załadowanych przez system konfiguracji (Config).private voidupdate(double virulence, int maturity) static SpeciesTypeReturns the enum constant of this class with the specified name.static SpeciesType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HUMAN
-
BAT
-
DOG
-
RAT
-
-
Field Details
-
baseVirulence
private double baseVirulence -
maturityAge
private int maturityAge
-
-
Constructor Details
-
SpeciesType
private SpeciesType()
-
-
Method Details
-
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
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 nameNullPointerException- 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.
-