Numerical Optimization with Python GEKKO

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hello, Thanks for the informative videos. I am facing problems optimizing quadratic equations which have one variable. (like : 3x^2+5x+5=24). I know how to solve it, but I don't understand how can I optimize it using GEKKO. Can you please give me some light?

mohammadsaeidanwar
Автор

Hello, thank you for the useful video!
Could you help me a bit? I am trying to solve the optimization problem (minimizing target function) and I have 3 variables: r, poly, eps.
The upper boundary of the variable poly depends on the r variable. Could I specify the poly variable with the dynamically changing of the upper boundary? Which type of GEKKO variable I should use? It should look like here:
def max_poly(r):
...
return poly_ub
r = m.Var(1, lb=1, ub=5)
poly = ????(1, lb=1, ub=max_poly(r), integer=True)

alexandr
Автор

Can i import a simulator in c++ with gekko and use the available optimization in gekko

dinesh
Автор

Gekko is quite confusing, can you make it more straightforward like PuLP to minimize, maximize for example? I have been searching how to maximize using Gekko but can't find an example.

YKLiu-obsd
Автор

Hi there, thanks for sharing this great videos. I have a problem runing a script, i got this message "cannot import name 'GEKKO' from partially initialized module 'gekko'".
Afer this message a tried this :


try:
from pip import main as pipmain
except:
from pip._internal import main as pipmain
pipmain(['install', 'gekko'])


now a got this new mesagge "TypeError: 'module' object is not callable"


Any ideas how to solve it? thanks in advance.


Regards from Mexico

sinuheso
Автор

Thanks for videos,
if one (or more) constraint(s) of an objective function is in the form of probability function, is Python optimization capable of handling that?

edmonda.
Автор

Greetings, First of all thanks for sharing the knowledge and videos. I am having trouble defining a function for a GEKKO model. I receive an AttributeError: __float__ whenever it tries to run the line for defining the following function
I solve for h1 and h0
I use some constants (Ks = 0.031, d = 1.74, re = 0.0059, qL = 0.03773, W =12.0, h2 = 0.505)

I have two equations

first equation runs fine : == qL)

Problem is with this one : math.log((h1-d)/re) == -qL)
I have Some constraints
h0 and h1 should be larger than d
h0 should be larger than h1


I also have another question: SO I have a third variable that I want to find its value along with the h0 and h1 for an another case. But, this variable is represented by one of two functions, depending on its value. That is to say, when it has a value from 0 to 8 it is represented by a function, "F1" for example, and when it is higher than 8 it is represented by another function, "F2" for example. Can we solve this case numerically in python? using GEKKO as well or there is another solver?
Thanks and looking forward for your reply

yousefabdalaal