Sign inSign up

wtzbzdev/epimodel

By wtzbzdev

•Updated 5 months ago

trivial epidemiological model set up as an example and a first attempt to use docker

Image
0

440

wtzbzdev/epimodel repository overview

To run, use the command

 docker run --publish 80:80 --detach --name epimodel wtzbzdev/epimodel:1.16

This will start a web server based on the Java jdk.httpserver module, which will provide a single web page containing a description and a table containing parameters (which can be edited) and a graph. The graph is the solution to a system of differential equations that describe a simple epidemiological model. The behavior is very sensitive to the value of a parameter called the basic reproduction number, denoted as R0. The web server can be controlled with five environment variables, each set with a 'docker run' --env option:

  • --env BACKLOG=M where M is a positive integer will set the TCP backlog.
  • --env NTHREADS=M where M is a positive integer will set the number of threads the server can use.
  • --env TRACE=TRUE will turn on tracing with output directed to standard output.
  • --env IPADDR=ADDR will set the IP address of the server to ADDR. The value "wildcard" is replaced in the wildcard address and the value "loopback" indicates the IP address of the loopback device. This variable is used in version 1.12 and later.
  • --env PORT=TCP_PORT (where TCP_PORT is the server's TCP_PORT) explicitly sets the TCP port (the default is port 80). Some cloud services require that the same port number be used inside and outside a container, and in this case, the PORT environment variable might have to be changed.

To access the web page, use the URL http://localhost:/⁠ if docker was started as shown, and localhost should be replaced with the actual host name when run remotely. The web page's descriptive content defines the parameters that can be set and shows the differential equations that are solved to generate the graph. Input errors are handled by the server, and if one occurs, an error message will be printed on the graph . The docker image was created for AMD64 (x86-64) systems.

To request the graph alone (an SVG image), use the following URL:

 http://localhost/servlet/adapter?QUERY_STRING

where QUERY_STRING is

XMax=...&YMax=...&N=...&N0=...&NE0=...&NI0=...&R0=...&TAU_E=....&TAU_I=...&NV0=...&V_MAX=...&TAU_V=...

or

XMax=...&YMax=...&N=...&NR0Percent=...&NE0Percent=...&NI0Percent=...&R0=...&TAU_E=....&TAU_I=...&NV0Percent=...&V_MAXPercent=...&TAU_V=...

where '...' denotes a value and where the value are defined as follows:

  • XMax is an integer giving the maximum value in days along the X axis.
  • YMax is an integer giving the maximum count shown on the left Y axis.
  • N is the population size for the model.
  • N0 is the total number of individuals either exposed, infected, or recovered (this value is computed when parameters with "Percent" in their names are used)
  • NE0 is the total number of individuals who were exposed but not infectious.
  • NE0Percent is the percentage of the population who were exposed but not infectious.
  • NI0 is the total number of individuals who are infectious.
  • NI0Percent is the percentage of the population who are infectious.
  • NR0Percent is the percentage of the population who were previously infectious (i.e., recovered, isolated, etc.)
  • R0 is the basic reproduction number. For tags 1.7 and later, this is a function of t, represented as an expression using java or javascript syntax, with a number of built-in functions available.
  • TAU_E is the mean time in days for which an individual is in the exposed.
  • TAU_I is the mean time in days for which an individual is infectious.
  • NV0 is the initial number that are vaccinated (used in version 1.3 and later)
  • NV0Percent is the percentage of the population initially vaccinated.
  • V_MAX is the maximum number to vaccinate (used in version 1.3 and later).
  • V_MAXPercent is the percentage of the total population that will be vaccinated when vaccination stops.
  • TAU_V is the time in days to vaccinate V_MAX individuals (used in version 1.3 and later).

The values NV0, NV0Percent, V_MAX, and V_MAXPERCENT assume vaccines that are 100% effective. The values should be scaled down for cases in which the vaccine is not 100% effective.

The source code for the model (but not a Java class library it uses) is available at https://github.com/BillZaumen/epimodel⁠ .

Tag summary

Content type

Image

Digest

sha256:d86c25812…

Size

89.6 MB

Last updated

5 months ago

docker pull wtzbzdev/epimodel:1.16