|
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | 4 |
|
| 5 | +[](https://pypi.org/project/direct-data-driven-mpc) |
5 | 6 | [](https://github.com/pavelacamposp/direct-data-driven-mpc/actions/workflows/ci_workflow.yml) |
6 | 7 | [](https://codecov.io/gh/pavelacamposp/direct-data-driven-mpc) |
7 | 8 | [](https://github.com/astral-sh/ruff) |
@@ -66,53 +67,36 @@ This package requires the following: |
66 | 67 | ``` |
67 | 68 |
|
68 | 69 | ## Installation |
69 | | -Follow these steps to create a virtual environment and install this package: |
| 70 | +Install `direct-data-driven-mpc` via PyPI: |
| 71 | +```bash |
| 72 | +pip install direct-data-driven-mpc |
| 73 | +``` |
| 74 | +**Note:** We recommend using a virtual environment to install this package, although it is not required. |
70 | 75 |
|
71 | | -> [!NOTE] |
72 | | -> On some Unix-based systems (like Ubuntu/Debian), you may need to install `venv` manually if it's not included with Python: |
73 | | -> - **On Ubuntu/Debian**: `sudo apt install python3-venv` |
74 | | -> - **On macOS** and **Windows**: `venv` should be included with Python 3 by default. Make sure to check if Python is installed correctly. |
75 | | -
|
76 | | -1. Clone this repository. |
77 | | - ```bash |
78 | | - git clone https://github.com/pavelacamposp/direct-data-driven-mpc.git |
79 | | - ``` |
80 | | -2. Navigate to the project directory: |
81 | | - ```bash |
82 | | - cd direct-data-driven-mpc |
83 | | - ``` |
84 | | -3. Create a virtual environment in the project directory: |
85 | | - - Unix/macOS: |
86 | | - ```bash |
87 | | - python3 -m venv .venv |
88 | | - ``` |
89 | | - - Windows: |
90 | | - ```cmd |
91 | | - python -m venv venv |
92 | | - ``` |
93 | | -4. Activate the virtual environment: |
| 76 | +### For Contributors: |
| 77 | +If you plan to contribute to or develop the project, follow these steps to set up a local development environment: |
| 78 | +1. Clone the repository and navigate to the project directory: |
| 79 | + ```bash |
| 80 | + git clone https://github.com/pavelacamposp/direct-data-driven-mpc.git && cd direct-data-driven-mpc |
| 81 | + ``` |
| 82 | +2. Create and activate a virtual environment: |
94 | 83 | - Unix/macOS: |
95 | | - ```bash |
96 | | - source .venv/bin/activate |
97 | | - ``` |
| 84 | + ```bash |
| 85 | + python3 -m venv .venv && source .venv/bin/activate |
| 86 | + ``` |
98 | 87 | - Windows: |
99 | | - ```cmd |
100 | | - venv\Scripts\activate |
101 | | - ``` |
102 | | -5. Install `direct-data-driven-mpc` (Data-Driven MPC controller package): |
| 88 | + ```cmd |
| 89 | + python -m venv venv && venv\Scripts\activate |
| 90 | + ``` |
| 91 | +3. Install the package with development dependencies: |
103 | 92 | ```bash |
104 | | - pip install -e . |
| 93 | + pip install -e ".[dev]" |
105 | 94 | ``` |
106 | 95 |
|
107 | | -> [!NOTE] |
108 | | -> If you plan to contribute to or develop the project, you can install optional development dependencies by running: |
109 | | -> ```bash |
110 | | -> pip install -e ".[dev]" |
111 | | -> ``` |
112 | | -> This will install tools like `pre-commit` and `mypy`. To enable automatic checks before each commit using `pre-commit` hooks, run: |
113 | | -> ```bash |
114 | | -> pre-commit install |
115 | | -> ``` |
| 96 | +This will install tools like `pre-commit` and `mypy`. To enable automatic checks before each commit using `pre-commit` hooks, run: |
| 97 | +```bash |
| 98 | +pre-commit install |
| 99 | +``` |
116 | 100 |
|
117 | 101 | ## Usage |
118 | 102 | The example scripts [`lti_dd_mpc_example.py`](examples/lti_control/lti_dd_mpc_example.py) and [`nonlinear_dd_mpc_example.py`](examples/nonlinear_control/nonlinear_dd_mpc_example.py) demonstrate the setup, simulation, and data visualization of the Data-Driven MPC controllers applied to LTI and Nonlinear systems, respectively. |
|
0 commit comments