Skip to content

Commit

Permalink
Merge pull request #339 from do-mpc/develop
Browse files Browse the repository at this point in the history
v4.5.0
  • Loading branch information
4flixt committed Mar 28, 2023
2 parents 4476b82 + 637670f commit cc5fa5e
Show file tree
Hide file tree
Showing 115 changed files with 4,936 additions and 1,028 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test Python Package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test
run: |
cd testing
python -m unittest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ testing/results/test_save.pkl
examples/**/*.pkl
documentation/source/example_gallery/**/*.pkl
testing/sample_results/*.pkl

testing/model.pkl
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- "3.6" # current default Python on Travis CI
- "3.9"
# command to install dependencies
install:
- pip install -r requirements.txt
Expand Down
74 changes: 64 additions & 10 deletions do_mpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,67 @@
# You should have received a copy of the GNU General Public License
# along with do-mpc. If not, see <http://www.gnu.org/licenses/>.

import do_mpc.tools
import do_mpc.model
import do_mpc.controller
import do_mpc.estimator
import do_mpc.optimizer
import do_mpc.simulator
import do_mpc.graphics
import do_mpc.sampling

from .version import __version__
"""
Find below a table of all **do-mpc** modules.
Classes and functions of each module are shown on their respective page.
The core modules are used to create the **do-mpc** control loop (click on elements to open documentation page):
.. graphviz::
:name: control_loop
:caption: **do-mpc** control loop and interconnection of classes.
:align: center
digraph G {
graph [fontname = "Monaco"];
node [fontname = "Monaco", fontcolor="#404040", color="#bdbdbd"];
edge [fontname = "Monaco", color="#707070"];
Model [label="Model", href="../api/do_mpc.model.Model.html#model", target="_top", shape=box, style=filled]
MPC [href="../api/do_mpc.controller.MPC.html#mpc", target="_top", shape=box, style=filled]
Simulator [href="../api/do_mpc.simulator.Simulator.html#simulator", target="_top", shape=box, style=filled]
MHE [href="../api/do_mpc.estimator.MHE.html#mhe", target="_top", shape=box, style=filled]
Data_MPC [label="MPCData", href="../api/do_mpc.data.MPCData.html#mpcdata", target="_top", shape=box, style=filled]
Data_Sim [label="Data", href="../api/do_mpc.data.Data.html#data", target="_top", shape=box, style=filled]
Data_MHE [label="Data", href="../api/do_mpc.data.Data.html#data", target="_top", shape=box, style=filled]
Graphics [label="Graphics", href="../api/do_mpc.graphics.Graphics.html#graphics", target="_top", shape=box, style=filled]
Model -> MPC;
Model -> Simulator;
Model -> MHE;
Model [shape=box, style=filled]
subgraph cluster_loop {{
rankdir=TB;
rank=same;
MPC -> Simulator [label="inputs"];
Simulator -> MHE [label="meas."];
MHE -> MPC [label="states"];
}}
MPC -> Data_MPC;
Simulator -> Data_Sim;
MHE -> Data_MHE;
Data_MPC -> Graphics;
Data_Sim -> Graphics;
Data_MHE -> Graphics;
}
"""

from . import tools
from . import model
from . import optimizer
from . import controller
from . import estimator
from . import simulator
from . import graphics
from . import sampling
from . import data
from . import graphics
from . import sysid

from ._version import __version__
1 change: 1 addition & 0 deletions do_mpc/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '4.5.0'
7 changes: 7 additions & 0 deletions do_mpc/controller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

"""
Controller for dynamic systems.
"""

from ._mpc import MPC
from ._lqr import LQR

0 comments on commit cc5fa5e

Please sign in to comment.