public class SimpleEnvironment extends java.lang.Object implements Environment
Environment, obsahuje nastavenie pre Infection, Vaccine
a nastavenie casti osob nakazenych na zaciatku simulacie| Constructor and Description |
|---|
SimpleEnvironment(java.util.Properties p,
edu.uci.ics.jung.graph.UndirectedGraph<Person,org.fmph.knet.infection.simulator.Edge> graph) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFinalTime()
Celkova doba simulacie v dnoch
|
edu.uci.ics.jung.graph.UndirectedGraph<Person,org.fmph.knet.infection.simulator.Edge> |
getGraph()
Graf vztahov = moznych ciest sirenia sa nakazy
|
Infection |
getInfection() |
double |
getInitialInfectionRate() |
int |
getTime()
Vrati aktualny den simulacie
|
Vaccine |
getVaccineInfo() |
static SimpleEnvironment |
load(java.lang.String properties,
java.lang.String edgeFile)
Nacita stav prostredia zo suboru
properties a graf vztahov medzi osobami zo suboru edgeFile. |
void |
setSimulator(Simulator simulator) |
public SimpleEnvironment(java.util.Properties p,
edu.uci.ics.jung.graph.UndirectedGraph<Person,org.fmph.knet.infection.simulator.Edge> graph)
public void setSimulator(Simulator simulator)
public int getFinalTime()
EnvironmentgetFinalTime in interface Environmentpublic edu.uci.ics.jung.graph.UndirectedGraph<Person,org.fmph.knet.infection.simulator.Edge> getGraph()
EnvironmentgetGraph in interface Environmentpublic static SimpleEnvironment load(java.lang.String properties, java.lang.String edgeFile) throws java.io.FileNotFoundException, java.io.IOException
properties a graf vztahov medzi osobami zo suboru edgeFile.
Format suboru properties - priklad:
FinalTime = 20
InitialInfectionRate = 30
MaximalInfectionTime = 18
MinimalInfectionTime = 10
InfectionProbability = 80
VaccinationDuration = 1
Subor obsahujuci graf, sa ocakava v .edge formate - zoznam hran v riadkoch, v tvare uzol uzol. Priklad
node1 node2
node2 node3
node3 node1properties - edgeFile - java.io.FileNotFoundExceptionjava.io.IOExceptionpublic double getInitialInfectionRate()
public Vaccine getVaccineInfo()
public Infection getInfection()
public int getTime()
EnvironmentgetTime in interface Environment