Skip to content

control-toolbox/joss-oc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JOSS paper example — OptimalControl.jl

NOTEBOOK

DOI

This repository provides a standalone illustrative example of OptimalControl.jl, serving as a companion annex to the submitted JOSS paper:

OptimalControl.jl: A Julia package for modeling and solving optimal control problems with ODEs J.-B. Caillau, O. Cots, J. Gergaud, P. Martinon, S. Sed.

The script example.jl solves a constrained energy minimization problem, combining a direct method (transcription to an NLP solved with IPOPT on a coarse grid) with an indirect method (shooting based on Pontryagin's Maximum Principle) to compute a high-accuracy solution. The direct solution is used to detect the three-arc structure (unconstrained–constrained–unconstrained) and to initialize the shooting.

The generated figure comparison.pdf compares both solutions.

Requirements

The Julia dependencies and their compatible versions are specified in Project.toml (via the [compat] section) and are installed automatically when running the script.

Usage

From this directory, you can either:

  • Run the script:

    julia example.jl
  • Or open the Jupyter notebook:

    jupyter notebook example.ipynb

The script/notebook activates the local environment, instantiates the dependencies, solves the problem with both the direct and indirect methods, and displays a comparison plot of both solutions.

License

MIT — see the OptimalControl.jl repository for the license of the underlying package.

About

Standalone illustrative example of OptimalControl.jl for the submitted JOSS paper.

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors