Skip to content

Commit bff6df9

Browse files
Add terminal constraint support to IPDDP (#174)
- add terminal equality and terminal inequality support to IPDDP - preserve warm-start interior-point state across path and terminal constraints - tighten filter, barrier, and dual-infeasibility bookkeeping for constrained IPDDP - reject unsupported terminal constraint subclasses instead of silently ignoring them - factor shared CDDP/interior-point helper logic into common utilities - add the RC MPCC Python portfolio demo and updated gallery asset generation - document the updated IPDDP constraint coverage and Python portfolio scope - bump package version to 0.5.2
1 parent d784601 commit bff6df9

27 files changed

Lines changed: 5014 additions & 1802 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ neural_models/
1616
examples/c_generated_code/
1717
examples/*_acados_ocp.json
1818

19+
# Generated demo output (gifs, json dumps)
20+
examples/out_ipddp_mpcc_rc/
21+
1922
# PDF images
2023
pdf_images/
2124

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(CMAKE_POLICY_VERSION_MINIMUM "3.15" CACHE STRING "Minimum CMake version for
2020

2121
project(
2222
cddp
23-
VERSION 0.5.1
23+
VERSION 0.5.2
2424
DESCRIPTION "CDDP: A C++ library for Trajectory Optimization and MPC"
2525
HOMEPAGE_URL "https://github.com/astomodynamics/cddp-cpp"
2626
)
@@ -147,7 +147,9 @@ set(cddp_core_srcs
147147
src/cddp_core/dynamical_system.cpp
148148
src/cddp_core/objective.cpp
149149
src/cddp_core/constraint.cpp
150+
src/cddp_core/cddp_context_utils.cpp
150151
src/cddp_core/helper.cpp
152+
src/cddp_core/interior_point_utils.cpp
151153
src/cddp_core/boxqp.cpp
152154
src/cddp_core/qp_solver.cpp
153155
src/cddp_core/cddp_core.cpp

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ $$
2020
\quad \mathbf{g}(\mathbf{x}_k,\mathbf{u})_k\leq 0
2121
$$
2222

23+
$$
24+
\quad \mathbf{h}(\mathbf{x}_N)=0,\;\mathbf{g}_N(\mathbf{x}_N)\leq 0
25+
$$
26+
2327
$$
2428
\quad {\mathbf{x}}_{0} = \mathbf{x}{(t_0)}
2529
$$
@@ -28,6 +32,13 @@ $$
2832
\quad k = 0,1,\cdots N-1
2933
$$
3034

35+
For interior-point solves, `IPDDP` supports path inequalities, terminal
36+
equalities, terminal inequalities, and mixed path/terminal constrained
37+
problems with warm-started multiplier and slack state. In the C++ API,
38+
terminal constraints are attached with `CDDP::addTerminalConstraint(...)`
39+
and should use the built-in `TerminalEqualityConstraint` or
40+
`TerminalInequalityConstraint` classes.
41+
3142
## Examples
3243
The maintained example surface is now split:
3344

@@ -81,6 +92,10 @@ The MPCC portfolio example is a lightweight kinematic contouring-control demo.
8192
Its vendored track data in `examples/data/` is derived from the
8293
[`alexliniger/MPCC`](https://github.com/alexliniger/MPCC) project.
8394

95+
The portfolio currently emphasizes animated path-constrained examples. The
96+
terminal-constraint cases added to IPDDP are covered by the regression suite
97+
rather than by a dedicated gallery animation.
98+
8499
## Installation
85100
### Dependencies
86101
* [CMake](https://cmake.org/) (Build System)
2.74 MB
Loading

docs/cpp.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ That lets the repository serve both as:
3030

3131
- a source build for C++ consumers
3232
- the native backend for the `pycddp` wheel
33+
34+
## Constraint coverage
35+
36+
`IPDDP` is the interior-point single-shooting solver in the C++ API. The
37+
current implementation supports:
38+
39+
- path inequality constraints
40+
- terminal equality constraints via `TerminalEqualityConstraint`
41+
- terminal inequality constraints via `TerminalInequalityConstraint`
42+
- mixed path and terminal constrained problems
43+
44+
Attach terminal constraints on `CDDP` with `addTerminalConstraint(...)`. IPDDP
45+
rejects unsupported terminal-constraint subclasses instead of silently ignoring
46+
them.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- a C++17 core library for trajectory optimization and MPC
66
- `pycddp` Python bindings built with `pybind11`
77
- a small animation-oriented Python portfolio for demos and regression checks
8+
- IPDDP support for path constraints plus terminal equality and terminal inequality constraints
89

910
Use the navigation to get started with installation, local development, and
1011
the release workflow for PyPI and GitHub Pages.

docs/python.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ The Python package is published as `pycddp`.
77
- the native extension module `_pycddp_core`
88
- the public package namespace `pycddp`
99
- version metadata from `pycddp._version`
10+
- `CDDP` problem bindings with `add_constraint(...)` and `add_terminal_constraint(...)`
11+
12+
## Solver coverage
13+
14+
The Python package follows the same solver capability as the C++ core. For
15+
`IPDDP`, the regression suite now covers:
16+
17+
- path-only constrained problems
18+
- terminal-inequality-only problems
19+
- terminal-equality-only problems
20+
- mixed path + terminal-equality problems
21+
- warm-start reuse of path, terminal-inequality, and terminal-equality state
22+
23+
The current Python portfolio focuses on animated demos rather than terminal
24+
constraint examples, so terminal-constrained IPDDP coverage is documented here
25+
and exercised in tests.
1026

1127
## Local validation
1228

docs/python_portfolio.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Matplotlib.
1313
actually produce: constrained solves, animated trajectories, and compact
1414
reproducible workflows.
1515
</p>
16+
<p>
17+
The gallery is intentionally path-focused. Terminal-equality and
18+
terminal-inequality support in <code>IPDDP</code> is covered in the solver
19+
regression suite rather than in a separate animation card.
20+
</p>
1621
<p>
1722
<a class="md-button md-button--primary" href="../python/">Python package guide</a>
1823
<a class="md-button" href="https://github.com/astomodynamics/cddp-cpp/tree/master/examples">Browse examples</a>

0 commit comments

Comments
 (0)