Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

DOI MIT License

EnsembleControl: Optimal control with an ensemble of dynamical systems

The package is designed to solve optimal control problems that take the form

$$ \min{u \in U} \frac{1}{N} \sum{i=1}^N F(x^u(tf,\xi^i)) + (\alpha/2)|u|{L^2(0,t_f;\mathbb{R}^m)}^2, $$

where $\alpha \geq 0$, and for each parameter $\xi \in \Xi$ and control $u(\cdot) \in L^2(0,t_f;\mathbb{R}^m)$, the state $x^u(\cdot, \xi) = x(\cdot, \xi)$ solves the uncertain dynamical system

$$ \dot{x}(t, \xi) = f(x(t,\xi), u(t), \xi), \quad t \in (0,tf), \quad x(0,\xi) = x0(\xi). $$

Here $\xi^i \in \Xi \subset \mathbb{R}^p$ are parameters, $t_f > 0$ is the final time, and $f \colon \mathbb{R}^n \times \mathbb{R}^m \times \Xi \to \mathbb{R}^n$ is the parameterized right-hand side. This parameterized initial value problem allows for uncertain right-hand sides and initial values. The set $U$ is a subset of $L^2(0,1;\mathbb{R}^m)$ such that

$$ aj \leq uj(t) \leq bj, \quad j = 1, \ldots, m, \quad t \in (0,tf). $$

Here $aj$ and $bj$ are numbers in $[-\infty, \infty]$ for $j=1, \dots, m$.

This ensemble control problem arises as a sample average approximation of the control problem

$$ \min{u \in U} \mathbb{E}[F(x^u(tf,\xi))] + (\alpha/2)|u|{L^2(0,tf;\mathbb{R}^m)}^2. $$

Vaccination scheduling under model parameter uncertainty

We formulate a risk-neutral vaccination scheduling problem based on the control problem formulated in

Miller Neilan, Rachael and Lenhart, Suzanne, An introduction to optimal control with an application in disease modeling, https://doi.org/10.1090/dimacs/075/03.

We consider the optimal control problem

$$ \min{u \in L^2(0, 20;\mathbb{R})} \mathbb{E}\Big[\int{0}^{20} I^u(t,\xi) dt\Big]+(\alpha/2)|u|_{L^2(0,20;\mathbb{R})}^2, $$

where for each feasible control $u(\cdot) \in L^2(0, 20;\mathbb{R})$ and parameter $\xi = (a, b, c, d, e, g) \in \mathbb{R}_{>0}^6$, the states $S^u(\cdot,\xi)$, $E^u(\cdot, \xi)$, $I^u(\cdot,\xi)$, $R^u(\cdot,\xi)$, $N^u(\cdot, \xi)$ solve the SEIR model

$$ \begin{align} S^{\prime}(t) & =b N(t)-d S(t)-c S(t) I(t)-u(t) S(t),& S(0) &= S0, \ E^{\prime}(t) & =c S(t) I(t)-(e+d) E(t), &E(0) &= E0, \ I^{\prime}(t) & =e E(t)-(g+a+d) I(t), & I(0) &= I0, \ R^{\prime}(t) & =g I(t)-d R(t)+u(t) S(t), & R(0) &= R0, \ N^{\prime}(t) & =(b-d) N(t)-a I(t), & N(0) &= N_0.
\end{align} $$

The control $u$ corresponds to a vaccination rate.

We choose with $\alpha = 2$, $a1 = 0$, and $b1 = 0.9$.

We describe the parameter values and our choice of the random vector $\xi \in \mathbb{R}^6$ used for our numerical simulation. We use the initial states $S0 = 1000$, $E0 = 100$, $I0 = 50$, and $R0 = 15$. We define $N0 = S0 + E0 + I0 + R_0$. For $\xi = (a, b, c, d, e, g)$, we choose the nominal parameter

$$ \bar \xi = (0.2, 0.525, 0.001, 0.5, 0.5, 0.1). $$

We construct the random variables $\xii$, $i = 1, \ldots, 6$ through random relative perturbations of the nominal parameter $\bar \xi$. Specifically, for $\sigma = 0.1$ and independent random variables $\rhoi$, $i = 1, \ldots, 6$, uniformly distributed on the interval $[-1,1]$, we define

$$ \begin{align} \xii = (1+\sigma \rhoi)\bar \xi_i, \quad i = 1, \ldots, 6. \end{align} $$

The following figure depicts the nominal (left/top) and reference solutions (right/bottom).

Documentation

None.

The control problem is discretized using a multiple shooting approach following Direct multiple shooting. An explicit 4th order Runge--Kutta method is used to discretize the dynamical system.

Installation

The package can be installed via the command

pip install git+https://github.com/milzj/EnsembleControl

Demo

See here.

Docker

Create a local docker container via

docker build -t ensemblecontrol .

or

docker build -t ensemblecontrol . --no-cache --network=host

Alternatively, download

docker pull ghcr.io/milzj/ensemblecontrol:latest

Run the docker container using

docker run -it ensemblecontrol sh

Contributing

Information about how to contribute can be found here.

Licence

See here.

Owner

  • Name: Johannes Milz
  • Login: milzj
  • Kind: user
  • Location: Atlanta
  • Company: H. Milton Stewart School of Industrial and Systems Engineering, Georgia Institute of Technology

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Milz"
  given-names: "Johannes"
  orcid: "https://orcid.org/0000-0003-3601-3340"
title: "EnsembleControl"
doi: 10.5281/zenodo.11669862
date-released: 2024
url: "https://github.com/milzj/EnsembleControl"

GitHub Events

Total
Last Year

Dependencies

.github/workflows/build_docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
.github/workflows/check_formatting.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/deploy.yml actions
  • actions/checkout v4 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/download-artifact v3 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/docker-image.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v4 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
.github/workflows/pypi.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish v1.8.5 composite
.github/workflows/test_package.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
Dockerfile docker
  • ubuntu 22.04 build
pyproject.toml pypi
  • casadi *
  • matplotlib *
  • numpy >=1.25
  • pandas [output-formatting]
  • scipy *