Download Mathematical and Simulation Models in the AnyLogic program

Transcript
14
A. Takači
This code says that every time the timer comes to its end, perform the vaccinations as
long as there is vaccine in stock. Vaccine recipients will be selected in a random way,
but only uninfected agents can go into a state of vaccinations.
In the state diagram for the agent, we have to add another state - vakcinisan. The
starting action for that state will be main.brojVakcinisanih++. The transition from the
state neZaražen into the state vakcinisan waits the signal event „vakcinisan“. In this
way, an agent can move into the state vakcinisan only from the state neZaražen.
Before starting the animation, it is necessary to put chartTime into the Properties and
show the variable brojVakcinisanih. The obtained graph clearly shows the efficiency
of the vaccination. Namely, the number of infected
has much decreased, compared with their number obtained in the previous simulation.