  Model predictive control (MPC) is an optimal control technique which involves
solving a sequence of constrained optimization problems across a given time
horizon. In this paper, we introduce a category theoretic framework for
constructing complex MPC problem formulations by composing subproblems.
Specifically, we construct a monoidal category - called Para(Conv) - whose
objects are Euclidean spaces and whose morphisms represent constrained convex
optimization problems. We then show that the multistage structure of typical
MPC problems arises from sequential composition in Para(Conv), while parallel
composition can be used to model constraints across multiple stages of the
prediction horizon. This framework comes equipped with a rigorous, diagrammatic
syntax, allowing for easy visualization and modification of complex problems.
Finally, we show how this framework allows a simple software realization in the
Julia programming language by integrating with existing mathematical
programming libraries to provide high-level, graphical abstractions for MPC.
