This repository accompanies the paper submitted to CDC 2024 "Interval Signal Temporal Logic for Robust Optimal Control," providing code to generate the figures in our paper.
This code builds on stlpy
. See stlpy's documentation.
Requires Python >=3.9. Install the following packages
- numpy
- matplotlib
- scipy
- npinterval
Follow the instructions to install gurobi for Python. It is free for academia. Next,
- Clone the stlpy repo
- Add
gurobi_optimal_control
to the folderstlpy/solvers/gurobi/
- Replace
stlpy/STL/predicate.py
with the one in this repo - Replace
stlpy/STL/formula.py
with the one in this repo - Add
from .gurobi.gurobi_optimal_control import GurobiIntervalOptimalControl
in theGUROBI_ENABLED
section ofstlpy/solvers/__init__.py
- Run
pip install .
from the home directory ofstlpy
. - Run
python final-paper-code.py
.
- MikTex or another LaTeX interpreter, for LaTeX to appear in PyPlot plots.