Skip to content

GEKKO

BYU PRISM Lab

GEKKO is a Python modeling and optimization toolkit for differential algebraic systems, supporting process simulation, parameter estimation, mixed-integer optimization, and nonlinear predictive control.

Catalog updated ·

Overview

GEKKO provides a Python interface to the APMonitor optimization suite for equation-based and data-driven modeling. Its documented focus includes time series and differential algebraic equation systems, with applications in simulation, estimation, and process optimization. It is a modeling toolkit rather than a pretrained predictive model: users define the mathematical relationships and objectives for their own problem.

Models are assembled from constants, parameters, variables, intermediate expressions, equations, and objectives. A symbolic model represents a data point or time instance, while the selected solution mode extends it across observations or a time horizon. The APMonitor backend compiles the model, analyzes its sparse structure, and supplies derivatives to optimization solvers. For differential algebraic systems, orthogonal collocation converts the dynamic problem into algebraic equations. Solution results are written to results.csv and loaded back into GEKKO's Python variables.

Documented workflows include steady-state simulation, parameter updates, real-time optimization, moving horizon estimation, and nonlinear control. Dynamic simulation, estimation, and optimization can use simultaneous or sequential solution approaches. GEKKO also supports linear, quadratic, nonlinear, and mixed-integer programming, allowing discrete decisions and continuous dynamics within the documented problem classes.

Execution can use a remote server, which is the default, or a local CPU through the remote=False option. The README identifies bundled executables for several platforms, but these excerpts do not establish tested compatibility or comparative performance. Models may fail to converge; APMonitor provides an infeasibility report and diagnostic settings to help investigate initialization and inconsistent equations.

Key Features

  • Symbolic model construction using constants, parameters, variables, intermediate expressions, equations, and maximization or minimization objectives.
  • Support for linear, quadratic, nonlinear, and mixed-integer optimization, alongside differential algebraic equations and complementarity-constrained problems.
  • Steady-state and dynamic modes for simulation, parameter estimation, real-time optimization, and nonlinear predictive control.
  • Simultaneous and sequential approaches to dynamic simulation, estimation, and optimization.
  • Backend model compilation, sparse derivative generation through automatic differentiation, and orthogonal collocation for differential algebraic systems.
  • Remote or local execution, with results returned to Python variables and infeasibility reports available for unsuccessful solves.

Use Cases

  • Intended evaluation: formulate a process model with differential and algebraic equations, then compare simulated trajectories with representative process measurements.
  • Intended evaluation: fit uncertain process parameters or assess moving horizon estimation using a measured time series and a user-defined model.
  • Intended evaluation: prototype nonlinear predictive control with process constraints and an explicit operating objective before considering deployment.
  • Intended evaluation: represent discrete operating choices and continuous process variables in a mixed-integer optimization problem.

How to Use

  1. Start with the official documentation and modeling examples. Select a simulation, estimation, or optimization workflow that matches your intended problem.
  2. Consult the repository README for the supplied pip installation instructions and the PyPI listing for package information. Do not treat packaging classifiers as evidence of tested compatibility.
  3. Define your constants, parameters, variables, equations, and objective. For dynamic work, prepare the relevant time horizon and observations according to the documentation; distinguish measured inputs from quantities to estimate.
  4. Choose the appropriate solution mode and execution location. Remote solving is the documented default; remote=False selects local execution. Consider whether your inputs are appropriate for remote processing.
  5. Evaluate a representative example, inspect the values returned to Python, and compare them with your expected behavior. If the solve fails, examine infeasibilities.txt and consult the documented diagnostic and initialization options before expanding the model.

Sources and verification

This entry describes capabilities documented by the linked project sources. Catalog edits are not evidence of a successful run, compatibility test or scientific performance evaluation.

Read the editorial and verification policy

Related resources

AlabOS

Open Source

AlabOS manages the workflows of an autonomous laboratory, coordinating samples, tasks and device actions through a database-backed orchestration service.

Open sourcePython

Materials Discovery · Lab Automation · Process Optimization

Atlas is a Bayesian optimization package for experimental science, providing Gaussian-process planners for self-driving-laboratory workflows.

Open sourcePython

Lab Automation · Process Optimization

Ax

Platforms

Ax is a Python platform for adaptive experiments, including Bayesian optimization powered by BoTorch.

Open sourcePython

Process Optimization

BayBE

Open Source

BayBE is a Python toolbox for Bayesian experimental design that recommends parameter configurations from defined search spaces, objectives and measurements, including chemistry-aware and multi-target workflows.

Open sourcePython

Lab Automation · Process Optimization

BoFire

Open Source

BoFire is a Python framework for experimental design and Bayesian optimization, supporting mixed variables, constraints, molecular representations and iterative candidate selection.

Open sourcePython

Lab Automation · Process Optimization

BoTorch

Open Source

BoTorch is a PyTorch library for constructing Bayesian optimization models, acquisition functions and candidate generation workflows.

Open sourcePython

Process Optimization

Related guides

Workflows

Evaluating AI workflows for chemical engineering

Plan evaluations that separate process modelling, reaction optimisation and control. Define inputs, operating limits, time-aware validation and approval gates before considering operational use.