Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gekko]

GEKKO (pip install gekko) is a Python package for machine learning and optimization of mixed-integer and differential algebraic equations. It is coupled with large-scale solvers for linear, quadratic, nonlinear, and mixed integer programming (LP, QP, NLP, MILP, MINLP). Modes of operation include parameter regression, dynamic simulation, and nonlinear predictive control. GEKKO is an object-oriented Python library and is released under the MIT License.

Filter by
Sorted by
Tagged with
1 vote
2 answers
213 views

Optimization Problem with Array Index as decision variable

I am trying to formulate an optimization problem where the decision variable is an index of the input array as part of the formulation. For example, I have the following term (this is simplified): $A[...
Kasparov92's user avatar
2 votes
0 answers
127 views

Initial condition sensitivity issue in MINLP with Gekko

I'm having a problem with sensitivity to initial conditions in an MINLP problem with Gekko. My test case is finding $a$ and $b$ such that $\pi^a/b = \pi^2/6$. So the solution is $a=2$ and $b=6$. I set ...
Jostein Trondal's user avatar
2 votes
1 answer
302 views

Using spline or piece wise function as input (intermediate) in Gekko

Simple paraphrase of my question is what is the best way to use a table or curve as an input for an optimization problem in Gekko (and/or AP Monitor)? For example, I have simplified atmospheric ...
nomad's user avatar
  • 21
4 votes
1 answer
315 views

What's the right choice of variable settings for setting up my optimal control problem?

This is a followup to my previous question here I have the following dynamical system, $\frac{d \phi}{dt} = -M^TDM\phi \tag{1}\label{1}$ $\frac{d \hat\phi}{dt} = -M^T\tilde{D}M\hat \phi \tag{2} \...
Natasha's user avatar
  • 421
3 votes
1 answer
1k views

Setting up optimization problem in GEKKO

I have the following dynamical system, $\frac{d \phi}{dt} = -M^TDM\phi \tag{1}\label{1}$ $\frac{d \hat\phi}{dt} = -M^T\tilde{D}M\hat \phi \tag{2} \label{2}$ $\eqref{1}$ represents the exact ...
Natasha's user avatar
  • 421
4 votes
1 answer
647 views

Can I solve a model in GEKKO with Black Box, Simulated Annealing or GA solvers?

I'm trying to use my current GEKKO model with different solvers methodologies. I don't know if I can also use global optimisation solvers as GA, Simulated Annealing o Differential Evolution. I need ...
srgam's user avatar
  • 245
3 votes
2 answers
1k views

How to include penalty in a Objective Function with Python? GEKKO

I'm trying to include a "great M" penalty in my objective function. I want use the entry x vector values as entry values in a function. A fixed maximum value is took initially for the returned value ...
srgam's user avatar
  • 245
5 votes
2 answers
916 views

MINLP with GEKKO - Modeling discrete variables

I'm trying to define a MINLP optimization problem with GEKKO in Python, and I want to use some variables with fixed values. For my first variable, x1, I need to define the following values (as would ...
srgam's user avatar
  • 245