gekko

Global minimum versus local minima solution with Python Gekko

Global minimum versus local minima solution with Python Gekko Question: A simple optimization example has 2 local minima at (0,0,8) with objective 936.0 and (7,0,0) with objective 951.0. What are techniques to use local optimizers in Python Gekko (APOPT,BPOPT,IPOPT) to find a global solution? from gekko import GEKKO m = GEKKO(remote=False) x = m.Array(m.Var,3,lb=0) x1,x2,x3 …

Total answers: 2

Gekko model with variable delay

Gekko model with variable delay Question: I have a system with a non-constant delay. Does gekko support this type of problem and can it be handled in the MHE and MPC formulation? Reading the docs I can see how to implement the delay, but I am not sure how the state estimation part of the …

Total answers: 1

How do I find GEKKO application success status?

How do I find GEKKO application success status? Question: I am running m.solve() in a try .. except construct to elegantly handle any exceptions raised by the solver due to maximum iterations or convergence to an infeasibility but want to interrogate APPINFO and APPSTATUS to determine if a solution was found. I was surprised to …

Total answers: 1

Gekko and Intermediate variables

Gekko and Intermediate variables Question: I am using GEKKO to fit a function. The form of a function is known. It looks like a sum of similar subfunctions with various parameters, each subfunction has its own set of parameters to find (optimize)… I don’t think I understand the use of intermediate variables fully and would …

Total answers: 1

Bioreactor Simulation for Ethanol Production using GEKKO

Bioreactor Simulation for Ethanol Production using GEKKO Question: I am trying to simulate a DAE system that solves a fed-batch bioreactor problem for ethanol production using GEKKO. This is done so I can later optimize it more easily to maximize Ethanol production. It was previously solved in MATLAB and produced the results as shown in …

Total answers: 1

How do I display solution in GEKKO GUI?

How do I display solution in GEKKO GUI? Question: I would like to explore the functionality of the GEKKO web GUI for visualising results as described in https://www.researchgate.net/publication/326740143_GEKKO_optimization_suite. I have enabled m.options.WEB=1 and solved with m.solve(GUI=True). The GUI spawns but with no trends as expected (see below). How do I show the variable content and …

Total answers: 2

How to put a fixed specific quantity of items to be allowed in a bin

How to put a fixed specific quantity of items to be allowed in a bin Question: I have found this code for a bin packing problem in Google OR-tools. https://developers.google.com/optimization/bin/bin_packing#python_3 However, it does not have a volume constraint. What if the total quantity/number of items packed in a bin (which is printed in the output …

Total answers: 1

How to check if python package is latest version programmatically?

How to check if python package is latest version programmatically? Question: How do you check if a package is at its latest version programmatically in a script and return a true or false? I can check with a script like this: package=’gekko’ import pip if hasattr(pip, ‘main’): from pip import main as pipmain else: from …

Total answers: 9

How should I model log or sqrt with GEKKO? Constraints

How should I model log or sqrt with GEKKO? Constraints Question: I’m trying to develop my constraints with GEKKO, and I need to include some mathematical operations as log, coth or sqrt. I tried initially with my habitual procedures, using numpy or mpmath, but I figure out that using GEKKO I need to use their …

Total answers: 2