All Projects → mayataka → autogenu-jupyter

mayataka / autogenu-jupyter

Licence: MIT License
An automatic code generator for nonlinear model predictive control (NMPC) and the continuation/GMRES method (C/GMRES) based numerical solvers for NMPC

Programming Languages

C++
36643 projects - #6 most used programming language
Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to autogenu-jupyter

ParNMPC
A Parallel Optimization Toolkit for Nonlinear Model Predictive Control (NMPC)
Stars: ✭ 173 (+94.38%)
Mutual labels:  mpc, code-generation, model-predictive-control, nmpc, nonlinear-model-predictive-control
kube-code-generator
Kubernetes code generator docker image
Stars: ✭ 60 (-32.58%)
Mutual labels:  code-generator, code-generation
django-code-generator
Generate code from your Django models for faster development
Stars: ✭ 35 (-60.67%)
Mutual labels:  code-generator, code-generation
molicode
molicode
Stars: ✭ 75 (-15.73%)
Mutual labels:  code-generator, code-generation
oag
Idiomatic Go (Golang) client package generation from OpenAPI documents
Stars: ✭ 51 (-42.7%)
Mutual labels:  code-generator, code-generation
Model-Predictive-Control
C++ implementation of Model Predictive Control(MPC)
Stars: ✭ 51 (-42.7%)
Mutual labels:  mpc, model-predictive-control
tiles
Programmatic code generation
Stars: ✭ 78 (-12.36%)
Mutual labels:  code-generator, code-generation
evon
Fast and versatile event dispatcher code generator for Golang
Stars: ✭ 15 (-83.15%)
Mutual labels:  code-generator, code-generation
mr.boilerplate
Online app to generate Scala boilerplate
Stars: ✭ 32 (-64.04%)
Mutual labels:  code-generator, code-generation
GraphQL.Tools
GraphQL.Tools is a GraphQL to C# compiler (code-generator) which turns your GraphQL schema into a set of C# classes, interfaces, and enums.
Stars: ✭ 49 (-44.94%)
Mutual labels:  code-generator, code-generation
nunavut
Generate code from DSDL using PyDSDL and Jinja2
Stars: ✭ 23 (-74.16%)
Mutual labels:  code-generator, code-generation
WebApiToTypeScript
A tool for code generating TypeScript endpoints for your ASP.NET Web API controllers
Stars: ✭ 26 (-70.79%)
Mutual labels:  code-generator, code-generation
celerio
Celerio is a code generator tool for data-driven application.
Stars: ✭ 73 (-17.98%)
Mutual labels:  code-generator, code-generation
regen
Easy C++ reflection and code generation
Stars: ✭ 29 (-67.42%)
Mutual labels:  code-generator, code-generation
copygen
Go generator to copy values from type to type and fields from struct to struct (copier without reflection). Generate any code based on types.
Stars: ✭ 121 (+35.96%)
Mutual labels:  code-generator, code-generation
EasyEE-Auto
EasyEE 自动化代码生成器。EasyEE Automated code generator.
Stars: ✭ 39 (-56.18%)
Mutual labels:  code-generator, code-generation
Evolutility Ui Jquery
Model-driven Web UI for CRUD using REST or localStorage.
Stars: ✭ 164 (+84.27%)
Mutual labels:  code-generator, code-generation
mpc
Autonomous control of an USV using Model Predictive Control
Stars: ✭ 102 (+14.61%)
Mutual labels:  mpc, model-predictive-control
typed-astunparse
Python 3 AST unparser with type comments support.
Stars: ✭ 27 (-69.66%)
Mutual labels:  code-generator, code-generation
php-json-schema-model-generator
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
Stars: ✭ 36 (-59.55%)
Mutual labels:  code-generator, code-generation

AutoGenU for Jupyter

Build Status Build status

Introduction

This project provides the continuation/GMRES method (C/GMRES method) based solvers for nonlinear model predictive control (NMPC) and an automatic code generator for NMPC, called AutoGenU.

The following C/GMRES based solvers are provided:

  • ContinuationGMRES : The original C/GMRES method (single shooting).
  • MultipleShootingCGMRES : The multiple shooting based C/GMRES method with condensing of the state and the Lagragne multipliers with respect to the state equation.
  • MSCGMRESWithInputSaturation : The multiple shooting based C/GMRES method with condensing of the state, the Lagragne multipliers with respect to the state equation, and variables with respect to the constraints on the saturation function on the control input.

Requirement

  • C++11 (MinGW or MSYS and PATH to either are required for Windows users)
  • CMake
  • Python 3.6 or later, Jupyter Lab or Jupyter Notebook, SymPy (to generate nmpc_model.hpp, nmpc_model.cpp, main.cpp, and CMakeLists.txt by AutoGenU.ipynb)
  • Python 3.6 or later, NumPy, Matplotlib, seaborn (to plot simulation data on AutoGenU.ipynb)
  • ffmpeg (to generate animations in pendubot.ipynb, cartpole.ipynb, hexacopter.ipynb, and mobilerobot.ipynb)

Usage

AutoGenU

AutoGenU.ipynb generates following source files under your setting state equation, constraints, cost function, and parameters:

  • nmpc_model.hpp
  • nmpc_model.cpp
  • main.cpp
  • CMakeLists.txt

You can also build source files for numerical simulation, execute numerical simulation, and plot or save simulation result on AutoGenU.ipynb.

C/GMRES based solvers of NMPC

The C/GMRES based solvers in src/solver directory can be used independently of AutoGenU.ipynb. You are then required the following files:

  • nmpc_model.hpp: write parameters in your model
  • nmpc_model.cpp: write equations of your model
  • main.cpp: write parameters of solvers

In addition to these files, you have to write CMakeLists.txt to build source files.

Demos

Demos are presented in pendubot.ipynb, cartpole.ipynb, hexacopter.ipynb, and mobilerobot.ipynb. You can obtain the following simulation results jusy by runnig these .ipynb files. The details of the each models and formulations are described in each .ipynb files.

Pendubot

Inverting a pendubot using MSCGMRESWithInputSaturation solver. pendubot_gif pendubot_png

Cartpole

Inverting a cartpole using ContinuationGMRES solver. cartpole_gif cartpole_png

Hexacopter

Trajectory tracking of a hexacopter using MultipleShootingCGMRES solver. hexacopter_gif hexacopter_png

Mobile robot

Obstacle avoidance of a mobile robot using MultipleShootingCGMRES solver with the semi-smooth Fischer-Burmeister method for inequality constraints. mobilerobot_gif mobilerobot_png

License

MIT

References

  1. T. Ohtsuka A continuation/GMRES method for fast computation of nonlinear receding horizon control, Automatica, Vol. 40, No. 4, pp. 563-574 (2004)
  2. C. T. Kelly, Iterative methods for linear and nonlinear equations, Frontiers in Apllied Mathematics, SIAM (1995)
  3. Y. Shimizu, T. Ohtsuka, M. Diehl, A real‐time algorithm for nonlinear receding horizon control using multiple shooting and continuation/Krylov method, International Journal of Robust and Nonlinear Control, Vol. 19, No. 8, pp. 919-936 (2008)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].