public class SimpleEnvironment extends java.lang.Object implements Environment
Environment
, obsahuje nastavenie pre Infection
, Vaccine
a nastavenie casti osob nakazenych na zaciatku simulacieConstructor 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()
Environment
getFinalTime
in interface Environment
public edu.uci.ics.jung.graph.UndirectedGraph<Person,org.fmph.knet.infection.simulator.Edge> getGraph()
Environment
getGraph
in interface Environment
public 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.FileNotFoundException
java.io.IOException
public double getInitialInfectionRate()
public Vaccine getVaccineInfo()
public Infection getInfection()
public int getTime()
Environment
getTime
in interface Environment