ConstraintTrees.jl -- Tidy constraints for optimization problems

Build status Documentation
CI status codecov stable documentation dev documentation

Package ConstraintTrees.jl provides a simple data structure ConstraintTree for organizing the contents of linear and quadratic constrained optimization problems. As a main goal, it abstracts over the distinction between constraints and variables, allowing much tidier representation for many kinds of complex constraint systems. The primary purpose is to support constraint-based metabolic modeling within COBREXA.jl.

ConstraintTrees are intended to be used with JuMP, but the package does not depend on JuMP -- instead it is completely generic and lightweight, and may be used with any other constraint-solving framework. The documentation describes a typical use of ConstraintTrees for solving constrained linear systems (in metabolic modeling) and constrained quadratic systems (for geometry) using JuMP, together with copy-pasteable code snippets that provide the integration.

ConstraintTrees package is maintained and open for extensions. Feel free to discuss changes and ideas via issues and pull requests.


ConstraintTrees.jl was developed at the Luxembourg Centre for Systems Biomedicine of the University of Luxembourg ( and at Institute for Quantitative and Theoretical Biology at Heinrich Heine University Düsseldorf ( The development was supported by European Union's Horizon 2020 Programme under PerMedCoE project (, agreement no. 951773. logo   LCSB logo   HHU logo   QTB logo   PerMedCoE logo