diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 40f23173..9463fb9e 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -6,6 +6,6 @@
version: 2
updates:
- package-ecosystem: "cargo"
- directory: "/"
+ directory: "/rust"
schedule:
interval: "weekly"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7afc917a..add1e2be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,10 +36,12 @@ jobs:
rustflags: ""
- name: Cargo tests
+ working-directory: rust
run: cargo test
- name: Cargo tests (RP and JEM)
if: runner.os != 'Windows'
+ working-directory: rust
run: |
cargo test --features rp
cargo test --features jem
@@ -79,7 +81,7 @@ jobs:
with:
python-version: "3.12"
cache: "pip"
- cache-dependency-path: open-codegen/pyproject.toml
+ cache-dependency-path: python/pyproject.toml
- uses: egor-tensin/setup-clang@v1
if: runner.os == 'Linux'
@@ -111,17 +113,17 @@ jobs:
- name: Install Python package
if: runner.os == 'Windows'
- working-directory: open-codegen
run: |
+ Set-Location python
python -m pip install --upgrade pip
python -m pip install .
- name: Run Python test.py
if: runner.os == 'Windows'
- working-directory: open-codegen
- env:
- PYTHONPATH: .
- run: python -W ignore test/test.py -v
+ run: |
+ Set-Location python
+ $env:PYTHONPATH = "."
+ python -W ignore test/test.py -v
ros2_tests:
name: ROS2 tests
@@ -201,7 +203,7 @@ jobs:
with:
python-version: "3.12"
cache: "pip"
- cache-dependency-path: open-codegen/pyproject.toml
+ cache-dependency-path: python/pyproject.toml
- name: Run OCP Python tests
if: runner.os != 'Windows'
@@ -209,14 +211,14 @@ jobs:
- name: Install Python package
if: runner.os == 'Windows'
- working-directory: open-codegen
run: |
+ Set-Location python
python -m pip install --upgrade pip
python -m pip install .
- name: Run OCP Python tests
if: runner.os == 'Windows'
- working-directory: open-codegen
- env:
- PYTHONPATH: .
- run: python -W ignore test/test_ocp.py -v
+ run: |
+ Set-Location python
+ $env:PYTHONPATH = "."
+ python -W ignore test/test_ocp.py -v
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index aa1efe3d..594af46e 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -8,14 +8,11 @@ jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v5
+ - uses: actions-rust-lang/setup-rust-toolchain@v1
with:
- profile: minimal
toolchain: stable
- override: true
components: clippy
- - uses: actions-rs/clippy-check@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- args: --examples
+ - name: Cargo clippy
+ working-directory: rust
+ run: cargo clippy --all-targets --all-features --examples
diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml
index 102f0e3d..aa7e8c7c 100644
--- a/.github/workflows/rustfmt.yml
+++ b/.github/workflows/rustfmt.yml
@@ -10,14 +10,11 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v5
+ - uses: actions-rust-lang/setup-rust-toolchain@v1
with:
- profile: minimal
toolchain: stable
- override: true
components: rustfmt
- - uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --all -- --check
+ - name: Cargo fmt
+ working-directory: rust
+ run: cargo fmt --all -- --check
diff --git a/.gitignore b/.gitignore
index 19ddedec..67b5085e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,77 +1,48 @@
-# Generated by Cargo
-# will have compiled files and executables
-.eggs
-.idea
-TODOS/
+# Rust
+.cargo
/target
target/
-.cargo
-*.odp#
-*.egg-info
-*.pyc
-open-codegen/opengen/icasadi/extern/Makefile
-virt
-data
-my_optimizers
-.python_test_build
-dist/
-
-# Python tests create this folder:
-open-codegen/opengen/.python_test_build/
-
-# Haphazard files:
-__main.rs
-design/open-card.odp
-design/open-interfaces.jpeg
-design/open-interfaces.odp
-design/open-interfaces.png
-main.rs
-open-codegen/run/
-open-codegen/venv*
-
-
-# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
-# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
-/Cargo.lock
+/rust/Cargo.lock
open-clib/Cargo.lock
-
-# These are backup files generated by rustfmt
*.rs.bk
-# Docusaurus website (autogenerated files)
-/website/i18n/
-/website/node_modules/
-/website/yarn.lock
-/website/build/
-/website/.docusaurus/
-!/website/pages/
-!/website/static/
-!/website/*.js
-!/website/blog/
-!/website/core/Footer.js
-!/website/README.md
-!/website/publish.sh
+# Python
+virt
-# icasadi external files
-/icasadi/extern/
+# Docs / website
+/docs/website/i18n/
+/docs/website/node_modules/
+/docs/website/yarn.lock
+/docs/website/build/
+/docs/website/.docusaurus/
-# Visual studio code files
+# Editors / local state
+.idea
/.vscode/
+.DS_Store
-# Main file
-/src/main.rs
-
-# Autogenerated files (builds)
+# Project-local scratch files
+TODOS/
+data
+*.odp#
+__main.rs
+main.rs
+/rust/src/main.rs
/autogenerated_*
/build/
!/build/README.md
-# Other files
+# Design assets that should stay local
+design/open-card.odp
+design/open-interfaces.jpeg
+design/open-interfaces.odp
+design/open-interfaces.png
/design/panoc-only.png
+
+# Misc temporary files
*.autosave
*~
.#*
-*private*
-.DS_Store
-/img/
+
+# Private work area
private/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c09ca90..fc2b5290 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,392 +1,61 @@
-# Change Log
+# Changelog
-All notable changes to this project will be documented in this file.
+This file is the project-wide changelog for **Optimization Engine (OpEn)**.
-The format is based on [Keep a Changelog](http://keepachangelog.com/)
-and this project adheres to [Semantic Versioning](http://semver.org/).
+It serves as the entrypoint for releases across the repository and points to the
+component-specific changelogs, where the detailed changes for each module are
+recorded.
-Note: This is the main Changelog file for the Rust solver. The Changelog file for the Python interface (`opengen`) can be found in [/open-codegen/CHANGELOG.md](open-codegen/CHANGELOG.md)
+## Component Changelogs
+- [Rust library changelog](rust/CHANGELOG.md)
+- [Python interface (`opengen`) changelog](python/CHANGELOG.md)
+- [MATLAB interface changelog](matlab/CHANGELOG.md)
+- [Docker image changelog](docker/CHANGELOG.md)
-
-## [v0.12.0] - Unreleased
+## How To Read This Changelog
-### Added
+- Use this file for a high-level overview of changes across the whole project.
+- Use the component changelogs above for detailed release notes, migration
+ notes, and module-specific fixes.
+- Not every repository change appears here. Day-to-day implementation details
+ usually live only in the relevant component changelog.
-- Richer Rust-side solver errors with human-readable reasons for projection failures, non-finite computations, linear algebra failures, and invalid internal solver states
-- Fallible constraint projections via `Constraint::project(...) -> FunctionCallResult`, with error propagation through FBS, PANOC, and ALM
-- Checked affine-space construction through `AffineSpace::try_new(...)` and `AffineSpaceError`
+## Versioning Notes
-### Changed
+OpEn is a multi-component project, and not every part evolves on the same
+version number or schedule.
-- Rust solver supports generic float types
-- Expanded Rust constraint and solver test coverage with constructor validation, boundary/idempotence checks, additional `BallP` / epigraph projection cases, and broader `f32`/`f64` coverage
-- Swapped the cross-platform timer dependency to `web-time`, removed the old `instant`-specific wasm feature wiring, and updated optimizer timing call sites to use `web_time::Instant`
-- Improved Rust-side error handling across constraints and core solvers so projection failures and invalid numerical states are reported explicitly instead of being silently flattened
-- Refined `BallP`, `EpigraphSquaredNorm`, and related constraint implementations and docs for stronger numerical robustness and clearer behavior
+- The Rust solver has its own release history in `rust/CHANGELOG.md`.
+- The Python package `opengen` has its own release history in
+ `python/CHANGELOG.md`.
+- The MATLAB interface and Docker image also track their changes separately.
-
-## [v0.11.1] - 2026-03-23
+When a release affects multiple parts of the repository, this root changelog can
+be used to summarize the release and point readers to the detailed component
+entries.
+## Current Development Snapshot
-### Fixed
+At the time of writing, the main ongoing release tracks include:
-- Return best PANOC half-step on early exit (issue #325)
+- Rust library: `0.12.0`
+- Python interface (`opengen`): `0.11.0`
+- MATLAB interface: `0.1.0`
+- Docker image: `0.7.0`
+Please consult the linked component changelogs for the exact release state of
+each module.
-
-## [v0.11.0] - 2026-03-14
+## Repository Layout
-### Added
+The main components live in:
-- Implementation of `BallP` in Rust: projection on lp-ball
+- [rust/](rust/)
+- [python/](python/)
+- [matlab/](matlab/)
+- [docker/](docker/)
+- [docs/](docs/)
-### Changed
-
-- Algorithmic improvements in `EpigraphSquaredNorm` (numerically stable Newton refinement) and more detailed docs
-- Assertion in `Ball1`, `Ball2`, and `BallInf` to check that that dimensions of `x` and `xc` are compatible (with unit test)
-- Added validation in `Rectangle` and `Hyperplane` for invalid constructor inputs and strengthened dimension checks in hyperplane projection
-- Added validation in `Sphere2` for empty inputs and incompatible center dimensions
-- Added validation in `FiniteSet` for incompatible projection dimensions and corrected convexity detection for singleton sets
-- Added unit tests for invalid `Rectangle`, `Simplex`, `Hyperplane`, `Sphere2`, and `FiniteSet` edge cases
-
-### Fixed
-
-- Typos and doctest annotations in docs of `CartesianProduct` (in Rust), `Rectangle`, and `Hyperplane`, with more detailed documentation
-
-
-
-## [v0.10.0] - 2026-03-10
-
-### Added
-
-- Custom implementation of Cholesky factorisation (and solver); this is used in `AffineSpace` now.
-- New function in `matrix_operations` to compute AA' given a matrix A
-
-### Changed
-
-- Update version of `ndarray`, in `Cargo.toml`
-- Removed `modcholesky` because it was causing a bug (see issue #378)
-
-
-## [v0.9.1] - 2024-08-14
-
-
-### Fixed
-
-- Order of dependencies in `Cargo.toml` fixes crate-not-found issue on Windows
-
-
-
-
-## [v0.9.0] - 2024-03-20
-
-### Added
-
-- Rust implementation of epigraph of squared Euclidean norm (constraint)
-- Implementation of `AffineSpace`
-
-### Fixed
-
-- Clippy fixes
-
-
-## [v0.8.1] - 2023-10-27
-
-### Fixed
-
-- Fix bug in implementation of `ball2.rs` (radius was being ignored for balls centered not at the origin)
-
-
-
-
-## [v0.8.1] - 2023-10-27
-
-### Added
-
-- New constraint: sphere of Euclidean norm
-
-
-## [v0.7.7] - 2023-01-17
-
-### Fixed
-
-- Change `time::Instant` to `instant::Instant` to support WASM
-
-
-
-
-## [v0.7.6] - 2022-10-11
-
-### Added
-
-- Update functions in `AlmOptimizerStatus`
-
-
-
-
-
-## [v0.7.5] - 2022-06-22
-
-### Fixed
-
-- Fixed estimation of initial Lipschitz constant, `L`, when it is close to or equal to zero (e.g., Huber loss function)
-- Fixed issue in `AlmFactory` related to (F2) penalty constraints
-
-
-
-## [v0.7.4] - 2021-11-15
-
-### Added
-
-- Optional feature `wasm` in `Cargo.toml` (WebAssembly support); see https://alphaville.github.io/optimization-engine/docs/openrust-features for details
-- Using `instant::Instant` instead of `std::Instant` (Wasm-compatible)
-- Fixed Rust documentation of `Ball1`
-
-
-## [v0.7.3] - 2021-11-1
-
-### Added
-
-* Implementation of Simplex and Ball1 constraints in Rust
-* Fix issue with simultaneous use of features `jem` and `rp`
-
-
-
-## [v0.7.2] - 2021-10-27
-
-### Changed
-
-* Removed unnecessary `#[no_mangle]` annotations
-* Took care of additional clippy warnings
-* Bump versions: `cbindgen`: `0.8 --> 0.20` and `libc`: `0.2.0 -> 0.2.*`
-
-### Added
-
-* Support for [`rpmalloc`](https://github.com/EmbarkStudios/rpmalloc-rs) and [`jemalloc`](https://github.com/gnzlbg/jemallocator) using the features `jem` and `rp`
-
-
-
-
-
-## [v0.7.1] - 2020-09-04
-
-### Added
-
-* Introduced `Halfspace` (implemented and tested)
-* Introduced `Hyperplane` (implemented and tested)
-* New types: `FunctionCallResult`, `MappingType` and `JacobianMappingType`
-* Various clippy-related code improvements
-
-
-
-## [v0.7.0] - 2020-05-04
-
-
-### Added
-
-* ALM: compute cost value at solution
-
-
-
-
-## [v0.6.2] - 2019-10-29
-
-### Fixed
-
-* Bug in codegen for Cartesian products (PR #147)
-* Removed the use of `Default` in Rust (does not work for large slices)
-* Python: fixed typo in method `with_lfbgs_memory`
-
-### Added
-
-* New support for C-to-Rust interface via bindgen
-* Generation of example C code for C-to-Rust interface
-* CMakeLists for auto-generated example in C
-* Additional Python examples on web page
-* Chat button in web page (for gitter)
-* Added option `local_path` in `with_open_version`
-
-### Changed
-
-* Homotopy module in Rust is annotated as deprecated
-* TCP server response is cast into Python objects (PR #144)
-* Auto-generated code links to most recent crate, unless overriden
-* Changed `jacobian` to `gradient` in Python
-
-## [v0.6.1-alpha.2] - 2019-09-7
-
-### Fixed
-
-* TCP server: Malformed error JSON is now fixed
-* Algorithm now returns `u_bar`, which is feasible (not `u`)
-
-### Added
-
-* Introduced C interface to CasADi-generated C functions
-* Rust and Python implementations of joint ALM/PM algorithms
-* Rust docs for augmented Lagrangian method (ALM)
-* Release of crate version `0.6.1-alpha.1` and `0.6.1-alpha.2`
-* Introduced `#![allow(dead_code)]` in ALM implementation
-* New AKKT-compliant termination criterion
-* Tolerance relaxation in penalty method
-* Finite sets supported in Rust
-* Rust/Python: setting CBFGS parameters
-* Second-order cones supported in Rust
-* Rust docs: support for equations with KaTeX
-
-### Changed
-
-* Updated README
-
-
-### Removed
-
-* Support for Python <3.6 (deprecated)
-* Module `continuation` is going to become obsolete
-
-
-## [v0.5.0] - 2019-06-22
-
-### Fixed
-
-* Fixed `with_max_duration` in `PANOC` not following the builder pattern
-* Fixed misplaced `.unwrap()` in the `HomotopyOptimizer`
-* Fixed so the Python builder uses the current directory as default
-
-### Added
-
-* Generation of C/C++ bindings added in the Python interface and included in the test suite
-* Support in Rust for Cartesian product of constraints
-
-### Removed
-
-* Deprecated: `enable_tcp_interface` and `enable_c_bindings_generation`
-
-
-
-## [v0.4.0] - 2019-06-03
-
-### Fixed
-
-* Windows interoperability of `matlab_open_root()` [closes #24]
-* Issues with file separator on Windows [#26 and #27]
-* Handling corner cases such as wrong input parameters
-* Rust: checking for `NaN` and `Inf` values in solution
-
-### Added
-
-* New Python interface for code generation (works with Python 2.7, 3.4 and 3.6)
-* Homotopy method implemented in Rust
-* TCP interface in Rust is generated automatically on request
-* Support for OSX and linux distros on [travis] [closes #25]
-* Continuous integration on [Appveyor]
-* Experimental C bindings library
-* Documentation for new Rust code and Python code
-* Unit tests in Python using `unittest`
-
-### Changed
-
-* Rust API: Using `Option<>` and `Result<>` to handle errors
-* Updated L-BFGS dependency; now using version `0.2` (no NonZeroUsize)
-
-
-## [v0.3.1] - 2019-05-21
-
-### Fixed
-
-* An error in the Matlab codegen which made it inoperable
-
-### Added
-
-* Support for compiling for different targets
-
-
-
-## [v0.3.0] - 2019-05-16
-
-This is a breaking API change.
-
-### Fixed
-
-* A lot of internal fixes and clean up
-* `PANOCEngine` and `FBSEngine` is no longer explicitly needed
-* Simplified import system
-* Cost functions now need to return a `Result<(), Error>` to indicate if the evaluation was successful
-
-### Added
-
-* Started an `examples` folder
-
-
-
-
-[v0.11.1]: https://github.com/alphaville/optimization-engine/compare/v0.11.0...v0.11.1
-[v0.11.0]: https://github.com/alphaville/optimization-engine/compare/v0.10.0...v0.11.0
-[v0.10.0]: https://github.com/alphaville/optimization-engine/compare/v0.9.1...v0.10.0
-[v0.9.1]: https://github.com/alphaville/optimization-engine/compare/v0.9.0...v0.9.1
-[v0.9.0]: https://github.com/alphaville/optimization-engine/compare/v0.8.1...v0.9.0
-[v0.8.1]: https://github.com/alphaville/optimization-engine/compare/v0.8.0...v0.8.1
-[v0.8.0]: https://github.com/alphaville/optimization-engine/compare/v0.7.7...v0.8.0
-[v0.7.7]: https://github.com/alphaville/optimization-engine/compare/v0.7.6...v0.7.7
-[v0.7.6]: https://github.com/alphaville/optimization-engine/compare/v0.7.5...v0.7.6
-[v0.7.5]: https://github.com/alphaville/optimization-engine/compare/v0.7.4...v0.7.5
-[v0.7.4]: https://github.com/alphaville/optimization-engine/compare/v0.7.3...v0.7.4
-[v0.7.3]: https://github.com/alphaville/optimization-engine/compare/v0.7.2...v0.7.3
-[v0.7.2]: https://github.com/alphaville/optimization-engine/compare/v0.7.1...v0.7.2
-[v0.7.1]: https://github.com/alphaville/optimization-engine/compare/v0.7.0...v0.7.1
-[v0.7.0]: https://github.com/alphaville/optimization-engine/compare/v0.6.2...v0.7.0
-[v0.6.2]: https://github.com/alphaville/optimization-engine/compare/v0.6.1-alpha.2...v0.6.2
-[v0.6.1-alpha.2]: https://github.com/alphaville/optimization-engine/compare/v0.5.0...v0.6.1-alpha.2
-[v0.5.0]: https://github.com/alphaville/optimization-engine/compare/v0.4.0...v0.5.0
-[v0.4.0]: https://github.com/alphaville/optimization-engine/compare/v0.3.1...v0.4.0
-[v0.3.1]: https://github.com/alphaville/optimization-engine/compare/v0.3.0...v0.3.1
-[v0.3.0]: https://github.com/alphaville/optimization-engine/compare/v0.2.2...v0.3.0
-
-
-[closes #24]: https://github.com/alphaville/optimization-engine/issues/24
-[closes #25]: https://github.com/alphaville/optimization-engine/issues/25
-
-
-[travis]: https://travis-ci.org/alphaville/optimization-engine/builds/537155440
-[Appveyor]: https://ci.appveyor.com/project/alphaville/optimization-engine
+This changelog is intentionally lightweight so it can remain a stable landing
+page even as individual components evolve independently.
diff --git a/README.md b/README.md
index d4f5bb43..1cb95b5d 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ OpEn allows application developers and researchers to focus on the challenges of
### Embedded applications
OpEn can run on embedded devices; here we see it running on an intel Atom for the autonomous navigation of a lab-scale micro aerial vehicle - the controller runs at **20Hz** using only **15%** CPU!
-
+
## Optimal Control
@@ -196,7 +196,7 @@ let status = optimizer.solve(&mut u)?;
```
See the dedicated [Rust documentation](https://alphaville.github.io/optimization-engine/docs/openrust-basic) for a full introduction and more complete examples.
-See more Rust examples [here](examples).
+See more Rust examples [here](rust/examples).
## Check out next...
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index e91d5115..00000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-#This Appveyor configuration file is based on the configuration
-#file of the following project:
-#
-#https://github.com/starkat99/appveyor-rust/
-#
-
-## Operating System (VM environment) ##
-
-# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
-os: Visual Studio 2015
-
-
-environment:
- matrix:
-
-### MSVC Toolchains ###
-
- # Stable 64-bit MSVC
- - channel: stable
- target: x86_64-pc-windows-msvc
- # Stable 32-bit MSVC
- # - channel: stable
- # target: i686-pc-windows-msvc
-
-### GNU Toolchains ###
-
- # Stable 64-bit GNU
- # - channel: stable
- # target: x86_64-pc-windows-gnu
- # Stable 32-bit GNU
- # - channel: stable
- # target: i686-pc-windows-gnu
-
-### Allowed failures ###
-
-# See Appveyor documentation for specific details. In short, place any channel or targets you wish
-# to allow build failures on (usually nightly at least is a wise choice). This will prevent a build
-# or test failure in the matching channels/targets from failing the entire build.
-#matrix:
-# allow_failures:
-# - channel: nightly
-
-# If you only care about stable channel build failures, uncomment the following line:
- #- channel: beta
-
-## Install Script ##
-
-# This is the most important part of the Appveyor configuration. This installs the version of Rust
-# specified by the 'channel' and 'target' environment variables from the build matrix. This uses
-# rustup to install Rust.
-#
-# For simple configurations, instead of using the build matrix, you can simply set the
-# default-toolchain and default-host manually here.
-install:
- - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- - rustup-init -yv --default-toolchain %channel% --default-host %target%
- - set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- - rustc -vV
- - cargo -vV
-
-## Build Script ##
-
-# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents
-# the "directory does not contain a project or solution file" error.
-build: false
-
-# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs
-#directly or perform other testing commands. Rust will automatically be placed in the PATH
-# environment variable.
-test_script:
- - cargo add roots
- - cargo add ndarray --features approx
- - cargo build
- - cargo test --verbose %cargoflags%
diff --git a/ci/script.sh b/ci/script.sh
index b8d988b7..cb599288 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -1,7 +1,19 @@
#!/bin/bash
set -euxo pipefail
+# To use locally, from the root directory and from a bash shell...
+#
+# 1. To run the core Python tests:
+# ci/script.sh python-tests
+#
+# 2. To run the Python OCP tests:
+# ci/script.sh ocp-tests
+#
+# 3. To run the Python ROS2 tests:
+# ci/script.sh ros2-tests
+
SKIP_RPI_TEST="${SKIP_RPI_TEST:-0}"
+DO_DOCKER="${DO_DOCKER:-0}"
TASK="${1:-all-python-tests}"
function run_clippy_test() {
@@ -25,7 +37,7 @@ function run_clippy_test() {
}
setup_python_test_env() {
- cd open-codegen
+ cd python
export PYTHONPATH=.
python -m venv venv
@@ -106,36 +118,37 @@ test_docker() {
}
main() {
- if [ $DO_DOCKER -eq 0 ]; then
- case "$TASK" in
- python-tests)
- echo "Running Python tests and generated Clippy tests"
- setup_python_test_env
- run_python_core_tests
- ;;
- ros2-tests)
- echo "Running ROS2 Python tests"
- setup_python_test_env
- run_python_ros2_tests
- ;;
- ocp-tests)
- echo "Running OCP Python tests"
- setup_python_test_env
- run_python_ocp_tests
- ;;
- all-python-tests)
- echo "Running Python tests, generated Clippy tests, and OCP tests"
- all_python_tests
- ;;
- *)
- echo "Unknown task: $TASK"
- exit 1
- ;;
- esac
- else
+ if [ "$DO_DOCKER" -ne 0 ]; then
echo "Building Docker image"
test_docker
+ return
fi
+
+ case "$TASK" in
+ python-tests)
+ echo "Running Python tests and generated Clippy tests"
+ setup_python_test_env
+ run_python_core_tests
+ ;;
+ ros2-tests)
+ echo "Running ROS2 Python tests"
+ setup_python_test_env
+ run_python_ros2_tests
+ ;;
+ ocp-tests)
+ echo "Running OCP Python tests"
+ setup_python_test_env
+ run_python_ocp_tests
+ ;;
+ all-python-tests)
+ echo "Running Python tests, generated Clippy tests, and OCP tests"
+ all_python_tests
+ ;;
+ *)
+ echo "Unknown task: $TASK"
+ exit 1
+ ;;
+ esac
}
main
diff --git a/ci/sphinx-documentation.sh b/ci/sphinx-documentation.sh
index 452f057e..12a3794b 100644
--- a/ci/sphinx-documentation.sh
+++ b/ci/sphinx-documentation.sh
@@ -27,7 +27,7 @@ pip install sphinx
pip install sphinx-rtd-theme
# Install opengen
-pushd open-codegen
+pushd python
pip install .
popd # back to $GITHUB_WORKSPACE
@@ -48,11 +48,11 @@ git checkout $current_branch
# Build the docs
rm -rf sphinx
mkdir -p sphinx
-pushd sphinx-dox
-sphinx-apidoc -o ./source/ ../open-codegen/opengen
+pushd docs/sphinx
+sphinx-apidoc -o ./source/ ../../python/opengen
echo Last updated: $(date -u) >> source/index.rst; sed '$d' source/index.rst; # update date at the end of file
make html || :
-cp -r build/html/ ../sphinx
+cp -r build/html/ ../../sphinx
git checkout source/index.rst # no need to commit this
popd # back to $GITHUB_WORKSPACE
diff --git a/docs/algorithm.md b/docs/content/algorithm.md
similarity index 100%
rename from docs/algorithm.md
rename to docs/content/algorithm.md
diff --git a/docs/cite_open.md b/docs/content/cite_open.md
similarity index 100%
rename from docs/cite_open.md
rename to docs/content/cite_open.md
diff --git a/docs/contributing.mdx b/docs/content/contributing.mdx
similarity index 93%
rename from docs/contributing.mdx
rename to docs/content/contributing.mdx
index 7671c872..a3541427 100644
--- a/docs/contributing.mdx
+++ b/docs/content/contributing.mdx
@@ -90,12 +90,12 @@ We follow [this style guide](https://www.python.org/dev/peps/pep-0008) and its [
### Website
-This documentation is generated with Docusaurus - read a detailed guide [here](https://github.com/alphaville/optimization-engine/blob/master/website/README.md).
+This documentation is generated with Docusaurus - read a detailed guide [here](https://github.com/alphaville/optimization-engine/blob/master/docs/website/README.md).
-- All docs are in `docs/`
-- Blog entries are in `website/blog/`
+- All docs are in `docs/content/`
+- Blog entries are in `docs/website/blog/`
-To start the website locally (at [http://localhost:3000/optimization-engine](http://localhost:3000/optimization-engine)) change directory to `website` and run `yarn start`. To update the website, execute `./publish.sh` (you need to be a collaborator on github).
+To start the website locally (at [http://localhost:3000/optimization-engine](http://localhost:3000/optimization-engine)) change directory to `docs/website` and run `yarn start`. To update the website, execute `./publish.sh` from there (you need to be a collaborator on github).
## Using Git
When using Git, keep in mind the following guidelines:
@@ -172,9 +172,9 @@ This will have to be a new PR.
Checklist:
- - Updated [CHANGELOG](https://github.com/alphaville/optimization-engine/blob/master/open-codegen/CHANGELOG.md): bump version, write summary of changes
+ - Updated [CHANGELOG](https://github.com/alphaville/optimization-engine/blob/master/python/CHANGELOG.md): bump version, write summary of changes
- Updated [VERSION]: bump version
- - Review [`pyproject.toml`](https://github.com/alphaville/optimization-engine/blob/master/open-codegen/pyproject.toml)
+ - Review [`pyproject.toml`](https://github.com/alphaville/optimization-engine/blob/master/python/pyproject.toml)
- Resolve all associated issues on GitHub
- Write new unit tests if necessary
- Update the API documentation
@@ -230,7 +230,7 @@ GIT_USER=alphaville \
USE_SSH=true \
yarn deploy
```
-from within `website/`. Then, update the opengen API docs too;
+from within `docs/website/`. Then, update the opengen API docs too;
just push a commit with message starting with `[docit]`.
You can also issue a commit without git-add. Run
@@ -241,9 +241,9 @@ git commit -m '[docit] update api docs' --allow-empty
[CHANGELOG]: https://github.com/alphaville/optimization-engine/blob/master/CHANGELOG.md
-[VERSION]: https://github.com/alphaville/optimization-engine/blob/master/open-codegen/VERSION
-[Cargo.toml]: https://github.com/alphaville/optimization-engine/blob/master/Cargo.toml
-[setup.py]: https://github.com/alphaville/optimization-engine/blob/master/open-codegen/setup.py
+[VERSION]: https://github.com/alphaville/optimization-engine/blob/master/python/VERSION
+[Cargo.toml]: https://github.com/alphaville/optimization-engine/blob/master/rust/Cargo.toml
+[setup.py]: https://github.com/alphaville/optimization-engine/blob/master/python/setup.py
[release v0.4.0]: https://github.com/alphaville/optimization-engine/releases/tag/v0.4.0
[bug]: https://github.com/alphaville/optimization-engine/issues/new?template=bug_report.md
[issues on github]: https://github.com/alphaville/optimization-engine/issues
@@ -261,10 +261,10 @@ it is best to use a dedicated Python virtual environment.
### Set up a virtual environment
-From within `open-codegen/`, create and activate a virtual environment:
+From within `python/`, create and activate a virtual environment:
```bash
-cd open-codegen
+cd python
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
@@ -300,7 +300,7 @@ cargo check
### Run the Python and code-generation tests
-From within `open-codegen/`, run the following tests after you activate `venv`
+From within `python/`, run the following tests after you activate `venv`
```bash
# Activate venv first
@@ -318,7 +318,7 @@ environment also contains a working ROS2 installation together with `ros2` and
For example:
```bash
-cd open-codegen
+cd python
micromamba activate ros_env
pip install .
python -W ignore test/test_ros2.py -v
diff --git a/docs/docker.md b/docs/content/docker.md
similarity index 100%
rename from docs/docker.md
rename to docs/content/docker.md
diff --git a/docs/example-nav.md b/docs/content/example-nav.md
similarity index 100%
rename from docs/example-nav.md
rename to docs/content/example-nav.md
diff --git a/docs/example-nmpc.md b/docs/content/example-nmpc.md
similarity index 100%
rename from docs/example-nmpc.md
rename to docs/content/example-nmpc.md
diff --git a/docs/example_bnp_py.md b/docs/content/example_bnp_py.md
similarity index 100%
rename from docs/example_bnp_py.md
rename to docs/content/example_bnp_py.md
diff --git a/docs/example_estimation_py.md b/docs/content/example_estimation_py.md
similarity index 100%
rename from docs/example_estimation_py.md
rename to docs/content/example_estimation_py.md
diff --git a/docs/example_invpend_py.md b/docs/content/example_invpend_py.md
similarity index 100%
rename from docs/example_invpend_py.md
rename to docs/content/example_invpend_py.md
diff --git a/docs/example_navigation_py.mdx b/docs/content/example_navigation_py.mdx
similarity index 100%
rename from docs/example_navigation_py.mdx
rename to docs/content/example_navigation_py.mdx
diff --git a/docs/example_navigation_ros_codegen.md b/docs/content/example_navigation_ros_codegen.md
similarity index 100%
rename from docs/example_navigation_ros_codegen.md
rename to docs/content/example_navigation_ros_codegen.md
diff --git a/docs/example_rosenbrock_py.mdx b/docs/content/example_rosenbrock_py.mdx
similarity index 100%
rename from docs/example_rosenbrock_py.mdx
rename to docs/content/example_rosenbrock_py.mdx
diff --git a/docs/example_tanks_py.md b/docs/content/example_tanks_py.md
similarity index 100%
rename from docs/example_tanks_py.md
rename to docs/content/example_tanks_py.md
diff --git a/docs/faq.md b/docs/content/faq.md
similarity index 100%
rename from docs/faq.md
rename to docs/content/faq.md
diff --git a/docs/installation.md b/docs/content/installation.md
similarity index 92%
rename from docs/installation.md
rename to docs/content/installation.md
index 22d4e95f..836a00fa 100644
--- a/docs/installation.md
+++ b/docs/content/installation.md
@@ -66,8 +66,8 @@ need to create such an environment, then activate it, and lastly, install
`opengen` as above using `pip`. That is, you need to run:
```console
-virtualenv -p python3.6 venv36
-source venv36/bin/activate
+virtualenv -p python3.13 venv
+source venv/bin/activate
pip install opengen
```
@@ -122,11 +122,11 @@ If you want to contribute to OpEn, you should rather *fork* OpEn on [github](htt
### Install opengen
-Go intro `optimization-engine/open-codegen` and create a virtual environment:
+Go into `optimization-engine/python` and create a virtual environment:
```sh
-cd optimization-engine/open-codegen
-virtualenv -p python3.6 venvopen
+cd optimization-engine/python
+virtualenv -p python3.13 venvopen
source venvopen/bin/activate
python setup.py install
```
@@ -139,7 +139,7 @@ Use the above virtual environment (`venvopen`) in PyCharm:
- go to Run > Edit Configurations > Add new configuration
- Script path: specify `main.py`
-- Working dir: `optimization-engine/open-codegen/opengen`
+- Working dir: `optimization-engine/python/opengen`
- Python interpreter: `venvopen`
### Install OpEn in Rust
@@ -153,6 +153,6 @@ cargo build
```
If you need to use `opengen` - the Python interface of OpEn - with a local
-version of the Rust library, use `with_open_version(local_path=...)` in
+version of the Rust library, use `with_open_version(local_path="/path/to/optimization-engine/rust")` in
your code. Read the [advanced options](python-advanced#build-options)
for details.
diff --git a/docs/content/matlab-api.mdx b/docs/content/matlab-api.mdx
new file mode 100644
index 00000000..c4ef1163
--- /dev/null
+++ b/docs/content/matlab-api.mdx
@@ -0,0 +1,238 @@
+---
+id: matlab-api
+title: MATLAB API
+description: TCP-based MATLAB API for parametric and OCP-generated OpEn optimizers
+---
+
+# MATLAB API
+
+This page documents the current MATLAB API of OpEn.
+
+The current MATLAB interface lives in `matlab/api` and communicates with
+optimizers that were generated in Python and expose a TCP server.
+
+If you are looking for the older MATLAB code-generation workflow, see the
+[legacy MATLAB interface](./matlab-interface) and the
+[MATLAB examples](./matlab-examples).
+
+## Overview
+
+The current MATLAB API supports:
+
+- TCP-based calls to standard parametric optimizers
+- TCP-based calls to OCP-generated optimizers created with `opengen.ocp`
+- Loading `optimizer_manifest.json` for OCP optimizers
+- Automatic endpoint discovery from the sibling `optimizer.yml`
+- Warm-start inputs:
+ - `InitialGuess`
+ - `InitialLagrangeMultipliers`
+ - `InitialPenalty`
+- Health-check and shutdown operations through `ping()` and `kill()`
+
+The main MATLAB entry points are:
+
+- `OpEnTcpOptimizer`
+- `createOpEnTcpOptimizer`
+
+:::important
+The MATLAB API is a TCP client only. It does **not** start the optimizer
+server; the generated optimizer must already be running.
+:::
+
+## Getting Started
+
+Add the MATLAB API directory to your path:
+
+```matlab
+addpath(fullfile(pwd, 'matlab', 'api'));
+```
+
+Create a client using either:
+
+- `OpEnTcpOptimizer(port)`
+- `OpEnTcpOptimizer(port, ip)`
+- `OpEnTcpOptimizer(ip, port)`
+
+For example:
+
+```matlab
+client = OpEnTcpOptimizer(3301);
+pong = client.ping();
+disp(pong.Pong);
+```
+
+## Parametric Optimizers
+
+For a standard parametric optimizer, call `solve` with the flat parameter
+vector:
+
+```matlab
+client = OpEnTcpOptimizer(3301);
+
+response = client.solve([2.0, 10.0]);
+
+if response.ok
+ disp(response.solution);
+ disp(response.cost);
+ disp(response.exit_status);
+else
+ error('OpEn:SolverError', '%s', response.message);
+end
+```
+
+You can also provide warm-start data:
+
+```matlab
+response1 = client.solve([2.0, 10.0]);
+
+response2 = client.solve( ...
+ [2.0, 10.0], ...
+ 'InitialGuess', response1.solution, ...
+ 'InitialLagrangeMultipliers', response1.lagrange_multipliers, ...
+ 'InitialPenalty', response1.penalty);
+```
+
+To stop the server gracefully:
+
+```matlab
+client.kill();
+```
+
+## OCP Optimizers
+
+For OCP-generated optimizers, the MATLAB API uses the optimizer manifest to
+pack named parameter blocks into the flat parameter vector expected by the
+underlying TCP solver.
+
+This matches the Python `GeneratedOptimizer.solve(...)` workflow conceptually,
+but in MATLAB you pass the values as **name-value pairs**.
+
+### Loading an OCP Manifest
+
+If `optimizer_manifest.json` and `optimizer.yml` are in the same generated
+optimizer directory, MATLAB can read the TCP endpoint automatically:
+
+```matlab
+manifestPath = fullfile( ...
+ pwd, ...
+ 'open-codegen', ...
+ '.python_test_build_ocp', ...
+ 'ocp_single_tcp', ...
+ 'optimizer_manifest.json');
+
+client = OpEnTcpOptimizer('ManifestPath', manifestPath);
+disp(client.parameterNames());
+```
+
+You can also override the TCP endpoint explicitly:
+
+```matlab
+client = OpEnTcpOptimizer(3391, 'ManifestPath', manifestPath);
+```
+
+### Single-Shooting OCP Example
+
+The following example uses a generated OCP optimizer whose manifest defines
+the parameter blocks `x0` and `xref`:
+
+```matlab
+response = client.solve( ...
+ 'x0', [1.0, -1.0], ...
+ 'xref', [0.0, 0.0]);
+
+if response.ok
+ disp(response.solution);
+ disp(response.inputs);
+ disp(response.exit_status);
+else
+ error('OpEn:SolverError', '%s', response.message);
+end
+```
+
+If some manifest parameters have defaults, only the required ones need to be
+provided:
+
+```matlab
+manifestPath = fullfile( ...
+ pwd, ...
+ 'open-codegen', ...
+ '.python_test_build_ocp', ...
+ 'ocp_manifest_bindings', ...
+ 'optimizer_manifest.json');
+
+client = OpEnTcpOptimizer('ManifestPath', manifestPath);
+response = client.solve('x0', [1.0, 0.0]);
+```
+
+### Multiple-Shooting OCP Example
+
+For multiple-shooting OCPs, the MATLAB response also contains the reconstructed
+state trajectory:
+
+```matlab
+manifestPath = fullfile( ...
+ pwd, ...
+ 'open-codegen', ...
+ '.python_test_build_ocp', ...
+ 'ocp_multiple_tcp', ...
+ 'optimizer_manifest.json');
+
+client = OpEnTcpOptimizer('ManifestPath', manifestPath);
+
+response = client.solve( ...
+ 'x0', [1.0, -1.0], ...
+ 'xref', [0.0, 0.0]);
+
+disp(response.inputs);
+disp(response.states);
+```
+
+### OCP Warm-Start Example
+
+Warm-start options can be combined with the named OCP parameters:
+
+```matlab
+response1 = client.solve( ...
+ 'x0', [1.0, -1.0], ...
+ 'xref', [0.0, 0.0]);
+
+response2 = client.solve( ...
+ 'x0', [1.0, -1.0], ...
+ 'xref', [0.0, 0.0], ...
+ 'InitialGuess', response1.solution, ...
+ 'InitialLagrangeMultipliers', response1.lagrange_multipliers, ...
+ 'InitialPenalty', response1.penalty);
+```
+
+## Response Format
+
+All successful solver calls return the low-level solver fields produced by the
+TCP server, together with a MATLAB-friendly `ok` flag.
+
+Typical fields include:
+
+- `ok`
+- `solution`
+- `cost`
+- `exit_status`
+- `solve_time_ms`
+- `penalty`
+- `num_outer_iterations`
+- `num_inner_iterations`
+- `last_problem_norm_fpr`
+- `f1_infeasibility`
+- `f2_norm`
+- `lagrange_multipliers`
+
+For OCP optimizers, the response also includes:
+
+- `packed_parameter`
+- `inputs`
+- `states` for multiple-shooting formulations
+
+## Related Pages
+
+- [Python TCP/IP interface](./python-tcp-ip)
+- [Python OCP guide](./python-ocp-1)
+- [Legacy MATLAB interface](./matlab-interface)
+- [MATLAB examples](./matlab-examples)
diff --git a/docs/matlab-examples.md b/docs/content/matlab-examples.md
similarity index 100%
rename from docs/matlab-examples.md
rename to docs/content/matlab-examples.md
diff --git a/docs/matlab-interface.md b/docs/content/matlab-interface.md
similarity index 100%
rename from docs/matlab-interface.md
rename to docs/content/matlab-interface.md
diff --git a/docs/open-intro.md b/docs/content/open-intro.md
similarity index 100%
rename from docs/open-intro.md
rename to docs/content/open-intro.md
diff --git a/docs/openrust-alm.md b/docs/content/openrust-alm.md
similarity index 98%
rename from docs/openrust-alm.md
rename to docs/content/openrust-alm.md
index 44d0ad75..f9f6bf8f 100644
--- a/docs/openrust-alm.md
+++ b/docs/content/openrust-alm.md
@@ -115,7 +115,7 @@ fn main() {
}
```
-A complete example is available at [`pm.rs`](https://github.com/alphaville/optimization-engine/blob/master/examples/pm.rs).
+A complete example is available at [`pm.rs`](https://github.com/alphaville/optimization-engine/blob/master/rust/examples/pm.rs).
## Augmented Lagrangian
@@ -323,7 +323,7 @@ the norm-distance of $F_1(u)$ from $C$. We see that this is indeed below $\delta
## Additional Examples
-See [`alm_pm.rs`](https://github.com/alphaville/optimization-engine/blob/master/examples/alm_pm.rs).
+See [`alm_pm.rs`](https://github.com/alphaville/optimization-engine/blob/master/rust/examples/alm_pm.rs).
[`AlmOptimizer`]: https://docs.rs/optimization_engine/*/optimization_engine/alm/struct.AlmOptimizer.html
[`AlmFactory`]: https://docs.rs/optimization_engine/*/optimization_engine/alm/struct.AlmFactory.html
diff --git a/docs/openrust-arithmetic.mdx b/docs/content/openrust-arithmetic.mdx
similarity index 97%
rename from docs/openrust-arithmetic.mdx
rename to docs/content/openrust-arithmetic.mdx
index 9d4592a9..9d00c77b 100644
--- a/docs/openrust-arithmetic.mdx
+++ b/docs/content/openrust-arithmetic.mdx
@@ -31,8 +31,7 @@ precision arithmetic.
-
-
+
```rust
use optimization_engine::{constraints, panoc::PANOCCache, Problem, SolverError};
@@ -65,7 +64,7 @@ assert!(status.has_converged());
```
-
+
```rust
use optimization_engine::{constraints, panoc::PANOCCache, Problem, SolverError};
diff --git a/docs/openrust-basic.md b/docs/content/openrust-basic.md
similarity index 98%
rename from docs/openrust-basic.md
rename to docs/content/openrust-basic.md
index 719ffd6d..fde4e607 100644
--- a/docs/openrust-basic.md
+++ b/docs/content/openrust-basic.md
@@ -220,7 +220,7 @@ fn main() {
}
```
-This example can be found in [`examples/panoc_ex1.rs`](https://github.com/alphaville/optimization-engine/blob/master/examples/panoc_ex1.rs).
+This example can be found in [`examples/panoc_ex1.rs`](https://github.com/alphaville/optimization-engine/blob/master/rust/examples/panoc_ex1.rs).
## Solving parametric problems
@@ -361,8 +361,8 @@ the imposition of a maximum allowed duration, the exit status will be
## Examples
-- [`panoc_ex1.rs`](https://github.com/alphaville/optimization-engine/blob/master/examples/panoc_ex1.rs)
-- [`panoc_ex2.rs`](https://github.com/alphaville/optimization-engine/blob/master/examples/panoc_ex2.rs)
+- [`panoc_ex1.rs`](https://github.com/alphaville/optimization-engine/blob/master/rust/examples/panoc_ex1.rs)
+- [`panoc_ex2.rs`](https://github.com/alphaville/optimization-engine/blob/master/rust/examples/panoc_ex2.rs)
diff --git a/docs/openrust-features.mdx b/docs/content/openrust-features.mdx
similarity index 100%
rename from docs/openrust-features.mdx
rename to docs/content/openrust-features.mdx
diff --git a/docs/python-advanced.mdx b/docs/content/python-advanced.mdx
similarity index 99%
rename from docs/python-advanced.mdx
rename to docs/content/python-advanced.mdx
index a9b5a8fa..0eb6dc5b 100644
--- a/docs/python-advanced.mdx
+++ b/docs/content/python-advanced.mdx
@@ -200,7 +200,7 @@ All build options are shown below
| `with_target_system` | Target system (to be used when you need to cross-compile) |
| `with_build_c_bindings` | Enalbe generation of C/C++ bindings |
| `with_rebuild` | Whether to do a clean build |
-| `with_open_version` | Use a certain version of OpEn (see [all versions]), e.g., `with_open_version("0.6.0")`, or a local version of OpEn (this is useful when you want to download the latest version of OpEn from github). You can do so using `with_open_version(local_path="/path/to/open/")`. |
+| `with_open_version` | Use a certain version of OpEn (see [all versions]), e.g., `with_open_version("0.6.0")`, or a local version of OpEn (this is useful when you want to download the latest version of OpEn from github). You can do so using `with_open_version(local_path="/path/to/open/rust")`. |
|`with_allocator` | Available in `opengen >= 0.6.6`. Compile with a different memory allocator. The available allocators are the entries of `RustAllocator`. OpEn currently supports [Jemalloc](https://github.com/gnzlbg/jemallocator) and [Rpmalloc](https://github.com/EmbarkStudios/rpmalloc-rs).|
[all versions]: https://crates.io/crates/optimization_engine/versions
diff --git a/docs/python-bindings.md b/docs/content/python-bindings.md
similarity index 100%
rename from docs/python-bindings.md
rename to docs/content/python-bindings.md
diff --git a/docs/python-c.mdx b/docs/content/python-c.mdx
similarity index 100%
rename from docs/python-c.mdx
rename to docs/content/python-c.mdx
diff --git a/docs/python-examples.md b/docs/content/python-examples.md
similarity index 100%
rename from docs/python-examples.md
rename to docs/content/python-examples.md
diff --git a/docs/python-interface.md b/docs/content/python-interface.md
similarity index 100%
rename from docs/python-interface.md
rename to docs/content/python-interface.md
diff --git a/docs/python-ocp-1.mdx b/docs/content/python-ocp-1.mdx
similarity index 100%
rename from docs/python-ocp-1.mdx
rename to docs/content/python-ocp-1.mdx
diff --git a/docs/python-ocp-2.md b/docs/content/python-ocp-2.md
similarity index 100%
rename from docs/python-ocp-2.md
rename to docs/content/python-ocp-2.md
diff --git a/docs/python-ocp-3.md b/docs/content/python-ocp-3.md
similarity index 100%
rename from docs/python-ocp-3.md
rename to docs/content/python-ocp-3.md
diff --git a/docs/python-ocp-4.md b/docs/content/python-ocp-4.md
similarity index 100%
rename from docs/python-ocp-4.md
rename to docs/content/python-ocp-4.md
diff --git a/docs/python-ros.md b/docs/content/python-ros.md
similarity index 100%
rename from docs/python-ros.md
rename to docs/content/python-ros.md
diff --git a/docs/python-ros2.mdx b/docs/content/python-ros2.mdx
similarity index 100%
rename from docs/python-ros2.mdx
rename to docs/content/python-ros2.mdx
diff --git a/docs/python-tcp-ip.md b/docs/content/python-tcp-ip.md
similarity index 100%
rename from docs/python-tcp-ip.md
rename to docs/content/python-tcp-ip.md
diff --git a/docs/udp-sockets.md b/docs/content/udp-sockets.md
similarity index 100%
rename from docs/udp-sockets.md
rename to docs/content/udp-sockets.md
diff --git a/sphinx-dox/Makefile b/docs/sphinx/Makefile
similarity index 100%
rename from sphinx-dox/Makefile
rename to docs/sphinx/Makefile
diff --git a/sphinx-dox/make.bat b/docs/sphinx/make.bat
similarity index 100%
rename from sphinx-dox/make.bat
rename to docs/sphinx/make.bat
diff --git a/sphinx-dox/source/conf.py b/docs/sphinx/source/conf.py
similarity index 94%
rename from sphinx-dox/source/conf.py
rename to docs/sphinx/source/conf.py
index 44ff04d7..f580a304 100644
--- a/sphinx-dox/source/conf.py
+++ b/docs/sphinx/source/conf.py
@@ -5,7 +5,7 @@
import os
import sys
-sys.path.insert(0, os.path.abspath("../../open-codegen/opengen"))
+sys.path.insert(0, os.path.abspath("../../../python/opengen"))
def skip(app, what, name, obj, would_skip, options):
diff --git a/sphinx-dox/source/index.rst b/docs/sphinx/source/index.rst
similarity index 100%
rename from sphinx-dox/source/index.rst
rename to docs/sphinx/source/index.rst
diff --git a/docs/website/README.md b/docs/website/README.md
new file mode 100644
index 00000000..4357f6ca
--- /dev/null
+++ b/docs/website/README.md
@@ -0,0 +1,59 @@
+This website now uses Docusaurus v3.
+
+# Development
+
+Install dependencies:
+
+```sh
+yarn
+```
+
+Start the local dev server:
+
+```sh
+yarn start
+```
+
+Build the production site:
+
+```sh
+yarn build
+```
+
+Preview the production build locally:
+
+```sh
+yarn serve
+```
+
+Deploy to GitHub Pages:
+
+```sh
+yarn deploy
+```
+
+# Project Layout
+
+```
+optimization-engine/
+ docs/
+ content/ # documentation markdown files
+ sphinx/ # Sphinx API docs
+ website/
+ blog/ # blog posts
+ src/
+ css/
+ pages/
+ static/
+ img/
+ js/
+ docusaurus.config.js
+ sidebars.js
+ package.json
+```
+
+# Notes
+
+- The docs content lives under `/docs/content`.
+- Legacy inline MathJax and widget scripts are stripped at build time, and equivalent site-wide support is loaded from `docs/website/static/js`.
+- Sidebar ordering now lives in `docs/website/sidebars.js`.
diff --git a/website/blog/2019-02-28-new-version.md b/docs/website/blog/2019-02-28-new-version.md
similarity index 100%
rename from website/blog/2019-02-28-new-version.md
rename to docs/website/blog/2019-02-28-new-version.md
diff --git a/website/blog/2019-03-01-blog.md b/docs/website/blog/2019-03-01-blog.md
similarity index 100%
rename from website/blog/2019-03-01-blog.md
rename to docs/website/blog/2019-03-01-blog.md
diff --git a/website/blog/2019-03-02-superscs.md b/docs/website/blog/2019-03-02-superscs.md
similarity index 100%
rename from website/blog/2019-03-02-superscs.md
rename to docs/website/blog/2019-03-02-superscs.md
diff --git a/website/blog/2019-03-03-risk-averse.md b/docs/website/blog/2019-03-03-risk-averse.md
similarity index 100%
rename from website/blog/2019-03-03-risk-averse.md
rename to docs/website/blog/2019-03-03-risk-averse.md
diff --git a/website/blog/2019-03-05-matlab-raspberry.md b/docs/website/blog/2019-03-05-matlab-raspberry.md
similarity index 100%
rename from website/blog/2019-03-05-matlab-raspberry.md
rename to docs/website/blog/2019-03-05-matlab-raspberry.md
diff --git a/website/blog/2019-03-05-udp-sockets.md b/docs/website/blog/2019-03-05-udp-sockets.md
similarity index 100%
rename from website/blog/2019-03-05-udp-sockets.md
rename to docs/website/blog/2019-03-05-udp-sockets.md
diff --git a/website/blog/2019-03-06-talk-to-us.md b/docs/website/blog/2019-03-06-talk-to-us.md
similarity index 100%
rename from website/blog/2019-03-06-talk-to-us.md
rename to docs/website/blog/2019-03-06-talk-to-us.md
diff --git a/website/blog/2019-03-15-pure-rust-optimization.md b/docs/website/blog/2019-03-15-pure-rust-optimization.md
similarity index 100%
rename from website/blog/2019-03-15-pure-rust-optimization.md
rename to docs/website/blog/2019-03-15-pure-rust-optimization.md
diff --git a/website/blog/2019-03-19-rust-robotics.md b/docs/website/blog/2019-03-19-rust-robotics.md
similarity index 100%
rename from website/blog/2019-03-19-rust-robotics.md
rename to docs/website/blog/2019-03-19-rust-robotics.md
diff --git a/website/blog/2019-03-21-fast-udp-connection.md b/docs/website/blog/2019-03-21-fast-udp-connection.md
similarity index 100%
rename from website/blog/2019-03-21-fast-udp-connection.md
rename to docs/website/blog/2019-03-21-fast-udp-connection.md
diff --git a/website/blog/2022-07-30-blog.md b/docs/website/blog/2022-07-30-blog.md
similarity index 100%
rename from website/blog/2022-07-30-blog.md
rename to docs/website/blog/2022-07-30-blog.md
diff --git a/website/blog/2026-03-21-python-ocp-module.md b/docs/website/blog/2026-03-21-python-ocp-module.md
similarity index 100%
rename from website/blog/2026-03-21-python-ocp-module.md
rename to docs/website/blog/2026-03-21-python-ocp-module.md
diff --git a/docs/website/blog/2026-03-28-open-0-12-0.md b/docs/website/blog/2026-03-28-open-0-12-0.md
new file mode 100644
index 00000000..c8d8d0e5
--- /dev/null
+++ b/docs/website/blog/2026-03-28-open-0-12-0.md
@@ -0,0 +1,41 @@
+---
+title: Announcing OpEn 0.12.0 for Rust
+author: Pantelis Sopasakis
+authorURL: https://github.com/alphaville
+authorImageURL: https://avatars.githubusercontent.com/u/125415?v=4
+---
+
+OpEn 0.12.0 brings important updates to the core Rust library.
+The key changes are:
+
+- Support for both `f32` and `f64` ([docs](/optimization-engine/docs/openrust-arithmetic))
+- Better error handling and reporting
+- Using [web-time](https://crates.io/crates/web-time) which works in browsers
+
+
+
+## Highlights
+
+### Support for both `f32` and `f64`
+
+The Rust solver now supports generic floating-point types, so you can work with either `f32` or `f64` depending on your target platform and performance needs.
+
+This is particularly useful for embedded and resource-constrained systems, where `f32` can be a better fit, while `f64` remains available for applications that need higher precision.
+
+### Replaced `instant` and wasm with `web-time`
+
+The timing layer has been simplified by switching to `web-time`.
+
+This replaces the previous `instant` setup and the extra wasm-specific feature wiring around it, making timing support cleaner and more portable across native and web-oriented targets.
+
+### Better error handling
+
+Error reporting in the Rust library has been significantly improved.
+
+Projection failures, invalid numerical states, linear algebra failures, and other internal solver issues now surface as richer Rust-side errors with clearer, human-readable explanations. Constraint projections are also fallible now, which means these failures can propagate through FBS, PANOC, and ALM instead of being silently flattened into harder-to-debug behavior.
+
+## See also
+
+- [Rust documentation](/optimization-engine/docs/openrust-basic)
+- [Rust features](/optimization-engine/docs/openrust-features)
+- [Project repository](https://github.com/alphaville/optimization-engine)
diff --git a/website/docusaurus.config.js b/docs/website/docusaurus.config.js
similarity index 99%
rename from website/docusaurus.config.js
rename to docs/website/docusaurus.config.js
index 99628988..59e6f016 100644
--- a/website/docusaurus.config.js
+++ b/docs/website/docusaurus.config.js
@@ -54,7 +54,7 @@ module.exports = {
'classic',
{
docs: {
- path: '../docs',
+ path: '../content',
routeBasePath: 'docs',
sidebarPath: require.resolve('./sidebars.js'),
},
diff --git a/website/package.json b/docs/website/package.json
similarity index 100%
rename from website/package.json
rename to docs/website/package.json
diff --git a/website/publish.sh b/docs/website/publish.sh
similarity index 100%
rename from website/publish.sh
rename to docs/website/publish.sh
diff --git a/website/sidebars.js b/docs/website/sidebars.js
similarity index 93%
rename from website/sidebars.js
rename to docs/website/sidebars.js
index a407782f..0608b097 100644
--- a/website/sidebars.js
+++ b/docs/website/sidebars.js
@@ -32,7 +32,7 @@ module.exports = {
{
type: 'category',
label: 'MATLAB',
- items: ['matlab-interface', 'matlab-examples'],
+ items: ['matlab-api', 'matlab-interface', 'matlab-examples'],
},
{
type: 'category',
diff --git a/website/src/css/custom.css b/docs/website/src/css/custom.css
similarity index 100%
rename from website/src/css/custom.css
rename to docs/website/src/css/custom.css
diff --git a/website/src/pages/help.js b/docs/website/src/pages/help.js
similarity index 100%
rename from website/src/pages/help.js
rename to docs/website/src/pages/help.js
diff --git a/website/src/pages/index.js b/docs/website/src/pages/index.js
similarity index 100%
rename from website/src/pages/index.js
rename to docs/website/src/pages/index.js
diff --git a/website/src/pages/users.js b/docs/website/src/pages/users.js
similarity index 100%
rename from website/src/pages/users.js
rename to docs/website/src/pages/users.js
diff --git a/website/src/theme/prism-include-languages.js b/docs/website/src/theme/prism-include-languages.js
similarity index 100%
rename from website/src/theme/prism-include-languages.js
rename to docs/website/src/theme/prism-include-languages.js
diff --git a/website/static/css/codeblock.css b/docs/website/static/css/codeblock.css
similarity index 100%
rename from website/static/css/codeblock.css
rename to docs/website/static/css/codeblock.css
diff --git a/website/static/css/custom.css b/docs/website/static/css/custom.css
similarity index 100%
rename from website/static/css/custom.css
rename to docs/website/static/css/custom.css
diff --git a/website/static/img/115ba54c2ad0.gif b/docs/website/static/img/115ba54c2ad0.gif
similarity index 100%
rename from website/static/img/115ba54c2ad0.gif
rename to docs/website/static/img/115ba54c2ad0.gif
diff --git a/website/static/img/6f6ea4f8d194.gif b/docs/website/static/img/6f6ea4f8d194.gif
similarity index 100%
rename from website/static/img/6f6ea4f8d194.gif
rename to docs/website/static/img/6f6ea4f8d194.gif
diff --git a/website/static/img/about-open.png b/docs/website/static/img/about-open.png
similarity index 100%
rename from website/static/img/about-open.png
rename to docs/website/static/img/about-open.png
diff --git a/website/static/img/bnp.png b/docs/website/static/img/bnp.png
similarity index 100%
rename from website/static/img/bnp.png
rename to docs/website/static/img/bnp.png
diff --git a/website/static/img/bnp_1.png b/docs/website/static/img/bnp_1.png
similarity index 100%
rename from website/static/img/bnp_1.png
rename to docs/website/static/img/bnp_1.png
diff --git a/website/static/img/bnp_2.png b/docs/website/static/img/bnp_2.png
similarity index 100%
rename from website/static/img/bnp_2.png
rename to docs/website/static/img/bnp_2.png
diff --git a/website/static/img/bnp_3.png b/docs/website/static/img/bnp_3.png
similarity index 100%
rename from website/static/img/bnp_3.png
rename to docs/website/static/img/bnp_3.png
diff --git a/website/static/img/bnp_4.png b/docs/website/static/img/bnp_4.png
similarity index 100%
rename from website/static/img/bnp_4.png
rename to docs/website/static/img/bnp_4.png
diff --git a/website/static/img/bnp_5.png b/docs/website/static/img/bnp_5.png
similarity index 100%
rename from website/static/img/bnp_5.png
rename to docs/website/static/img/bnp_5.png
diff --git a/website/static/img/bnp_6.png b/docs/website/static/img/bnp_6.png
similarity index 100%
rename from website/static/img/bnp_6.png
rename to docs/website/static/img/bnp_6.png
diff --git a/website/static/img/box.png b/docs/website/static/img/box.png
similarity index 100%
rename from website/static/img/box.png
rename to docs/website/static/img/box.png
diff --git a/website/static/img/bullseye.svg b/docs/website/static/img/bullseye.svg
similarity index 100%
rename from website/static/img/bullseye.svg
rename to docs/website/static/img/bullseye.svg
diff --git a/website/static/img/cart_schematic.jpg b/docs/website/static/img/cart_schematic.jpg
similarity index 100%
rename from website/static/img/cart_schematic.jpg
rename to docs/website/static/img/cart_schematic.jpg
diff --git a/website/static/img/chat.jpeg b/docs/website/static/img/chat.jpeg
similarity index 100%
rename from website/static/img/chat.jpeg
rename to docs/website/static/img/chat.jpeg
diff --git a/website/static/img/docker.gif b/docs/website/static/img/docker.gif
similarity index 100%
rename from website/static/img/docker.gif
rename to docs/website/static/img/docker.gif
diff --git a/website/static/img/e8f236af8d38.gif b/docs/website/static/img/e8f236af8d38.gif
similarity index 100%
rename from website/static/img/e8f236af8d38.gif
rename to docs/website/static/img/e8f236af8d38.gif
diff --git a/website/static/img/edge_intelligence.png b/docs/website/static/img/edge_intelligence.png
similarity index 100%
rename from website/static/img/edge_intelligence.png
rename to docs/website/static/img/edge_intelligence.png
diff --git a/website/static/img/examples_almpm.jpg b/docs/website/static/img/examples_almpm.jpg
similarity index 100%
rename from website/static/img/examples_almpm.jpg
rename to docs/website/static/img/examples_almpm.jpg
diff --git a/website/static/img/examples_bnp_nmpc.jpg b/docs/website/static/img/examples_bnp_nmpc.jpg
similarity index 100%
rename from website/static/img/examples_bnp_nmpc.jpg
rename to docs/website/static/img/examples_bnp_nmpc.jpg
diff --git a/website/static/img/examples_estimation_chaotic.jpg b/docs/website/static/img/examples_estimation_chaotic.jpg
similarity index 100%
rename from website/static/img/examples_estimation_chaotic.jpg
rename to docs/website/static/img/examples_estimation_chaotic.jpg
diff --git a/website/static/img/examples_invpend.jpg b/docs/website/static/img/examples_invpend.jpg
similarity index 100%
rename from website/static/img/examples_invpend.jpg
rename to docs/website/static/img/examples_invpend.jpg
diff --git a/website/static/img/examples_navigation_gvehicle.jpg b/docs/website/static/img/examples_navigation_gvehicle.jpg
similarity index 100%
rename from website/static/img/examples_navigation_gvehicle.jpg
rename to docs/website/static/img/examples_navigation_gvehicle.jpg
diff --git a/website/static/img/examples_rosenbrock.jpg b/docs/website/static/img/examples_rosenbrock.jpg
similarity index 100%
rename from website/static/img/examples_rosenbrock.jpg
rename to docs/website/static/img/examples_rosenbrock.jpg
diff --git a/website/static/img/examples_tanks.jpg b/docs/website/static/img/examples_tanks.jpg
similarity index 100%
rename from website/static/img/examples_tanks.jpg
rename to docs/website/static/img/examples_tanks.jpg
diff --git a/website/static/img/external-link-square-alt-solid.svg b/docs/website/static/img/external-link-square-alt-solid.svg
similarity index 100%
rename from website/static/img/external-link-square-alt-solid.svg
rename to docs/website/static/img/external-link-square-alt-solid.svg
diff --git a/website/static/img/f1-10-main-car_orig.png b/docs/website/static/img/f1-10-main-car_orig.png
similarity index 100%
rename from website/static/img/f1-10-main-car_orig.png
rename to docs/website/static/img/f1-10-main-car_orig.png
diff --git a/website/static/img/favicon.png b/docs/website/static/img/favicon.png
similarity index 100%
rename from website/static/img/favicon.png
rename to docs/website/static/img/favicon.png
diff --git a/website/static/img/fbe.png b/docs/website/static/img/fbe.png
similarity index 100%
rename from website/static/img/fbe.png
rename to docs/website/static/img/fbe.png
diff --git a/website/static/img/happy.png b/docs/website/static/img/happy.png
similarity index 100%
rename from website/static/img/happy.png
rename to docs/website/static/img/happy.png
diff --git a/website/static/img/hsk.png b/docs/website/static/img/hsk.png
similarity index 100%
rename from website/static/img/hsk.png
rename to docs/website/static/img/hsk.png
diff --git a/website/static/img/husky.jpg b/docs/website/static/img/husky.jpg
similarity index 100%
rename from website/static/img/husky.jpg
rename to docs/website/static/img/husky.jpg
diff --git a/website/static/img/husky_video.mp4 b/docs/website/static/img/husky_video.mp4
similarity index 100%
rename from website/static/img/husky_video.mp4
rename to docs/website/static/img/husky_video.mp4
diff --git a/website/static/img/i_tanks.png b/docs/website/static/img/i_tanks.png
similarity index 100%
rename from website/static/img/i_tanks.png
rename to docs/website/static/img/i_tanks.png
diff --git a/website/static/img/invpend_1.png b/docs/website/static/img/invpend_1.png
similarity index 100%
rename from website/static/img/invpend_1.png
rename to docs/website/static/img/invpend_1.png
diff --git a/website/static/img/invpend_2.png b/docs/website/static/img/invpend_2.png
similarity index 100%
rename from website/static/img/invpend_2.png
rename to docs/website/static/img/invpend_2.png
diff --git a/website/static/img/lv-oc-sol-2.jpg b/docs/website/static/img/lv-oc-sol-2.jpg
similarity index 100%
rename from website/static/img/lv-oc-sol-2.jpg
rename to docs/website/static/img/lv-oc-sol-2.jpg
diff --git a/website/static/img/lv-oc-sol.jpg b/docs/website/static/img/lv-oc-sol.jpg
similarity index 100%
rename from website/static/img/lv-oc-sol.jpg
rename to docs/website/static/img/lv-oc-sol.jpg
diff --git a/website/static/img/matlab_logo.png b/docs/website/static/img/matlab_logo.png
similarity index 100%
rename from website/static/img/matlab_logo.png
rename to docs/website/static/img/matlab_logo.png
diff --git a/website/static/img/mav.png b/docs/website/static/img/mav.png
similarity index 100%
rename from website/static/img/mav.png
rename to docs/website/static/img/mav.png
diff --git a/website/static/img/mhe.png b/docs/website/static/img/mhe.png
similarity index 100%
rename from website/static/img/mhe.png
rename to docs/website/static/img/mhe.png
diff --git a/website/static/img/microchip.svg b/docs/website/static/img/microchip.svg
similarity index 100%
rename from website/static/img/microchip.svg
rename to docs/website/static/img/microchip.svg
diff --git a/website/static/img/mpc56.png b/docs/website/static/img/mpc56.png
similarity index 100%
rename from website/static/img/mpc56.png
rename to docs/website/static/img/mpc56.png
diff --git a/website/static/img/nav-oc-sol-refs.jpg b/docs/website/static/img/nav-oc-sol-refs.jpg
similarity index 100%
rename from website/static/img/nav-oc-sol-refs.jpg
rename to docs/website/static/img/nav-oc-sol-refs.jpg
diff --git a/website/static/img/nav-oc-sol-theta.jpg b/docs/website/static/img/nav-oc-sol-theta.jpg
similarity index 100%
rename from website/static/img/nav-oc-sol-theta.jpg
rename to docs/website/static/img/nav-oc-sol-theta.jpg
diff --git a/website/static/img/nav-oc-sol-xy-obst.jpg b/docs/website/static/img/nav-oc-sol-xy-obst.jpg
similarity index 100%
rename from website/static/img/nav-oc-sol-xy-obst.jpg
rename to docs/website/static/img/nav-oc-sol-xy-obst.jpg
diff --git a/website/static/img/nav-oc-sol-xy.jpg b/docs/website/static/img/nav-oc-sol-xy.jpg
similarity index 100%
rename from website/static/img/nav-oc-sol-xy.jpg
rename to docs/website/static/img/nav-oc-sol-xy.jpg
diff --git a/website/static/img/nav-oc-sol-xyt.jpg b/docs/website/static/img/nav-oc-sol-xyt.jpg
similarity index 100%
rename from website/static/img/nav-oc-sol-xyt.jpg
rename to docs/website/static/img/nav-oc-sol-xyt.jpg
diff --git a/website/static/img/obstructed_navigation_trajectories_python.png b/docs/website/static/img/obstructed_navigation_trajectories_python.png
similarity index 100%
rename from website/static/img/obstructed_navigation_trajectories_python.png
rename to docs/website/static/img/obstructed_navigation_trajectories_python.png
diff --git a/website/static/img/ocp-inputs.png b/docs/website/static/img/ocp-inputs.png
similarity index 100%
rename from website/static/img/ocp-inputs.png
rename to docs/website/static/img/ocp-inputs.png
diff --git a/website/static/img/ocp-states.png b/docs/website/static/img/ocp-states.png
similarity index 100%
rename from website/static/img/ocp-states.png
rename to docs/website/static/img/ocp-states.png
diff --git a/website/static/img/open-functionality.jpg b/docs/website/static/img/open-functionality.jpg
similarity index 100%
rename from website/static/img/open-functionality.jpg
rename to docs/website/static/img/open-functionality.jpg
diff --git a/website/static/img/open-promo.gif b/docs/website/static/img/open-promo.gif
similarity index 100%
rename from website/static/img/open-promo.gif
rename to docs/website/static/img/open-promo.gif
diff --git a/website/static/img/open.png b/docs/website/static/img/open.png
similarity index 100%
rename from website/static/img/open.png
rename to docs/website/static/img/open.png
diff --git a/website/static/img/openbenchmark.png b/docs/website/static/img/openbenchmark.png
similarity index 100%
rename from website/static/img/openbenchmark.png
rename to docs/website/static/img/openbenchmark.png
diff --git a/website/static/img/python-iface-workflow.jpg b/docs/website/static/img/python-iface-workflow.jpg
similarity index 100%
rename from website/static/img/python-iface-workflow.jpg
rename to docs/website/static/img/python-iface-workflow.jpg
diff --git a/website/static/img/python-interfaces.jpg b/docs/website/static/img/python-interfaces.jpg
similarity index 100%
rename from website/static/img/python-interfaces.jpg
rename to docs/website/static/img/python-interfaces.jpg
diff --git a/website/static/img/python_estimation.png b/docs/website/static/img/python_estimation.png
similarity index 100%
rename from website/static/img/python_estimation.png
rename to docs/website/static/img/python_estimation.png
diff --git a/website/static/img/python_estimation_data.png b/docs/website/static/img/python_estimation_data.png
similarity index 100%
rename from website/static/img/python_estimation_data.png
rename to docs/website/static/img/python_estimation_data.png
diff --git a/website/static/img/rocket.svg b/docs/website/static/img/rocket.svg
similarity index 100%
rename from website/static/img/rocket.svg
rename to docs/website/static/img/rocket.svg
diff --git a/website/static/img/ros2-robot.png b/docs/website/static/img/ros2-robot.png
similarity index 100%
rename from website/static/img/ros2-robot.png
rename to docs/website/static/img/ros2-robot.png
diff --git a/website/static/img/rpi.jpeg b/docs/website/static/img/rpi.jpeg
similarity index 100%
rename from website/static/img/rpi.jpeg
rename to docs/website/static/img/rpi.jpeg
diff --git a/website/static/img/rust1.jpeg b/docs/website/static/img/rust1.jpeg
similarity index 100%
rename from website/static/img/rust1.jpeg
rename to docs/website/static/img/rust1.jpeg
diff --git a/website/static/img/rustybot.jpeg b/docs/website/static/img/rustybot.jpeg
similarity index 100%
rename from website/static/img/rustybot.jpeg
rename to docs/website/static/img/rustybot.jpeg
diff --git a/website/static/img/saturn.png b/docs/website/static/img/saturn.png
similarity index 100%
rename from website/static/img/saturn.png
rename to docs/website/static/img/saturn.png
diff --git a/website/static/img/tanks_1.png b/docs/website/static/img/tanks_1.png
similarity index 100%
rename from website/static/img/tanks_1.png
rename to docs/website/static/img/tanks_1.png
diff --git a/website/static/img/tanks_2.png b/docs/website/static/img/tanks_2.png
similarity index 100%
rename from website/static/img/tanks_2.png
rename to docs/website/static/img/tanks_2.png
diff --git a/website/static/img/track.gif b/docs/website/static/img/track.gif
similarity index 100%
rename from website/static/img/track.gif
rename to docs/website/static/img/track.gif
diff --git a/website/static/img/udp_socket.png b/docs/website/static/img/udp_socket.png
similarity index 100%
rename from website/static/img/udp_socket.png
rename to docs/website/static/img/udp_socket.png
diff --git a/website/static/img/unobstructed_navigation_python.png b/docs/website/static/img/unobstructed_navigation_python.png
similarity index 100%
rename from website/static/img/unobstructed_navigation_python.png
rename to docs/website/static/img/unobstructed_navigation_python.png
diff --git a/website/static/img/unobstructed_navigation_trajectories_python.png b/docs/website/static/img/unobstructed_navigation_trajectories_python.png
similarity index 100%
rename from website/static/img/unobstructed_navigation_trajectories_python.png
rename to docs/website/static/img/unobstructed_navigation_trajectories_python.png
diff --git a/website/static/js/legacy-docs.js b/docs/website/static/js/legacy-docs.js
similarity index 100%
rename from website/static/js/legacy-docs.js
rename to docs/website/static/js/legacy-docs.js
diff --git a/website/static/js/mathjax-config.js b/docs/website/static/js/mathjax-config.js
similarity index 100%
rename from website/static/js/mathjax-config.js
rename to docs/website/static/js/mathjax-config.js
diff --git a/matlab/README.md b/matlab/README.md
index 5a5ae63d..29b20d66 100644
--- a/matlab/README.md
+++ b/matlab/README.md
@@ -106,7 +106,7 @@ optimizer directory, the client can infer the TCP endpoint automatically:
```matlab
manifestPath = fullfile( ...
pwd, ...
- 'open-codegen', ...
+ 'python', ...
'.python_test_build_ocp', ...
'ocp_single_tcp', ...
'optimizer_manifest.json');
@@ -124,7 +124,7 @@ client = OpEnTcpOptimizer(3391, 'ManifestPath', manifestPath);
### Solve a single-shooting OCP optimizer
The following example matches the OCP manifest in
-`open-codegen/.python_test_build_ocp/ocp_single_tcp`:
+`python/.python_test_build_ocp/ocp_single_tcp`:
```matlab
response = client.solve( ...
@@ -146,7 +146,7 @@ provide the required ones:
```matlab
manifestPath = fullfile( ...
pwd, ...
- 'open-codegen', ...
+ 'python', ...
'.python_test_build_ocp', ...
'ocp_manifest_bindings', ...
'optimizer_manifest.json');
@@ -163,7 +163,7 @@ trajectory reconstructed from the manifest slices:
```matlab
manifestPath = fullfile( ...
pwd, ...
- 'open-codegen', ...
+ 'python', ...
'.python_test_build_ocp', ...
'ocp_multiple_tcp', ...
'optimizer_manifest.json');
diff --git a/open-codegen/.gitignore b/open-codegen/.gitignore
deleted file mode 100644
index 104b7eb7..00000000
--- a/open-codegen/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-__pycache__
-venv
-.idea
-*.pyc
-build
-dist
-x4356
-TOKEN
\ No newline at end of file
diff --git a/python/.gitignore b/python/.gitignore
new file mode 100644
index 00000000..7202b60e
--- /dev/null
+++ b/python/.gitignore
@@ -0,0 +1,18 @@
+.eggs/
+__pycache__/
+*.pyc
+*.egg-info
+
+.pytest_cache/
+.python_test_build/
+.python_test_build_ocp/
+
+build/
+dist/
+htmlcov/
+my_optimizers/
+opengen.egg-info/
+opengen/icasadi/extern/Makefile
+run/
+venv*/
+virt/
diff --git a/open-codegen/CHANGELOG.md b/python/CHANGELOG.md
similarity index 100%
rename from open-codegen/CHANGELOG.md
rename to python/CHANGELOG.md
diff --git a/open-codegen/MANIFEST.in b/python/MANIFEST.in
similarity index 100%
rename from open-codegen/MANIFEST.in
rename to python/MANIFEST.in
diff --git a/open-codegen/README.md b/python/README.md
similarity index 100%
rename from open-codegen/README.md
rename to python/README.md
diff --git a/open-codegen/VERSION b/python/VERSION
similarity index 100%
rename from open-codegen/VERSION
rename to python/VERSION
diff --git a/open-codegen/main.py b/python/main.py
similarity index 94%
rename from open-codegen/main.py
rename to python/main.py
index 57ee5c6a..80b35633 100644
--- a/open-codegen/main.py
+++ b/python/main.py
@@ -9,8 +9,7 @@
def get_open_local_absolute_path():
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "rust"))
nu, np = 5, 2
@@ -67,4 +66,4 @@ def get_open_local_absolute_path():
# Solutions:
#
# [-0.06168156776090604, 0.10745271293967644, 0.11363970229300129, 0.013666212246169969, 0.00018549750799884656]
-# [-0.06168061635750967, 0.10744096043712821, 0.11361445307465148, 0.013640838407880301, 0.00019045750968868237]
\ No newline at end of file
+# [-0.06168061635750967, 0.10744096043712821, 0.11361445307465148, 0.013640838407880301, 0.00019045750968868237]
diff --git a/open-codegen/opengen/__init__.py b/python/opengen/__init__.py
similarity index 100%
rename from open-codegen/opengen/__init__.py
rename to python/opengen/__init__.py
diff --git a/open-codegen/opengen/builder/__init__.py b/python/opengen/builder/__init__.py
similarity index 100%
rename from open-codegen/opengen/builder/__init__.py
rename to python/opengen/builder/__init__.py
diff --git a/open-codegen/opengen/builder/optimizer_builder.py b/python/opengen/builder/optimizer_builder.py
similarity index 100%
rename from open-codegen/opengen/builder/optimizer_builder.py
rename to python/opengen/builder/optimizer_builder.py
diff --git a/open-codegen/opengen/builder/problem.py b/python/opengen/builder/problem.py
similarity index 100%
rename from open-codegen/opengen/builder/problem.py
rename to python/opengen/builder/problem.py
diff --git a/open-codegen/opengen/builder/ros_builder.py b/python/opengen/builder/ros_builder.py
similarity index 100%
rename from open-codegen/opengen/builder/ros_builder.py
rename to python/opengen/builder/ros_builder.py
diff --git a/open-codegen/opengen/builder/set_y_calculator.py b/python/opengen/builder/set_y_calculator.py
similarity index 100%
rename from open-codegen/opengen/builder/set_y_calculator.py
rename to python/opengen/builder/set_y_calculator.py
diff --git a/open-codegen/opengen/config/__init__.py b/python/opengen/config/__init__.py
similarity index 100%
rename from open-codegen/opengen/config/__init__.py
rename to python/opengen/config/__init__.py
diff --git a/open-codegen/opengen/config/build_config.py b/python/opengen/config/build_config.py
similarity index 100%
rename from open-codegen/opengen/config/build_config.py
rename to python/opengen/config/build_config.py
diff --git a/open-codegen/opengen/config/meta.py b/python/opengen/config/meta.py
similarity index 100%
rename from open-codegen/opengen/config/meta.py
rename to python/opengen/config/meta.py
diff --git a/open-codegen/opengen/config/ros_config.py b/python/opengen/config/ros_config.py
similarity index 100%
rename from open-codegen/opengen/config/ros_config.py
rename to python/opengen/config/ros_config.py
diff --git a/open-codegen/opengen/config/solver_config.py b/python/opengen/config/solver_config.py
similarity index 100%
rename from open-codegen/opengen/config/solver_config.py
rename to python/opengen/config/solver_config.py
diff --git a/open-codegen/opengen/config/tcp_server_config.py b/python/opengen/config/tcp_server_config.py
similarity index 100%
rename from open-codegen/opengen/config/tcp_server_config.py
rename to python/opengen/config/tcp_server_config.py
diff --git a/open-codegen/opengen/constraints/__init__.py b/python/opengen/constraints/__init__.py
similarity index 100%
rename from open-codegen/opengen/constraints/__init__.py
rename to python/opengen/constraints/__init__.py
diff --git a/open-codegen/opengen/constraints/affine_space.py b/python/opengen/constraints/affine_space.py
similarity index 100%
rename from open-codegen/opengen/constraints/affine_space.py
rename to python/opengen/constraints/affine_space.py
diff --git a/open-codegen/opengen/constraints/ball1.py b/python/opengen/constraints/ball1.py
similarity index 100%
rename from open-codegen/opengen/constraints/ball1.py
rename to python/opengen/constraints/ball1.py
diff --git a/open-codegen/opengen/constraints/ball2.py b/python/opengen/constraints/ball2.py
similarity index 100%
rename from open-codegen/opengen/constraints/ball2.py
rename to python/opengen/constraints/ball2.py
diff --git a/open-codegen/opengen/constraints/ball_inf.py b/python/opengen/constraints/ball_inf.py
similarity index 100%
rename from open-codegen/opengen/constraints/ball_inf.py
rename to python/opengen/constraints/ball_inf.py
diff --git a/open-codegen/opengen/constraints/cartesian.py b/python/opengen/constraints/cartesian.py
similarity index 100%
rename from open-codegen/opengen/constraints/cartesian.py
rename to python/opengen/constraints/cartesian.py
diff --git a/open-codegen/opengen/constraints/constraint.py b/python/opengen/constraints/constraint.py
similarity index 100%
rename from open-codegen/opengen/constraints/constraint.py
rename to python/opengen/constraints/constraint.py
diff --git a/open-codegen/opengen/constraints/finite_set.py b/python/opengen/constraints/finite_set.py
similarity index 100%
rename from open-codegen/opengen/constraints/finite_set.py
rename to python/opengen/constraints/finite_set.py
diff --git a/open-codegen/opengen/constraints/halfspace.py b/python/opengen/constraints/halfspace.py
similarity index 100%
rename from open-codegen/opengen/constraints/halfspace.py
rename to python/opengen/constraints/halfspace.py
diff --git a/open-codegen/opengen/constraints/no_constraints.py b/python/opengen/constraints/no_constraints.py
similarity index 100%
rename from open-codegen/opengen/constraints/no_constraints.py
rename to python/opengen/constraints/no_constraints.py
diff --git a/open-codegen/opengen/constraints/rectangle.py b/python/opengen/constraints/rectangle.py
similarity index 100%
rename from open-codegen/opengen/constraints/rectangle.py
rename to python/opengen/constraints/rectangle.py
diff --git a/open-codegen/opengen/constraints/simplex.py b/python/opengen/constraints/simplex.py
similarity index 100%
rename from open-codegen/opengen/constraints/simplex.py
rename to python/opengen/constraints/simplex.py
diff --git a/open-codegen/opengen/constraints/soc.py b/python/opengen/constraints/soc.py
similarity index 100%
rename from open-codegen/opengen/constraints/soc.py
rename to python/opengen/constraints/soc.py
diff --git a/open-codegen/opengen/constraints/sphere2.py b/python/opengen/constraints/sphere2.py
similarity index 100%
rename from open-codegen/opengen/constraints/sphere2.py
rename to python/opengen/constraints/sphere2.py
diff --git a/open-codegen/opengen/constraints/zero.py b/python/opengen/constraints/zero.py
similarity index 100%
rename from open-codegen/opengen/constraints/zero.py
rename to python/opengen/constraints/zero.py
diff --git a/open-codegen/opengen/definitions.py b/python/opengen/definitions.py
similarity index 100%
rename from open-codegen/opengen/definitions.py
rename to python/opengen/definitions.py
diff --git a/open-codegen/opengen/functions/__init__.py b/python/opengen/functions/__init__.py
similarity index 100%
rename from open-codegen/opengen/functions/__init__.py
rename to python/opengen/functions/__init__.py
diff --git a/open-codegen/opengen/functions/fabs.py b/python/opengen/functions/fabs.py
similarity index 100%
rename from open-codegen/opengen/functions/fabs.py
rename to python/opengen/functions/fabs.py
diff --git a/open-codegen/opengen/functions/fmax.py b/python/opengen/functions/fmax.py
similarity index 100%
rename from open-codegen/opengen/functions/fmax.py
rename to python/opengen/functions/fmax.py
diff --git a/open-codegen/opengen/functions/fmin.py b/python/opengen/functions/fmin.py
similarity index 100%
rename from open-codegen/opengen/functions/fmin.py
rename to python/opengen/functions/fmin.py
diff --git a/open-codegen/opengen/functions/is_numeric.py b/python/opengen/functions/is_numeric.py
similarity index 100%
rename from open-codegen/opengen/functions/is_numeric.py
rename to python/opengen/functions/is_numeric.py
diff --git a/open-codegen/opengen/functions/is_symbolic.py b/python/opengen/functions/is_symbolic.py
similarity index 100%
rename from open-codegen/opengen/functions/is_symbolic.py
rename to python/opengen/functions/is_symbolic.py
diff --git a/open-codegen/opengen/functions/norm2.py b/python/opengen/functions/norm2.py
similarity index 100%
rename from open-codegen/opengen/functions/norm2.py
rename to python/opengen/functions/norm2.py
diff --git a/open-codegen/opengen/functions/norm2_squared.py b/python/opengen/functions/norm2_squared.py
similarity index 100%
rename from open-codegen/opengen/functions/norm2_squared.py
rename to python/opengen/functions/norm2_squared.py
diff --git a/open-codegen/opengen/functions/rosenbrock.py b/python/opengen/functions/rosenbrock.py
similarity index 100%
rename from open-codegen/opengen/functions/rosenbrock.py
rename to python/opengen/functions/rosenbrock.py
diff --git a/open-codegen/opengen/functions/sign.py b/python/opengen/functions/sign.py
similarity index 100%
rename from open-codegen/opengen/functions/sign.py
rename to python/opengen/functions/sign.py
diff --git a/open-codegen/opengen/icasadi/.gitignore b/python/opengen/icasadi/.gitignore
similarity index 100%
rename from open-codegen/opengen/icasadi/.gitignore
rename to python/opengen/icasadi/.gitignore
diff --git a/open-codegen/opengen/icasadi/Cargo.toml b/python/opengen/icasadi/Cargo.toml
similarity index 100%
rename from open-codegen/opengen/icasadi/Cargo.toml
rename to python/opengen/icasadi/Cargo.toml
diff --git a/open-codegen/opengen/icasadi/README.md b/python/opengen/icasadi/README.md
similarity index 100%
rename from open-codegen/opengen/icasadi/README.md
rename to python/opengen/icasadi/README.md
diff --git a/open-codegen/opengen/icasadi/build.rs b/python/opengen/icasadi/build.rs
similarity index 100%
rename from open-codegen/opengen/icasadi/build.rs
rename to python/opengen/icasadi/build.rs
diff --git a/open-codegen/opengen/icasadi/extern/README.txt b/python/opengen/icasadi/extern/README.txt
similarity index 100%
rename from open-codegen/opengen/icasadi/extern/README.txt
rename to python/opengen/icasadi/extern/README.txt
diff --git a/open-codegen/opengen/icasadi/src/PLACEHOLDER b/python/opengen/icasadi/src/PLACEHOLDER
similarity index 100%
rename from open-codegen/opengen/icasadi/src/PLACEHOLDER
rename to python/opengen/icasadi/src/PLACEHOLDER
diff --git a/open-codegen/opengen/ocp/__init__.py b/python/opengen/ocp/__init__.py
similarity index 100%
rename from open-codegen/opengen/ocp/__init__.py
rename to python/opengen/ocp/__init__.py
diff --git a/open-codegen/opengen/ocp/builder.py b/python/opengen/ocp/builder.py
similarity index 100%
rename from open-codegen/opengen/ocp/builder.py
rename to python/opengen/ocp/builder.py
diff --git a/open-codegen/opengen/ocp/constraint_utils.py b/python/opengen/ocp/constraint_utils.py
similarity index 100%
rename from open-codegen/opengen/ocp/constraint_utils.py
rename to python/opengen/ocp/constraint_utils.py
diff --git a/open-codegen/opengen/ocp/dynamics.py b/python/opengen/ocp/dynamics.py
similarity index 100%
rename from open-codegen/opengen/ocp/dynamics.py
rename to python/opengen/ocp/dynamics.py
diff --git a/open-codegen/opengen/ocp/parameter.py b/python/opengen/ocp/parameter.py
similarity index 100%
rename from open-codegen/opengen/ocp/parameter.py
rename to python/opengen/ocp/parameter.py
diff --git a/open-codegen/opengen/ocp/problem.py b/python/opengen/ocp/problem.py
similarity index 100%
rename from open-codegen/opengen/ocp/problem.py
rename to python/opengen/ocp/problem.py
diff --git a/open-codegen/opengen/ocp/solution.py b/python/opengen/ocp/solution.py
similarity index 100%
rename from open-codegen/opengen/ocp/solution.py
rename to python/opengen/ocp/solution.py
diff --git a/open-codegen/opengen/tcp/__init__.py b/python/opengen/tcp/__init__.py
similarity index 100%
rename from open-codegen/opengen/tcp/__init__.py
rename to python/opengen/tcp/__init__.py
diff --git a/open-codegen/opengen/tcp/optimizer_tcp_manager.py b/python/opengen/tcp/optimizer_tcp_manager.py
similarity index 100%
rename from open-codegen/opengen/tcp/optimizer_tcp_manager.py
rename to python/opengen/tcp/optimizer_tcp_manager.py
diff --git a/open-codegen/opengen/tcp/solver_error.py b/python/opengen/tcp/solver_error.py
similarity index 100%
rename from open-codegen/opengen/tcp/solver_error.py
rename to python/opengen/tcp/solver_error.py
diff --git a/open-codegen/opengen/tcp/solver_response.py b/python/opengen/tcp/solver_response.py
similarity index 100%
rename from open-codegen/opengen/tcp/solver_response.py
rename to python/opengen/tcp/solver_response.py
diff --git a/open-codegen/opengen/tcp/solver_status.py b/python/opengen/tcp/solver_status.py
similarity index 100%
rename from open-codegen/opengen/tcp/solver_status.py
rename to python/opengen/tcp/solver_status.py
diff --git a/open-codegen/opengen/templates/c/example_cmakelists.txt b/python/opengen/templates/c/example_cmakelists.txt
similarity index 100%
rename from open-codegen/opengen/templates/c/example_cmakelists.txt
rename to python/opengen/templates/c/example_cmakelists.txt
diff --git a/open-codegen/opengen/templates/c/example_optimizer_c_bindings.c b/python/opengen/templates/c/example_optimizer_c_bindings.c
similarity index 100%
rename from open-codegen/opengen/templates/c/example_optimizer_c_bindings.c
rename to python/opengen/templates/c/example_optimizer_c_bindings.c
diff --git a/open-codegen/opengen/templates/c/optimizer_cinterface.rs.jinja b/python/opengen/templates/c/optimizer_cinterface.rs.jinja
similarity index 100%
rename from open-codegen/opengen/templates/c/optimizer_cinterface.rs.jinja
rename to python/opengen/templates/c/optimizer_cinterface.rs.jinja
diff --git a/open-codegen/opengen/templates/cargo_config.toml b/python/opengen/templates/cargo_config.toml
similarity index 100%
rename from open-codegen/opengen/templates/cargo_config.toml
rename to python/opengen/templates/cargo_config.toml
diff --git a/open-codegen/opengen/templates/icasadi/casadi_memory.h b/python/opengen/templates/icasadi/casadi_memory.h
similarity index 100%
rename from open-codegen/opengen/templates/icasadi/casadi_memory.h
rename to python/opengen/templates/icasadi/casadi_memory.h
diff --git a/open-codegen/opengen/templates/icasadi/icasadi_cargo.toml b/python/opengen/templates/icasadi/icasadi_cargo.toml
similarity index 100%
rename from open-codegen/opengen/templates/icasadi/icasadi_cargo.toml
rename to python/opengen/templates/icasadi/icasadi_cargo.toml
diff --git a/open-codegen/opengen/templates/icasadi/icasadi_lib.rs b/python/opengen/templates/icasadi/icasadi_lib.rs
similarity index 100%
rename from open-codegen/opengen/templates/icasadi/icasadi_lib.rs
rename to python/opengen/templates/icasadi/icasadi_lib.rs
diff --git a/open-codegen/opengen/templates/icasadi/interface.c b/python/opengen/templates/icasadi/interface.c
similarity index 100%
rename from open-codegen/opengen/templates/icasadi/interface.c
rename to python/opengen/templates/icasadi/interface.c
diff --git a/open-codegen/opengen/templates/optimizer.rs.jinja b/python/opengen/templates/optimizer.rs.jinja
similarity index 100%
rename from open-codegen/opengen/templates/optimizer.rs.jinja
rename to python/opengen/templates/optimizer.rs.jinja
diff --git a/open-codegen/opengen/templates/optimizer_build.rs.jinja b/python/opengen/templates/optimizer_build.rs.jinja
similarity index 100%
rename from open-codegen/opengen/templates/optimizer_build.rs.jinja
rename to python/opengen/templates/optimizer_build.rs.jinja
diff --git a/open-codegen/opengen/templates/optimizer_cargo.toml.jinja b/python/opengen/templates/optimizer_cargo.toml.jinja
similarity index 100%
rename from open-codegen/opengen/templates/optimizer_cargo.toml.jinja
rename to python/opengen/templates/optimizer_cargo.toml.jinja
diff --git a/open-codegen/opengen/templates/python/python_bindings.rs b/python/opengen/templates/python/python_bindings.rs
similarity index 100%
rename from open-codegen/opengen/templates/python/python_bindings.rs
rename to python/opengen/templates/python/python_bindings.rs
diff --git a/open-codegen/opengen/templates/python/python_bindings_cargo.toml b/python/opengen/templates/python/python_bindings_cargo.toml
similarity index 100%
rename from open-codegen/opengen/templates/python/python_bindings_cargo.toml
rename to python/opengen/templates/python/python_bindings_cargo.toml
diff --git a/open-codegen/opengen/templates/ros/CMakeLists.txt b/python/opengen/templates/ros/CMakeLists.txt
similarity index 100%
rename from open-codegen/opengen/templates/ros/CMakeLists.txt
rename to python/opengen/templates/ros/CMakeLists.txt
diff --git a/open-codegen/opengen/templates/ros/OptimizationParameters.msg b/python/opengen/templates/ros/OptimizationParameters.msg
similarity index 100%
rename from open-codegen/opengen/templates/ros/OptimizationParameters.msg
rename to python/opengen/templates/ros/OptimizationParameters.msg
diff --git a/open-codegen/opengen/templates/ros/OptimizationResult.msg b/python/opengen/templates/ros/OptimizationResult.msg
similarity index 100%
rename from open-codegen/opengen/templates/ros/OptimizationResult.msg
rename to python/opengen/templates/ros/OptimizationResult.msg
diff --git a/open-codegen/opengen/templates/ros/README.md b/python/opengen/templates/ros/README.md
similarity index 100%
rename from open-codegen/opengen/templates/ros/README.md
rename to python/opengen/templates/ros/README.md
diff --git a/open-codegen/opengen/templates/ros/open_optimizer.cpp b/python/opengen/templates/ros/open_optimizer.cpp
similarity index 100%
rename from open-codegen/opengen/templates/ros/open_optimizer.cpp
rename to python/opengen/templates/ros/open_optimizer.cpp
diff --git a/open-codegen/opengen/templates/ros/open_optimizer.hpp b/python/opengen/templates/ros/open_optimizer.hpp
similarity index 100%
rename from open-codegen/opengen/templates/ros/open_optimizer.hpp
rename to python/opengen/templates/ros/open_optimizer.hpp
diff --git a/open-codegen/opengen/templates/ros/open_optimizer.launch b/python/opengen/templates/ros/open_optimizer.launch
similarity index 100%
rename from open-codegen/opengen/templates/ros/open_optimizer.launch
rename to python/opengen/templates/ros/open_optimizer.launch
diff --git a/open-codegen/opengen/templates/ros/open_params.yaml b/python/opengen/templates/ros/open_params.yaml
similarity index 100%
rename from open-codegen/opengen/templates/ros/open_params.yaml
rename to python/opengen/templates/ros/open_params.yaml
diff --git a/open-codegen/opengen/templates/ros/package.xml b/python/opengen/templates/ros/package.xml
similarity index 100%
rename from open-codegen/opengen/templates/ros/package.xml
rename to python/opengen/templates/ros/package.xml
diff --git a/open-codegen/opengen/templates/ros2/CMakeLists.txt b/python/opengen/templates/ros2/CMakeLists.txt
similarity index 100%
rename from open-codegen/opengen/templates/ros2/CMakeLists.txt
rename to python/opengen/templates/ros2/CMakeLists.txt
diff --git a/open-codegen/opengen/templates/ros2/OptimizationParameters.msg b/python/opengen/templates/ros2/OptimizationParameters.msg
similarity index 100%
rename from open-codegen/opengen/templates/ros2/OptimizationParameters.msg
rename to python/opengen/templates/ros2/OptimizationParameters.msg
diff --git a/open-codegen/opengen/templates/ros2/OptimizationResult.msg b/python/opengen/templates/ros2/OptimizationResult.msg
similarity index 100%
rename from open-codegen/opengen/templates/ros2/OptimizationResult.msg
rename to python/opengen/templates/ros2/OptimizationResult.msg
diff --git a/open-codegen/opengen/templates/ros2/README.md b/python/opengen/templates/ros2/README.md
similarity index 100%
rename from open-codegen/opengen/templates/ros2/README.md
rename to python/opengen/templates/ros2/README.md
diff --git a/open-codegen/opengen/templates/ros2/open_optimizer.cpp b/python/opengen/templates/ros2/open_optimizer.cpp
similarity index 100%
rename from open-codegen/opengen/templates/ros2/open_optimizer.cpp
rename to python/opengen/templates/ros2/open_optimizer.cpp
diff --git a/open-codegen/opengen/templates/ros2/open_optimizer.hpp b/python/opengen/templates/ros2/open_optimizer.hpp
similarity index 100%
rename from open-codegen/opengen/templates/ros2/open_optimizer.hpp
rename to python/opengen/templates/ros2/open_optimizer.hpp
diff --git a/open-codegen/opengen/templates/ros2/open_optimizer.launch.py b/python/opengen/templates/ros2/open_optimizer.launch.py
similarity index 100%
rename from open-codegen/opengen/templates/ros2/open_optimizer.launch.py
rename to python/opengen/templates/ros2/open_optimizer.launch.py
diff --git a/open-codegen/opengen/templates/ros2/open_params.yaml b/python/opengen/templates/ros2/open_params.yaml
similarity index 100%
rename from open-codegen/opengen/templates/ros2/open_params.yaml
rename to python/opengen/templates/ros2/open_params.yaml
diff --git a/open-codegen/opengen/templates/ros2/package.xml b/python/opengen/templates/ros2/package.xml
similarity index 100%
rename from open-codegen/opengen/templates/ros2/package.xml
rename to python/opengen/templates/ros2/package.xml
diff --git a/open-codegen/opengen/templates/tcp/tcp_server.rs b/python/opengen/templates/tcp/tcp_server.rs
similarity index 100%
rename from open-codegen/opengen/templates/tcp/tcp_server.rs
rename to python/opengen/templates/tcp/tcp_server.rs
diff --git a/open-codegen/opengen/templates/tcp/tcp_server_cargo.toml b/python/opengen/templates/tcp/tcp_server_cargo.toml
similarity index 100%
rename from open-codegen/opengen/templates/tcp/tcp_server_cargo.toml
rename to python/opengen/templates/tcp/tcp_server_cargo.toml
diff --git a/open-codegen/publish-pypi.sh b/python/publish-pypi.sh
similarity index 100%
rename from open-codegen/publish-pypi.sh
rename to python/publish-pypi.sh
diff --git a/open-codegen/pyproject.toml b/python/pyproject.toml
similarity index 97%
rename from open-codegen/pyproject.toml
rename to python/pyproject.toml
index df6ded5a..d868e864 100644
--- a/open-codegen/pyproject.toml
+++ b/python/pyproject.toml
@@ -49,7 +49,7 @@ dependencies = [
Homepage = "https://github.com/alphaville/optimization-engine"
Documentation = "https://alphaville.github.io/optimization-engine/"
Repository = "https://github.com/alphaville/optimization-engine"
-Changelog = "https://github.com/alphaville/optimization-engine/blob/master/open-codegen/CHANGELOG.md"
+Changelog = "https://github.com/alphaville/optimization-engine/blob/master/python/CHANGELOG.md"
[project.optional-dependencies]
dev = [
diff --git a/open-codegen/setup.py b/python/setup.py
similarity index 100%
rename from open-codegen/setup.py
rename to python/setup.py
diff --git a/open-codegen/test/README.md b/python/test/README.md
similarity index 87%
rename from open-codegen/test/README.md
rename to python/test/README.md
index e946a477..8b070ac9 100644
--- a/open-codegen/test/README.md
+++ b/python/test/README.md
@@ -6,7 +6,7 @@ Firstly, you need to create a virtual environment, activate it, and install open
```
pip install .
```
-from within `open-codegen`.
+from within `python`.
## Benchmarking
@@ -22,9 +22,9 @@ Then, firstly, create some necessary optimizers to be benchmarked
python prepare_benchmarks.py
```
-Run this from within `open-codegen/opengen`.
+Run this from within `python/`.
This will create a number of solvers to be benchmarked;
-these will be stored in `open-codegen/opengen/.python_test_build/benchmarkable`.
+these will be stored in `python/.python_test_build/benchmarkable`.
Then benchmark them with
```
diff --git a/open-codegen/test/__init__.py b/python/test/__init__.py
similarity index 100%
rename from open-codegen/test/__init__.py
rename to python/test/__init__.py
diff --git a/open-codegen/test/benchmark_open.py b/python/test/benchmark_open.py
similarity index 96%
rename from open-codegen/test/benchmark_open.py
rename to python/test/benchmark_open.py
index a5d932a2..7939ec4a 100644
--- a/open-codegen/test/benchmark_open.py
+++ b/python/test/benchmark_open.py
@@ -31,8 +31,7 @@
def get_open_local_absolute_path():
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
def t_benchmark1(solver):
diff --git a/open-codegen/test/prepare_benchmarks.py b/python/test/prepare_benchmarks.py
similarity index 97%
rename from open-codegen/test/prepare_benchmarks.py
rename to python/test/prepare_benchmarks.py
index 1b9fc60b..5d7b8825 100644
--- a/open-codegen/test/prepare_benchmarks.py
+++ b/python/test/prepare_benchmarks.py
@@ -7,8 +7,7 @@
def get_open_local_absolute_path():
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
def solver_configuration(do_precond=False):
@@ -103,4 +102,4 @@ def benchmark2(optimizer_name, with_obstacles=False, do_precond=False):
benchmark2("benchmark2", do_precond=False)
benchmark2("benchmark2p", do_precond=True)
benchmark2("benchmark2o", with_obstacles=True, do_precond=False)
-benchmark2("benchmark2op", with_obstacles=True, do_precond=True)
\ No newline at end of file
+benchmark2("benchmark2op", with_obstacles=True, do_precond=True)
diff --git a/open-codegen/test/test.py b/python/test/test.py
similarity index 99%
rename from open-codegen/test/test.py
rename to python/test/test.py
index a88dbb1f..60d7b0e6 100644
--- a/open-codegen/test/test.py
+++ b/python/test/test.py
@@ -36,8 +36,7 @@ class RustBuildTestCase(unittest.TestCase):
@staticmethod
def get_open_local_absolute_path():
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
# Which version of OpEn Rust library to test against
OPEN_RUSTLIB_VERSION = "*"
diff --git a/open-codegen/test/test_2_solvers.c b/python/test/test_2_solvers.c
similarity index 100%
rename from open-codegen/test/test_2_solvers.c
rename to python/test/test_2_solvers.c
diff --git a/open-codegen/test/test_constraints.py b/python/test/test_constraints.py
similarity index 100%
rename from open-codegen/test/test_constraints.py
rename to python/test/test_constraints.py
diff --git a/open-codegen/test/test_ocp.py b/python/test/test_ocp.py
similarity index 99%
rename from open-codegen/test/test_ocp.py
rename to python/test/test_ocp.py
index dc38b27b..a6459dbc 100644
--- a/open-codegen/test/test_ocp.py
+++ b/python/test/test_ocp.py
@@ -69,7 +69,7 @@ class OcpTestCase(unittest.TestCase):
@staticmethod
def get_open_local_absolute_path():
- return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
@classmethod
def setUpOCP1(cls):
diff --git a/open-codegen/test/test_raspberry_pi.py b/python/test/test_raspberry_pi.py
similarity index 95%
rename from open-codegen/test/test_raspberry_pi.py
rename to python/test/test_raspberry_pi.py
index f040f95f..5cd1e29f 100644
--- a/open-codegen/test/test_raspberry_pi.py
+++ b/python/test/test_raspberry_pi.py
@@ -10,8 +10,7 @@ class RaspberryPiTest(unittest.TestCase):
@staticmethod
def get_open_local_absolute_path():
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
# -----------------------------------------------------------------------
# Cross-compile to Raspberry Pi
diff --git a/open-codegen/test/test_ros2.py b/python/test/test_ros2.py
similarity index 99%
rename from open-codegen/test/test_ros2.py
rename to python/test/test_ros2.py
index f2d502aa..de5351ff 100644
--- a/open-codegen/test/test_ros2.py
+++ b/python/test/test_ros2.py
@@ -65,8 +65,7 @@ class Ros2TemplateCustomizationTestCase(unittest.TestCase):
@staticmethod
def get_open_local_absolute_path():
"""Return the absolute path to the local OpEn repository root."""
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
@classmethod
def solverConfig(cls):
@@ -192,8 +191,7 @@ class Ros2BuildTestCase(unittest.TestCase):
@staticmethod
def get_open_local_absolute_path():
"""Return the absolute path to the local OpEn repository root."""
- cwd = os.getcwd()
- return cwd.split('open-codegen')[0]
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "rust"))
@classmethod
def solverConfig(cls):
diff --git a/rust/CHANGELOG.md b/rust/CHANGELOG.md
new file mode 100644
index 00000000..78228821
--- /dev/null
+++ b/rust/CHANGELOG.md
@@ -0,0 +1,392 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/)
+and this project adheres to [Semantic Versioning](http://semver.org/).
+
+Note: This is the main Changelog file for the Rust solver. The Changelog file for the Python interface (`opengen`) can be found in [../python/CHANGELOG.md](python/CHANGELOG.md)
+
+
+
+## [v0.12.0] - Unreleased
+
+### Added
+
+- Richer Rust-side solver errors with human-readable reasons for projection failures, non-finite computations, linear algebra failures, and invalid internal solver states
+- Fallible constraint projections via `Constraint::project(...) -> FunctionCallResult`, with error propagation through FBS, PANOC, and ALM
+- Checked affine-space construction through `AffineSpace::try_new(...)` and `AffineSpaceError`
+
+### Changed
+
+- Rust solver supports generic float types
+- Expanded Rust constraint and solver test coverage with constructor validation, boundary/idempotence checks, additional `BallP` / epigraph projection cases, and broader `f32`/`f64` coverage
+- Swapped the cross-platform timer dependency to `web-time`, removed the old `instant`-specific wasm feature wiring, and updated optimizer timing call sites to use `web_time::Instant`
+- Improved Rust-side error handling across constraints and core solvers so projection failures and invalid numerical states are reported explicitly instead of being silently flattened
+- Refined `BallP`, `EpigraphSquaredNorm`, and related constraint implementations and docs for stronger numerical robustness and clearer behavior
+
+
+## [v0.11.1] - 2026-03-23
+
+
+### Fixed
+
+- Return best PANOC half-step on early exit (issue #325)
+
+
+
+## [v0.11.0] - 2026-03-14
+
+### Added
+
+- Implementation of `BallP` in Rust: projection on lp-ball
+
+### Changed
+
+- Algorithmic improvements in `EpigraphSquaredNorm` (numerically stable Newton refinement) and more detailed docs
+- Assertion in `Ball1`, `Ball2`, and `BallInf` to check that that dimensions of `x` and `xc` are compatible (with unit test)
+- Added validation in `Rectangle` and `Hyperplane` for invalid constructor inputs and strengthened dimension checks in hyperplane projection
+- Added validation in `Sphere2` for empty inputs and incompatible center dimensions
+- Added validation in `FiniteSet` for incompatible projection dimensions and corrected convexity detection for singleton sets
+- Added unit tests for invalid `Rectangle`, `Simplex`, `Hyperplane`, `Sphere2`, and `FiniteSet` edge cases
+
+### Fixed
+
+- Typos and doctest annotations in docs of `CartesianProduct` (in Rust), `Rectangle`, and `Hyperplane`, with more detailed documentation
+
+
+
+## [v0.10.0] - 2026-03-10
+
+### Added
+
+- Custom implementation of Cholesky factorisation (and solver); this is used in `AffineSpace` now.
+- New function in `matrix_operations` to compute AA' given a matrix A
+
+### Changed
+
+- Update version of `ndarray`, in `Cargo.toml`
+- Removed `modcholesky` because it was causing a bug (see issue #378)
+
+
+## [v0.9.1] - 2024-08-14
+
+
+### Fixed
+
+- Order of dependencies in `Cargo.toml` fixes crate-not-found issue on Windows
+
+
+
+
+## [v0.9.0] - 2024-03-20
+
+### Added
+
+- Rust implementation of epigraph of squared Euclidean norm (constraint)
+- Implementation of `AffineSpace`
+
+### Fixed
+
+- Clippy fixes
+
+
+## [v0.8.1] - 2023-10-27
+
+### Fixed
+
+- Fix bug in implementation of `ball2.rs` (radius was being ignored for balls centered not at the origin)
+
+
+
+
+## [v0.8.1] - 2023-10-27
+
+### Added
+
+- New constraint: sphere of Euclidean norm
+
+
+## [v0.7.7] - 2023-01-17
+
+### Fixed
+
+- Change `time::Instant` to `instant::Instant` to support WASM
+
+
+
+
+## [v0.7.6] - 2022-10-11
+
+### Added
+
+- Update functions in `AlmOptimizerStatus`
+
+
+
+
+
+## [v0.7.5] - 2022-06-22
+
+### Fixed
+
+- Fixed estimation of initial Lipschitz constant, `L`, when it is close to or equal to zero (e.g., Huber loss function)
+- Fixed issue in `AlmFactory` related to (F2) penalty constraints
+
+
+
+## [v0.7.4] - 2021-11-15
+
+### Added
+
+- Optional feature `wasm` in `Cargo.toml` (WebAssembly support); see https://alphaville.github.io/optimization-engine/docs/openrust-features for details
+- Using `instant::Instant` instead of `std::Instant` (Wasm-compatible)
+- Fixed Rust documentation of `Ball1`
+
+
+## [v0.7.3] - 2021-11-1
+
+### Added
+
+* Implementation of Simplex and Ball1 constraints in Rust
+* Fix issue with simultaneous use of features `jem` and `rp`
+
+
+
+## [v0.7.2] - 2021-10-27
+
+### Changed
+
+* Removed unnecessary `#[no_mangle]` annotations
+* Took care of additional clippy warnings
+* Bump versions: `cbindgen`: `0.8 --> 0.20` and `libc`: `0.2.0 -> 0.2.*`
+
+### Added
+
+* Support for [`rpmalloc`](https://github.com/EmbarkStudios/rpmalloc-rs) and [`jemalloc`](https://github.com/gnzlbg/jemallocator) using the features `jem` and `rp`
+
+
+
+
+
+## [v0.7.1] - 2020-09-04
+
+### Added
+
+* Introduced `Halfspace` (implemented and tested)
+* Introduced `Hyperplane` (implemented and tested)
+* New types: `FunctionCallResult`, `MappingType` and `JacobianMappingType`
+* Various clippy-related code improvements
+
+
+
+## [v0.7.0] - 2020-05-04
+
+
+### Added
+
+* ALM: compute cost value at solution
+
+
+
+
+## [v0.6.2] - 2019-10-29
+
+### Fixed
+
+* Bug in codegen for Cartesian products (PR #147)
+* Removed the use of `Default` in Rust (does not work for large slices)
+* Python: fixed typo in method `with_lfbgs_memory`
+
+### Added
+
+* New support for C-to-Rust interface via bindgen
+* Generation of example C code for C-to-Rust interface
+* CMakeLists for auto-generated example in C
+* Additional Python examples on web page
+* Chat button in web page (for gitter)
+* Added option `local_path` in `with_open_version`
+
+### Changed
+
+* Homotopy module in Rust is annotated as deprecated
+* TCP server response is cast into Python objects (PR #144)
+* Auto-generated code links to most recent crate, unless overriden
+* Changed `jacobian` to `gradient` in Python
+
+## [v0.6.1-alpha.2] - 2019-09-7
+
+### Fixed
+
+* TCP server: Malformed error JSON is now fixed
+* Algorithm now returns `u_bar`, which is feasible (not `u`)
+
+### Added
+
+* Introduced C interface to CasADi-generated C functions
+* Rust and Python implementations of joint ALM/PM algorithms
+* Rust docs for augmented Lagrangian method (ALM)
+* Release of crate version `0.6.1-alpha.1` and `0.6.1-alpha.2`
+* Introduced `#![allow(dead_code)]` in ALM implementation
+* New AKKT-compliant termination criterion
+* Tolerance relaxation in penalty method
+* Finite sets supported in Rust
+* Rust/Python: setting CBFGS parameters
+* Second-order cones supported in Rust
+* Rust docs: support for equations with KaTeX
+
+### Changed
+
+* Updated README
+
+
+### Removed
+
+* Support for Python <3.6 (deprecated)
+* Module `continuation` is going to become obsolete
+
+
+## [v0.5.0] - 2019-06-22
+
+### Fixed
+
+* Fixed `with_max_duration` in `PANOC` not following the builder pattern
+* Fixed misplaced `.unwrap()` in the `HomotopyOptimizer`
+* Fixed so the Python builder uses the current directory as default
+
+### Added
+
+* Generation of C/C++ bindings added in the Python interface and included in the test suite
+* Support in Rust for Cartesian product of constraints
+
+### Removed
+
+* Deprecated: `enable_tcp_interface` and `enable_c_bindings_generation`
+
+
+
+## [v0.4.0] - 2019-06-03
+
+### Fixed
+
+* Windows interoperability of `matlab_open_root()` [closes #24]
+* Issues with file separator on Windows [#26 and #27]
+* Handling corner cases such as wrong input parameters
+* Rust: checking for `NaN` and `Inf` values in solution
+
+### Added
+
+* New Python interface for code generation (works with Python 2.7, 3.4 and 3.6)
+* Homotopy method implemented in Rust
+* TCP interface in Rust is generated automatically on request
+* Support for OSX and linux distros on [travis] [closes #25]
+* Continuous integration on [Appveyor]
+* Experimental C bindings library
+* Documentation for new Rust code and Python code
+* Unit tests in Python using `unittest`
+
+### Changed
+
+* Rust API: Using `Option<>` and `Result<>` to handle errors
+* Updated L-BFGS dependency; now using version `0.2` (no NonZeroUsize)
+
+
+## [v0.3.1] - 2019-05-21
+
+### Fixed
+
+* An error in the Matlab codegen which made it inoperable
+
+### Added
+
+* Support for compiling for different targets
+
+
+
+## [v0.3.0] - 2019-05-16
+
+This is a breaking API change.
+
+### Fixed
+
+* A lot of internal fixes and clean up
+* `PANOCEngine` and `FBSEngine` is no longer explicitly needed
+* Simplified import system
+* Cost functions now need to return a `Result<(), Error>` to indicate if the evaluation was successful
+
+### Added
+
+* Started an `examples` folder
+
+
+
+
+[v0.11.1]: https://github.com/alphaville/optimization-engine/compare/v0.11.0...v0.11.1
+[v0.11.0]: https://github.com/alphaville/optimization-engine/compare/v0.10.0...v0.11.0
+[v0.10.0]: https://github.com/alphaville/optimization-engine/compare/v0.9.1...v0.10.0
+[v0.9.1]: https://github.com/alphaville/optimization-engine/compare/v0.9.0...v0.9.1
+[v0.9.0]: https://github.com/alphaville/optimization-engine/compare/v0.8.1...v0.9.0
+[v0.8.1]: https://github.com/alphaville/optimization-engine/compare/v0.8.0...v0.8.1
+[v0.8.0]: https://github.com/alphaville/optimization-engine/compare/v0.7.7...v0.8.0
+[v0.7.7]: https://github.com/alphaville/optimization-engine/compare/v0.7.6...v0.7.7
+[v0.7.6]: https://github.com/alphaville/optimization-engine/compare/v0.7.5...v0.7.6
+[v0.7.5]: https://github.com/alphaville/optimization-engine/compare/v0.7.4...v0.7.5
+[v0.7.4]: https://github.com/alphaville/optimization-engine/compare/v0.7.3...v0.7.4
+[v0.7.3]: https://github.com/alphaville/optimization-engine/compare/v0.7.2...v0.7.3
+[v0.7.2]: https://github.com/alphaville/optimization-engine/compare/v0.7.1...v0.7.2
+[v0.7.1]: https://github.com/alphaville/optimization-engine/compare/v0.7.0...v0.7.1
+[v0.7.0]: https://github.com/alphaville/optimization-engine/compare/v0.6.2...v0.7.0
+[v0.6.2]: https://github.com/alphaville/optimization-engine/compare/v0.6.1-alpha.2...v0.6.2
+[v0.6.1-alpha.2]: https://github.com/alphaville/optimization-engine/compare/v0.5.0...v0.6.1-alpha.2
+[v0.5.0]: https://github.com/alphaville/optimization-engine/compare/v0.4.0...v0.5.0
+[v0.4.0]: https://github.com/alphaville/optimization-engine/compare/v0.3.1...v0.4.0
+[v0.3.1]: https://github.com/alphaville/optimization-engine/compare/v0.3.0...v0.3.1
+[v0.3.0]: https://github.com/alphaville/optimization-engine/compare/v0.2.2...v0.3.0
+
+
+[closes #24]: https://github.com/alphaville/optimization-engine/issues/24
+[closes #25]: https://github.com/alphaville/optimization-engine/issues/25
+
+
+[travis]: https://travis-ci.org/alphaville/optimization-engine/builds/537155440
+[Appveyor]: https://ci.appveyor.com/project/alphaville/optimization-engine
diff --git a/Cargo.toml b/rust/Cargo.toml
similarity index 96%
rename from Cargo.toml
rename to rust/Cargo.toml
index c921400a..425b9ae7 100644
--- a/Cargo.toml
+++ b/rust/Cargo.toml
@@ -30,7 +30,7 @@ documentation = "https://docs.rs/optimization_engine"
license = "MIT OR Apache-2.0"
# README file
-readme = "README.md"
+readme = "../README.md"
# Name of this crate
name = "optimization_engine"
@@ -56,15 +56,7 @@ edition = "2018"
# - Update the webpage (e.g., make a blog post)
publish = true
-exclude = [
- "design/*",
- "docs/*",
- "icasadi/*",
- "matlab/*",
- "open-clib/*",
- "open-codegen/*",
- "website/*",
-]
+exclude = []
# --------------------------------------------------------------------------
# D.O.C.S
diff --git a/Makefile.toml b/rust/Makefile.toml
similarity index 94%
rename from Makefile.toml
rename to rust/Makefile.toml
index ee2093c2..48f9bac5 100644
--- a/Makefile.toml
+++ b/rust/Makefile.toml
@@ -2,6 +2,7 @@
# cargo make docs
# cargo make doc-katex
[tasks.doc-katex]
+cwd = "rust"
env = { "RUSTDOCFLAGS" = "--html-in-header katex-header.html" }
command = "cargo"
args = ["doc", "--no-deps"]
@@ -11,4 +12,3 @@ dependencies = [
"docs",
"doc-katex",
]
-
diff --git a/examples/README.md b/rust/examples/README.md
similarity index 100%
rename from examples/README.md
rename to rust/examples/README.md
diff --git a/examples/alm_pm.rs b/rust/examples/alm_pm.rs
similarity index 100%
rename from examples/alm_pm.rs
rename to rust/examples/alm_pm.rs
diff --git a/examples/panoc_ex1.rs b/rust/examples/panoc_ex1.rs
similarity index 100%
rename from examples/panoc_ex1.rs
rename to rust/examples/panoc_ex1.rs
diff --git a/examples/panoc_ex2.rs b/rust/examples/panoc_ex2.rs
similarity index 100%
rename from examples/panoc_ex2.rs
rename to rust/examples/panoc_ex2.rs
diff --git a/examples/pm.rs b/rust/examples/pm.rs
similarity index 100%
rename from examples/pm.rs
rename to rust/examples/pm.rs
diff --git a/katex-header.html b/rust/katex-header.html
similarity index 100%
rename from katex-header.html
rename to rust/katex-header.html
diff --git a/src/alm/alm_cache.rs b/rust/src/alm/alm_cache.rs
similarity index 100%
rename from src/alm/alm_cache.rs
rename to rust/src/alm/alm_cache.rs
diff --git a/src/alm/alm_factory.rs b/rust/src/alm/alm_factory.rs
similarity index 100%
rename from src/alm/alm_factory.rs
rename to rust/src/alm/alm_factory.rs
diff --git a/src/alm/alm_optimizer.rs b/rust/src/alm/alm_optimizer.rs
similarity index 100%
rename from src/alm/alm_optimizer.rs
rename to rust/src/alm/alm_optimizer.rs
diff --git a/src/alm/alm_optimizer_status.rs b/rust/src/alm/alm_optimizer_status.rs
similarity index 100%
rename from src/alm/alm_optimizer_status.rs
rename to rust/src/alm/alm_optimizer_status.rs
diff --git a/src/alm/alm_problem.rs b/rust/src/alm/alm_problem.rs
similarity index 100%
rename from src/alm/alm_problem.rs
rename to rust/src/alm/alm_problem.rs
diff --git a/src/alm/mod.rs b/rust/src/alm/mod.rs
similarity index 100%
rename from src/alm/mod.rs
rename to rust/src/alm/mod.rs
diff --git a/src/alm/tests.rs b/rust/src/alm/tests.rs
similarity index 100%
rename from src/alm/tests.rs
rename to rust/src/alm/tests.rs
diff --git a/src/cholesky_factorizer.rs b/rust/src/cholesky_factorizer.rs
similarity index 100%
rename from src/cholesky_factorizer.rs
rename to rust/src/cholesky_factorizer.rs
diff --git a/src/constraints/affine_space.rs b/rust/src/constraints/affine_space.rs
similarity index 100%
rename from src/constraints/affine_space.rs
rename to rust/src/constraints/affine_space.rs
diff --git a/src/constraints/ball1.rs b/rust/src/constraints/ball1.rs
similarity index 100%
rename from src/constraints/ball1.rs
rename to rust/src/constraints/ball1.rs
diff --git a/src/constraints/ball2.rs b/rust/src/constraints/ball2.rs
similarity index 100%
rename from src/constraints/ball2.rs
rename to rust/src/constraints/ball2.rs
diff --git a/src/constraints/ballinf.rs b/rust/src/constraints/ballinf.rs
similarity index 100%
rename from src/constraints/ballinf.rs
rename to rust/src/constraints/ballinf.rs
diff --git a/src/constraints/ballp.rs b/rust/src/constraints/ballp.rs
similarity index 100%
rename from src/constraints/ballp.rs
rename to rust/src/constraints/ballp.rs
diff --git a/src/constraints/cartesian_product.rs b/rust/src/constraints/cartesian_product.rs
similarity index 100%
rename from src/constraints/cartesian_product.rs
rename to rust/src/constraints/cartesian_product.rs
diff --git a/src/constraints/epigraph_squared_norm.rs b/rust/src/constraints/epigraph_squared_norm.rs
similarity index 100%
rename from src/constraints/epigraph_squared_norm.rs
rename to rust/src/constraints/epigraph_squared_norm.rs
diff --git a/src/constraints/finite.rs b/rust/src/constraints/finite.rs
similarity index 100%
rename from src/constraints/finite.rs
rename to rust/src/constraints/finite.rs
diff --git a/src/constraints/halfspace.rs b/rust/src/constraints/halfspace.rs
similarity index 100%
rename from src/constraints/halfspace.rs
rename to rust/src/constraints/halfspace.rs
diff --git a/src/constraints/hyperplane.rs b/rust/src/constraints/hyperplane.rs
similarity index 100%
rename from src/constraints/hyperplane.rs
rename to rust/src/constraints/hyperplane.rs
diff --git a/src/constraints/mod.rs b/rust/src/constraints/mod.rs
similarity index 100%
rename from src/constraints/mod.rs
rename to rust/src/constraints/mod.rs
diff --git a/src/constraints/no_constraints.rs b/rust/src/constraints/no_constraints.rs
similarity index 100%
rename from src/constraints/no_constraints.rs
rename to rust/src/constraints/no_constraints.rs
diff --git a/src/constraints/rectangle.rs b/rust/src/constraints/rectangle.rs
similarity index 100%
rename from src/constraints/rectangle.rs
rename to rust/src/constraints/rectangle.rs
diff --git a/src/constraints/simplex.rs b/rust/src/constraints/simplex.rs
similarity index 100%
rename from src/constraints/simplex.rs
rename to rust/src/constraints/simplex.rs
diff --git a/src/constraints/soc.rs b/rust/src/constraints/soc.rs
similarity index 100%
rename from src/constraints/soc.rs
rename to rust/src/constraints/soc.rs
diff --git a/src/constraints/sphere2.rs b/rust/src/constraints/sphere2.rs
similarity index 100%
rename from src/constraints/sphere2.rs
rename to rust/src/constraints/sphere2.rs
diff --git a/src/constraints/tests.rs b/rust/src/constraints/tests.rs
similarity index 100%
rename from src/constraints/tests.rs
rename to rust/src/constraints/tests.rs
diff --git a/src/constraints/zero.rs b/rust/src/constraints/zero.rs
similarity index 100%
rename from src/constraints/zero.rs
rename to rust/src/constraints/zero.rs
diff --git a/src/core/fbs/fbs_cache.rs b/rust/src/core/fbs/fbs_cache.rs
similarity index 100%
rename from src/core/fbs/fbs_cache.rs
rename to rust/src/core/fbs/fbs_cache.rs
diff --git a/src/core/fbs/fbs_engine.rs b/rust/src/core/fbs/fbs_engine.rs
similarity index 100%
rename from src/core/fbs/fbs_engine.rs
rename to rust/src/core/fbs/fbs_engine.rs
diff --git a/src/core/fbs/fbs_optimizer.rs b/rust/src/core/fbs/fbs_optimizer.rs
similarity index 100%
rename from src/core/fbs/fbs_optimizer.rs
rename to rust/src/core/fbs/fbs_optimizer.rs
diff --git a/src/core/fbs/mod.rs b/rust/src/core/fbs/mod.rs
similarity index 100%
rename from src/core/fbs/mod.rs
rename to rust/src/core/fbs/mod.rs
diff --git a/src/core/fbs/tests.rs b/rust/src/core/fbs/tests.rs
similarity index 100%
rename from src/core/fbs/tests.rs
rename to rust/src/core/fbs/tests.rs
diff --git a/src/core/mod.rs b/rust/src/core/mod.rs
similarity index 100%
rename from src/core/mod.rs
rename to rust/src/core/mod.rs
diff --git a/src/core/panoc/mod.rs b/rust/src/core/panoc/mod.rs
similarity index 100%
rename from src/core/panoc/mod.rs
rename to rust/src/core/panoc/mod.rs
diff --git a/src/core/panoc/panoc_cache.rs b/rust/src/core/panoc/panoc_cache.rs
similarity index 100%
rename from src/core/panoc/panoc_cache.rs
rename to rust/src/core/panoc/panoc_cache.rs
diff --git a/src/core/panoc/panoc_engine.rs b/rust/src/core/panoc/panoc_engine.rs
similarity index 100%
rename from src/core/panoc/panoc_engine.rs
rename to rust/src/core/panoc/panoc_engine.rs
diff --git a/src/core/panoc/panoc_optimizer.rs b/rust/src/core/panoc/panoc_optimizer.rs
similarity index 100%
rename from src/core/panoc/panoc_optimizer.rs
rename to rust/src/core/panoc/panoc_optimizer.rs
diff --git a/src/core/panoc/tests.rs b/rust/src/core/panoc/tests.rs
similarity index 100%
rename from src/core/panoc/tests.rs
rename to rust/src/core/panoc/tests.rs
diff --git a/src/core/problem.rs b/rust/src/core/problem.rs
similarity index 100%
rename from src/core/problem.rs
rename to rust/src/core/problem.rs
diff --git a/src/core/solver_status.rs b/rust/src/core/solver_status.rs
similarity index 100%
rename from src/core/solver_status.rs
rename to rust/src/core/solver_status.rs
diff --git a/src/lib.rs b/rust/src/lib.rs
similarity index 100%
rename from src/lib.rs
rename to rust/src/lib.rs
diff --git a/src/lipschitz_estimator.rs b/rust/src/lipschitz_estimator.rs
similarity index 100%
rename from src/lipschitz_estimator.rs
rename to rust/src/lipschitz_estimator.rs
diff --git a/src/matrix_operations.rs b/rust/src/matrix_operations.rs
similarity index 100%
rename from src/matrix_operations.rs
rename to rust/src/matrix_operations.rs
diff --git a/src/mocks.rs b/rust/src/mocks.rs
similarity index 100%
rename from src/mocks.rs
rename to rust/src/mocks.rs
diff --git a/src/numeric.rs b/rust/src/numeric.rs
similarity index 100%
rename from src/numeric.rs
rename to rust/src/numeric.rs
diff --git a/src/tests.rs b/rust/src/tests.rs
similarity index 100%
rename from src/tests.rs
rename to rust/src/tests.rs
diff --git a/website/README.md b/website/README.md
deleted file mode 100644
index 574aecfa..00000000
--- a/website/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-This website now uses Docusaurus v3.
-
-# Development
-
-Install dependencies:
-
-```sh
-yarn
-```
-
-Start the local dev server:
-
-```sh
-yarn start
-```
-
-Build the production site:
-
-```sh
-yarn build
-```
-
-Preview the production build locally:
-
-```sh
-yarn serve
-```
-
-Deploy to GitHub Pages:
-
-```sh
-yarn deploy
-```
-
-# Project Layout
-
-```
-optimization-engine/
- docs/ # documentation markdown files
- website/
- blog/ # blog posts
- src/
- css/
- pages/
- static/
- img/
- js/
- docusaurus.config.js
- sidebars.js
- package.json
-```
-
-# Notes
-
-- The docs remain in the repository root under `/docs`.
-- Legacy inline MathJax and widget scripts are stripped at build time, and equivalent site-wide support is loaded from `website/static/js`.
-- Sidebar ordering now lives in `website/sidebars.js`.