---
title: "Introduction to sirplus (V2)"
date: "Last updated: 12 April 2020"
vignette: >
  %\VignetteIndexEntry{Introduction to sirplus (V2)}
  %\VignetteEngine{knitr::rmarkdown}
  \usepackage[utf8]{inputenc}
---


```{r setup, include=FALSE}
version_date <- lubridate::ymd("2020-04-12")
knitr::opts_chunk$set(echo = TRUE, cache=FALSE, eval=TRUE, collapse = TRUE,
                      tidy.opts=list(width.cutoff=60), tidy=FALSE)
```

![](sirplus-logo-small.png)

```{r, set parameters}
library(sirplus)
s.num <- 1000  # number susceptible
i.num <- 15  # number infected 
q.num <- 5  # number in self-isolation
h.num <- 1  # number in the hospital
nsteps <- 90 # number of steps (e.g. days) to simulate
control <- control_seiqhrf(nsteps = nsteps)
param <- param_seiqhrf(arec.rate = 0)
init <- init_seiqhrf(s.num = s.num, i.num = i.num, q.num = q.num, h.num = h.num)

print(init)
print(control)
print(param)
```

```{r, run simulation}
sim <- seiqhrf(init, control, param)
sim
```