Skip to content

ToyotaResearchInstitute/rspmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rough Stochastic Pontryagin Maximum Principle and an Indirect Shooting Method

About

Code for reproducing results in (T. Lew, "Rough Stochastic Pontryagin Maximum Principle and an Indirect Shooting Method", available at https://arxiv.org/abs/2502.06726, 2025).

openloop_feedback

Using this code

To reproduce results, move to the scripts folder cd scripts and run:

  • Example for open-loop optimal control:
python example_openloop.py
  • Example for feedback optimal control:
python example_feedback.py
  • Compare solutions to open-loop and feedback problems:
python compare_openloop_feedback.py --solve --plot
  • Solve the open-loop for different hyperparameters via the direct and indirect methods:
python compare_hyperparameters.py  --solve-comparison --sample-sizes-sweep

Setup

This code was tested with Python 3.10.12 on Ubuntu 22.04.5.

We recommend installing the package in a virtual environment. First, run

python -m venv ./venv
source venv/bin/activate

Upgrade pip:

python -m pip install --upgrade pip

Then, install all dependencies (numpy, scipy, jax, osqp, matplotlib, pytest, tqdm) by running

python -m pip install -r requirements.txt

and the package can be installed by running

python -m pip install -e .

Testing

The following command should run successfully:

python -m pytest

About

Rough Stochastic Pontryagin Maximum Principle and an Indirect Shooting Method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages