Direct multiple shooting is a discretization strategy for solving Optimal Control Problems (OCPs) by dividing the prediction horizon into multiple shorter time segments. On each segment, an initial value problem (IVP) is solved independently from a parameterized initial state, and continuity constraints are enforced to link the segments together, ensuring a physically consistent trajectory. This segmentation enhances numerical stability and robustness compared to single-shooting methods, especially for unstable systems or long horizons.
Glossary
Direct Multiple Shooting

What is Direct Multiple Shooting?
Direct multiple shooting is a prominent numerical method for solving Optimal Control Problems (OCPs), particularly within Nonlinear Model Predictive Control (NMPC). It transforms the infinite-dimensional OCP into a structured, finite-dimensional Nonlinear Programming (NLP) problem by discretizing the time horizon.
The method explicitly handles path constraints and complex system dynamics by converting the continuous-time OCP into a large but sparse Nonlinear Programming (NLP) problem. This structured NLP is then solved efficiently using specialized Sequential Quadratic Programming (SQP) solvers that exploit the block-diagonal sparsity pattern. Direct multiple shooting is a cornerstone of high-performance Nonlinear MPC (NMPC) implementations, enabling real-time control of robotic, aerospace, and chemical processes.
Key Features of Direct Multiple Shooting
Direct multiple shooting is a high-performance numerical method for solving Optimal Control Problems (OCPs) in Nonlinear MPC. It transforms an infinite-dimensional OCP into a finite-dimensional Nonlinear Programming (NLP) problem by discretizing the time horizon and solving parallel initial value problems.
Time Horizon Discretization
The core of the method involves dividing the prediction horizon into N multiple shooting intervals. The continuous-time OCP is discretized at these shooting nodes, creating a structured, finite-dimensional optimization problem. This segmentation is the primary distinction from single shooting methods and is key to handling unstable dynamics and path constraints effectively.
Parallel Initial Value Problems
On each shooting interval, an initial value problem (IVP) is solved independently, integrating the system dynamics from an initial state guess at the node. This allows for:
- Parallel computation of trajectories, significantly speeding up function evaluations.
- Natural embedding of sophisticated, adaptive ODE/DAE solvers for accurate simulation.
- Isolation of numerical instability; a problem on one interval does not corrupt the entire solution.
Continuity Constraints
To ensure the overall solution represents a physically continuous trajectory, continuity constraints are enforced at the boundaries between shooting intervals. These are equality constraints of the form:
x_{i+1}(t_i) - x_{i+1}^0 = 0
where the simulated end state of interval i must match the initial state variable for interval i+1. The optimizer adjusts the initial state guesses at all nodes to satisfy these constraints, yielding a continuous, feasible solution.
Improved Numerical Stability
By breaking the long integration into shorter segments, direct multiple shooting dramatically reduces the sensitivity to initial guesses compared to single shooting. This decouples the simulation from the optimization, preventing the "tail-wagging-the-dog" problem where small changes at the start cause exponentially large deviations at the end. It is particularly robust for systems with unstable modes or long horizons.
Structure for Efficient NLP Solvers
The transcribed NLP problem has a characteristic block-banded sparsity structure in its constraint Jacobian and Lagrangian Hessian. This structure arises because variables and constraints from one shooting interval primarily couple only with neighboring intervals. High-performance NLP solvers (like IPOPT or SNOPT) and QP solvers within Sequential Quadratic Programming (SQP) exploit this sparsity using specialized linear algebra, enabling the solution of large-scale problems.
Natural Handling of Path Constraints
State and input constraints can be enforced directly at the discretization nodes (and optionally at intermediate points via collocation). This explicit, pointwise enforcement is more straightforward and often more accurate than in single shooting, where constraints must be enforced along an entire, highly sensitive integrated trajectory. It provides direct control over constraint satisfaction throughout the horizon.
Direct Multiple Shooting vs. Direct Single Shooting
A comparison of two primary direct transcription methods for solving Optimal Control Problems (OCPs) in Nonlinear Model Predictive Control (NMPC).
| Numerical Feature | Direct Single Shooting | Direct Multiple Shooting |
|---|---|---|
Core Discretization Approach | Only control inputs are discretized. The state trajectory is generated by a single forward integration of the full-horizon dynamics. | Both time horizon and states are discretized into segments (shooting intervals). An initial value problem is solved on each segment independently. |
Decision Variables for NLP | Control inputs at discretization points only. | States at the beginning of each shooting interval AND control inputs over each interval. |
Continuity Constraints | Implicitly satisfied by the single integration. No explicit constraints are needed. | Explicit equality constraints are added to the NLP to enforce continuity of the state trajectory across shooting intervals. |
Numerical Stability | Low. Sensitive to unstable dynamics; small changes in early controls can cause large, unbounded deviations in later states (the "tail-wags-the-dog" problem). | High. Localizes the effect of unstable modes within shorter intervals, preventing error propagation across the entire horizon. |
Initialization & Warm-Starting | Difficult. Requires a good initial guess for the full control sequence to produce a feasible state trajectory. | Easier. Can initialize with a physically meaningful (but possibly discontinuous) state guess. Permits efficient warm-starting from previous solution. |
Problem Sparsity Structure | Dense. The Jacobian of the constraints is generally dense due to the full-horizon integration. | Highly Sparse & Block-Structured. The continuity constraints create a block-banded structure (almost diagonal) that specialized NLP solvers exploit for speed. |
Computational Load per NLP Iteration | Lower per iteration, as fewer decision variables and no explicit continuity constraints are evaluated. | Higher per iteration due to more variables and constraints, but the sparsity enables faster overall convergence for complex problems. |
Sensitivity to Poor Initial Guess | High. Can easily fail to converge or converge to poor local minima if the initial control sequence is far from optimal. | Moderate. The explicit state variables provide more "handles" for the optimizer, making it more robust to suboptimal initial guesses. |
Primary Use Case | Simple, stable systems with short prediction horizons where a good initial guess is readily available. | Complex, unstable, or stiff systems (e.g., chemical reactors, aerospace), long horizons, and applications requiring robust real-time performance. |
Frequently Asked Questions
Direct multiple shooting is a foundational numerical method for solving Optimal Control Problems (OCPs) in robotics and process control. These FAQs address its core mechanics, advantages, and implementation details for engineers and researchers.
Direct multiple shooting is a numerical method for solving Optimal Control Problems (OCPs) by discretizing the prediction horizon into multiple segments, solving an initial value problem on each segment independently, and then enforcing continuity constraints between them through a large-scale Nonlinear Programming (NLP) problem.
The algorithm works in four key steps:
- Time Discretization: The prediction horizon ([t_0, t_f]) is divided into (N) shooting intervals ([t_i, t_{i+1}]).
- Parameterization: The control input is parameterized (e.g., piecewise constant) on each interval. The system's state at the beginning of each interval, (s_i), is introduced as an additional decision variable.
- Parallel Integration: On each interval (i), an initial value problem (IVP) is solved numerically, integrating the system dynamics from the initial value (s_i) using the parameterized control. This yields a simulated trajectory segment.
- Constraint Assembly & Optimization: A large-scale NLP is formed where the cost function is a sum over intervals, and continuity constraints (s_{i+1} = x(t_{i+1}; s_i, u_i)) are enforced to ensure the pieces of the trajectory connect smoothly. An NLP solver (like IPOPT or SNOPT) then solves for the optimal sequence of control parameters and shooting node states.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Direct multiple shooting is a cornerstone method within the broader field of optimal control and nonlinear model predictive control. These related concepts define the mathematical and computational ecosystem in which it operates.
Optimal Control Problem (OCP)
The Optimal Control Problem (OCP) is the foundational mathematical formulation that direct multiple shooting solves. It defines the goal of finding a control input trajectory and corresponding state trajectory that:
- Minimize a cost function (e.g., energy, time, tracking error).
- Obey the system's dynamic model (differential or difference equations).
- Satisfy path constraints (state/input limits) and boundary conditions (initial/final states). Direct multiple shooting is a discretization method that transforms this continuous-time OCP into a structured, finite-dimensional Nonlinear Programming (NLP) problem.
Nonlinear Programming (NLP)
Nonlinear Programming (NLP) is the class of optimization problems with a nonlinear objective function and/or nonlinear constraints. After discretization via direct multiple shooting, the OCP becomes a large, sparse NLP. Key characteristics include:
- Decision Variables: The states and controls at each shooting node.
- Nonlinear Equality Constraints: The system dynamics and continuity conditions between shooting intervals.
- Inequality Constraints: Physical limits on states and controls. Solving this NLP requires specialized algorithms like Sequential Quadratic Programming (SQP) or Interior-Point Methods, which exploit the problem's sparse, block-structured nature for computational efficiency.
Sequential Quadratic Programming (SQP)
Sequential Quadratic Programming (SQP) is a leading iterative algorithm for solving the NLP generated by direct multiple shooting. At each iteration, it:
- Approximates the original NLP with a Quadratic Programming (QP) subproblem (quadratic cost, linearized constraints).
- Solves this QP to find a search direction.
- Performs a line search to update the variables. The real-time iteration (RTI) scheme is a variant of SQP crucial for Nonlinear MPC. It performs only one SQP iteration per control time step, using a warm start from the previous solution, to meet strict timing requirements for physical systems.
Direct Single Shooting
Direct single shooting is a simpler alternative discretization method where only the control inputs are discretized as decision variables. The state trajectory is obtained by forward simulation of the dynamic model from the initial condition. Compared to direct multiple shooting:
- Pros: Fewer decision variables (only controls). Simpler constraint handling.
- Cons: Poor numerical stability for unstable systems or long horizons (simulation errors propagate). Less efficient for problems with path constraints on states. Direct multiple shooting's segmentation acts as a numerical stabilization technique, making it the preferred method for challenging, real-world control problems.
Collocation Methods
Collocation methods are another major class of direct transcription techniques for solving OCPs. Instead of solving initial value problems on intervals (like shooting), they parameterize the state and control trajectories with polynomial functions (e.g., Lagrange polynomials) within each segment. Key points:
- Discretization: Dynamics are enforced as equality constraints at specific collocation points within each element.
- Continuity: States are required to be continuous at element boundaries.
- Comparison to Shooting: Collocation often leads to even larger but more structured NLPs. It can provide higher-order accuracy and is often favored for problems requiring very precise trajectory representation.
Moving Horizon Estimation (MHE)
Moving Horizon Estimation (MHE) is the dual problem to MPC. While MPC optimizes future control inputs, MHE optimizes past state estimates using a window of recent measurements. It is frequently formulated and solved using the direct multiple shooting method.
- Problem Structure: Similar to an OCP, but over a past horizon, minimizing the deviation between model predictions and sensor data.
- Advantages: Explicitly handles system nonlinearities and constraints on states (e.g., physical limits), outperforming classical observers like the Extended Kalman Filter in constrained, nonlinear settings.
- Implementation: The same numerical software (e.g., ACADO Toolkit, CasADi) and NLP solvers used for NMPC are typically employed for MHE.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us