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:

  1. The built-in Problem class,

  2. The built-in ProblemLite class,

  3. CSDL or CSDL_alpha,

  4. OpenMDAO,

  5. JAX, or

  6. 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_library

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_lib

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