org.fmph.knet.infection.simulator

## Class Simulator

- java.lang.Object
- - org.fmph.knet.infection.simulator.Simulator

- Direct Known Subclasses:
    SimpleSimulator

      public abstract class Simulator
      extends java.lang.Object

  Simulator

  Na zaciatku nainicializuje stav grafu, resp. modifikatorov.
  Nasledne moze (nemusi) aplikovat ockovanie `initialModifiers`.
  Po spusteni simulacie iteruje podla nastavenia a v kazdom kroku vykona
  1. aktualizuje stav modifikatorov (`HealthModifier`) jednotlivych osob
  2. aplikuje ockovanie. Rozdelenie modifikatorov ockovania manazuje `VaccinationProvider`. Ten rozdeli pridelene ockovacie modifikatory. 3. modfikatory schopne sirenia sa rozsiria (strategiu sirenia definuje simulator).
  4. applikuje modifikatory na osoby (`PersonImpl`).

  Tato implementacia simulacie, simuluje paralelne sirenie modifikatorov v jednotlivych krokoch

  Author:
    peter nather

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Simulator(Environment environment, VaccinationProvider vaccinationProvider)` Konstruktor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getTime()` Vrati aktualny cas (den) simulacie
    `void` | `initialModifiersApplication(java.util.Collection<org.fmph.knet.infection.Pair<org.fmph.knet.infection.simulator.PersonImpl,HealthModifier>> toApply)` Tato metoda applikuje pridelene modifikatory danym osobam.
    `abstract void` | `logState(java.util.logging.Level level)` Metoda sluzi na logovanie stavu.
    `abstract HealthStatus` | `resolveStatus(org.fmph.knet.infection.simulator.PersonImpl person)` Urcuje pravidla zdravotneho stavu.
    `void` | `simulate()` Metoda bezi samotnu simulaciu.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Simulator

          public Simulator(Environment environment,
                   VaccinationProvider vaccinationProvider)

      Konstruktor
      Parameters:
        `environment` - prostredie s nastaveniami a grafom
        `vaccinationProvider` - urcuje rozdelenie ockovacej latky

  - ### Method Detail

    - #### resolveStatus

          public abstract HealthStatus resolveStatus(org.fmph.knet.infection.simulator.PersonImpl person)

      Urcuje pravidla zdravotneho stavu. Tuto metodu musi implementovat konkretna simulacia
      Parameters:
        `person` -
      Returns:

    - #### simulate

          public final void simulate()

      Metoda bezi samotnu simulaciu.

    - #### initialModifiersApplication

          public void initialModifiersApplication(java.util.Collection<org.fmph.knet.infection.Pair<org.fmph.knet.infection.simulator.PersonImpl,HealthModifier>> toApply)

      Tato metoda applikuje pridelene modifikatory danym osobam. Spravidla by sa mala volat pred startom simulacie. V opacnom pripade nema ziadnny efekt.
      Parameters:
        `toApply` -

    - #### getTime

          public final int getTime()

      Vrati aktualny cas (den) simulacie
      Returns:

    - #### logState

          public abstract void logState(java.util.logging.Level level)

      Metoda sluzi na logovanie stavu. Vola sa v klucovych momentoch Pre logovanie na konci simulacie staci LEVEL - INFO Pre logovanie na konci kazdeho kroku je potrebny LEVEL - FINE Pre logovanie po kazdob sub-kroku (sirenie, ockovanie ...) je potrebny LEVEL - FINEST Samotny obsah logu, musia implementovat konkretne simulacie
      Parameters:
        `level` -