skillfed

gekko

Machine learning and optimization for dynamic systems

gekko v1.3.2 141.1K downloads/30d#11,251 on PyPI709
Permissive license MIT Active released

What it is and what it does

GEKKO is an optimization and machine learning framework that translates mathematical models of dynamic systems into byte-code and solves them using large-scale solvers. It specializes in problems involving differential algebraic equations (DAEs)—systems where variables evolve over time according to differential equations and algebraic constraints. The package supports a wide range of problem formulations: from simple linear and quadratic programs to complex mixed-integer nonlinear problems, as well as control and estimation tasks like model predictive control and moving horizon estimation.

The package works by building a symbolic representation of your problem—defining variables, equations, and objectives—then compiling that representation and passing it to industrial-grade solvers (APOPT and IPOPT) with automatically computed sparse derivatives. It includes data-cleaning utilities and is designed to run on Windows, Linux, macOS, and ARM processors. GEKKO is intended for engineers and researchers solving real-world optimization and control problems, from parameter estimation and regression to real-time optimization and advanced process control.

Use it for:

  • Solve differential algebraic equation systems with constraints and optimization objectives over a time horizon
  • Build and tune model predictive control (MPC) systems for process automation or robotics
  • Perform parameter estimation and data regression on dynamic system models
  • Formulate and solve mixed-integer nonlinear programs (MINLP) for scheduling or resource allocation
  • Implement moving horizon estimation (MHE) for state estimation in real-time systems
  • Conduct sensitivity analysis and optimization of complex engineering systems

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

GEKKO is a Python package for optimization and machine learning that specializes in solving dynamic systems described by differential algebraic equations, with support for linear, quadratic, nonlinear, and mixed-integer programming problems.

Yes. GEKKO is actively maintained, has no known vulnerabilities, installs with minimal friction (numpy only), and is licensed permissively. It fills a specialized niche in dynamic optimization and DAE solving that few Python packages address directly. Install if you need to solve differential algebraic equations, implement model predictive control, or tackle mixed-integer nonlinear optimization problems.

Install

gekko on PyPI

pip

pip install gekko

uv

uv add gekko

poetry

poetry add gekko

Installing gekko

Before you install

Low install friction; pure Python wheel with only numpy as a runtime dependency. Active maintenance with recent commits and a stable production release status.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and proprietary projects.

Quickstart

pip install gekko
import gekko
m = gekko.GEKKO()
x = m.Var()
m.Equation(x**2 == 4)
m.solve()
print(x.value)

Verify before relying

  • Whether the bundled APOPT and IPOPT solvers are included in the wheel or require separate installation
  • Performance characteristics and scalability limits for large-scale DAE systems
  • Whether cloud/edge deployment modes require additional configuration or credentials

Package facts

License MIT (permissive)
Python support supports the current Python release (>=2.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — numpy
Maintenance actively maintained — 226 days since the last release
Last repo commit
First released
Downloads 141,112/month — #11,251 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gekko-1.3.2-py3-none-any.whl

Keywords: differential, deep, learning, solver, equations, optimization, mixed-integer

Development Status :: 5 - Production/StableProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

differential algebraic equations solvernonlinear optimization pythondynamic systems optimizationmodel predictive controlmixed-integer programmingmachine learning optimizationDAE solver
optimizationcontrol-systemsdifferential-equations

More Mathematics packages