From nonlinear optimal control problems to dynamically feasible trajectories.
Model in Python, compile with JAX, and scale batches on CPU or GPU—successive convexification turns a nonlinear OCP into a sequence of convex subproblems.
OpenSCvx
Installation instructions
OpenSCvx — Trajectory Optimization via Successive Convexification in Python/JAX¶
OpenSCvx is an open-source Python library for nonlinear trajectory optimization built on successive convexification (SCvx). You write dynamics, costs, and constraints as a single composable problem object; the library lowers that symbolic definition to JAX, discretizes it on a time grid, and solves the resulting nonconvex problem through a sequence of convex subproblems. The same problem definition runs on CPU and GPU, and vectorizes across decision nodes and scenario batches.
Why OpenSCvx¶
Modeling. Dynamics, costs, and constraints are defined together in a structured problem object. The Users Guide is the place to see how the pieces fit from a first model to a solve.
JAX. The symbolic layer lowers to JAX. On the compiled hot paths we jax.jit and immediately jax.export: export is always part of that pipeline, not an extra step you opt into later. CPU and GPU use the same problem definition; performance still depends on problem size and settings.
Vectorization. Two ideas show up in practice: the discretized dynamics and many nonlinear terms
are evaluated across decision nodes in parallel inside the solver (see
Vectorization and vmapping). When
your model has a batch axis you want to treat uniformly—many obstacles, repeated geometry, and
similar—ox.Vmap writes that data-parallel piece symbolically and lowers to jax.vmap. It
helps avoid hand-written Python loops over those batch dimensions; it is not a general substitute
for every outer loop (see Obstacle avoidance with Vmap).
Where to go next¶
- Users guide — modeling, constraints, and visualization.
- API reference — modules and functions generated from source with docstrings.
- Examples — runnable scripts organized by topic, run them locally and browse problem categories.