Skip to content
/ ocp Public

Parameter estimation, model predictive control, moving horizon estimation, reinforcement learning ++

Notifications You must be signed in to change notification settings

mariuseb/ocp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocp

Parameter estimation, model predictive control, moving horizon estimation, reinforcement learning ++

0. Requirements

  For a minimal setup (i.e. no BOPTEST interaction and no fast linear solvers), use mamba, as the conda version of casadi on Windows seems to be broken (missing dll's etc.). Additinally, the speed of mamba is superior. Instructions to run a simple parameter estimation script are as follows:
  
  1.) Download Windows-installer and install miniforge3 (https://github.com/conda-forge/miniforge)
  
  2.) In 'Miniforge prompt' ('run as admin' if system-wide installation):
  
  - mamba init powershell
  
  3.) In powershell, from the root-folder of 'ocp', run:
  
  - mamba env create -f ocp_minimal.yml

  4.) Activate the environment with:

  - mamba activate ocp_minimal
  
  5.) See e.g. tests/param_est_tests/ZEBLL/test_param_est_2R2C.py on how to do parameter estimation on already existing data.

1. Devcontainer setup (Windows/Linux)

  1.) Download Docker desktop from: https://www.docker.com/products/docker-desktop/.

  2.) Install WSL: https://learn.microsoft.com/en-us/windows/wsl/install (backend for Docker Desktop).
        - Make sure to enable wsl2
        - Enable integration with default WSL distro (settings -> Resources -> WSL Integration)

  3.) Download Vscode from: https://code.visualstudio.com/.

  4.) Open Vscode in root-folder of "ocp"-repo.
		- Run 'code .' from any terminal

  5.) Install development container (pop-up window)
		- Let container be installed.
  
  6.) Switch workspace-folder from ocp root to /workspaces:
		- File -> Open Folder.. -> workspaces

  7.) Copy-paste the following into "launch.json" (located under "workspaces/.vscode/launch.json"):

        {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
              {
                    "name": "Python: Current File",
                    "type": "python",
                    "request": "launch",
                    "program": "${file}",
                    "console": "integratedTerminal",
                    "cwd": "${workspaceFolder}/${relativeFileDirname}",
                    "justMyCode": true,
                    "env": {
                    "PYTHONPATH": "${workspaceFolder}${pathSeparator}${env:PYTHONPATH}"
                    }
              }
        ]
        }

  8.) Run example scripts
  
  9.) Run workflow:

2. Full setup (TODO)

  For a full setup, README is TODO.

About

Parameter estimation, model predictive control, moving horizon estimation, reinforcement learning ++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published