Skip to content
Hybrid optimal control code using occupation measures
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


MATLAB code for solving hybrid optimal control problems using occupation measures. See for more details.

Requires SPOTless (found at and MOSEK (found at

To run the examples, run the run_*.m file.

To perform control synthesis, replace the spotsosprog.m file (located at spotless/spotopt/@spotsosprog) with the one provided (hybridOCP/src/tools/spotsosprog_changes.m). Or, make the following chages in the spotsosprog.m file by hand:

  • Line 413: old: sol = minimize(pr,varargin) new: [sol, y, basis, dual_multiplier] = minimize(pr,varargin)
  • save all of the eqMultFac values in an array (look at lines 449, 454, 464, 471, 478 in the included spotsosprog_changes.m)
  • Lines 84-92: buildSOSDecompPrimal function comment out lines 84-92
You can’t perform that action at this time.