Welcome to modOpt’s documentation
modOpt is a modular development environment and library for optimization algorithms, written in Python. It is primarily designed to support research and education in the field of numerical optimization. modOpt facilitates rapid and efficient development of optimization algorithms by enabling a modular approach to building algorithms and providing built-in capabilities for testing and benchmarking.
modOpt offers various features to support students, optimization practitioners, and advanced developers. For instance, it includes built-in visualization and recording capabilities, interfaces to modeling frameworks such as JAX, CasADi, OpenMDAO and CSDL, and an interface to the CUTEst test problem set. It also provides several utilities for testing and benchmarking algorithms, and postprocessing optimization results. modOpt is supported on Linux, macOS, and Windows.
modOpt allows users to define computational models specifying the objective, constraints, and derivatives of optimization problems using one of the following six options:
The built-in
Problemclass,The built-in
ProblemLiteclass,CSDL or CSDL_alpha,
OpenMDAO,
JAX, or
CasADi.
Once the model is defined, users can optimize it by selecting and running an optimizer of their choice from the library of optimization algorithms available in modOpt.
modOpt as a library of optimization algorithms
modOpt as a library includes several gradient-based and gradient-free optimization algorithms.
It provides interfaces to more than a dozen general-purpose optimizers,
along with fully transparent implementations of several educational optimization algorithms.
The general-purpose optimizers available in modOpt include SLSQP, PySLSQP, OpenSQP,
SNOPT, IPOPT, Trust-Constr, BFGS, L-BFGS-B, Nelder-Mead, COBYLA, COBYQA, and CVXOPT.
The ConvexQPSolvers optimizer provides an interface to more than 15 QP solvers
available through the qpsolvers package.
Note that PySLSQP, SNOPT, IPOPT, COBYQA, CVXOPT, and qpsolvers must be
installed separately if users wish to utilize them.
The modular and transparent educational algorithms in modOpt include
Steepest Descent, Quasi-Newton, Newton, Newton-Lagrange, Quadratic Penalty,
SQP, InteriorPoint, PSO, Nelder-Mead Simplex, and Simulated Annealing.
modOpt as a library
modOpt as a development environment for optimization algorithms
modOpt’s modular development environment facilitates the construction of optimization algorithms using self-contained modules. When implementing new algorithms, developers can reuse stable and efficient modules already available in modOpt, eliminating the need to build these components from scratch. Similarly, existing algorithms in modOpt can be customized for specific applications by modifying only the relevant modules. Additionally, modOpt’s benchmarking capabilities allow users to conveniently perform comparative studies of their algorithms against standard ones included in the library.
modOpt as a development environment
Getting Started
To install and start using modOpt, please read the Getting Started page.
Citation
If you use modOpt in your work, please use the following reference for citation:
@article{joshy2026modopt,
title={modOpt: A modular development environment and library for optimization algorithms},
author={Joshy, Anugrah Jo and Hwang, John T},
journal={Advances in Engineering Software},
volume={213},
pages={104084},
year={2026},
publisher={Elsevier},
doi={10.1016/j.advengsoft.2025.104084}
}
Contents
- Getting Started
- Defining Optimization Problems
- Solving Optimization Problems
- Post-processing
- New Optimizer Development
- Benchmarking
- Developer Docs
- Tutorials
- Examples
- API Reference
- modopt.Optimizer
- modopt.optimize
- modopt.Problem
- modopt.ProblemLite
- modopt.JaxProblem
- modopt.CasadiProblem
- modopt.CSDLAlphaProblem
- modopt.OpenMDAOProblem
- modopt.CSDLProblem (deprecated)
- modopt.postprocessing
- Educational algorithms
- Performant algorithms
- modopt.line_search_algorithms
- modopt.merit_functions
- modopt.approximate_hessians
- modopt.ConvexQPSolvers
- modopt.CUTEstProblem
- modopt.benchmarking
- Contributing to modOpt
- Changelog
- License