# Tag: gekko

## Difference between fixing a variable and using a constant in GEKKO

I am solving a large scale optimization problem using Python GEKKO. Some variables of the model have to not change during the optimization process. So I was wondering what is the difference between using the m.fix GEKKO method on the variables (m.Var) that I want to be constant, or replacing the variables with constants declared with m.Const. I use IMODE

## Get variable values at each iteration of GEKKO optimization

I would like to get the value of the variables at each iteration of the optimization process when using Python GEKKO. For example, the following code from the documentation (https://gekko.readthedocs.io/en/latest/quick_start.html#example) solves problem HS71: The output displayed in the console is the following: This includes the value of the objective function at each iteration, but I would also like to get

## mixed integer programming optimization

I am trying to understand how gekko and its different types of custom variables work. So I wrote a very simple optimization problem, but it won’t find the optimal solution, at least this is what i think the error message means. The code is a simple set switch combination (braco_gas and braco_eh, both binaries) multiplied by some weights (vazao and

## Constrained Multi-Linear Regression using Gekko

I have a multilinear regression problem where I have the prior information about the range of the output (dependent variable y) – The prediction must always lie in that range. I want to find the coefficients (upper and lower bound) of each feature (independent variables) in order to make the linear regression model restricted to the desired range of output.

## GEKKO variable update in real time

How do I need to setup m.time and update the initial conditions if I want to use GEKKO in an online simulation that updates every second? I have tried: but it doesn’t seem to update the values. I’m using IMODE = 4 This is just a dynamic simulation application. No control at the moment. Answer Gekko manages the initial conditions

## How could constraints be dynamically constructed in gekko?

I’m a newbie in gekko, and want to use it in my linear programming problems. I have variable names, costs, minimum and maximum bounds in separate dictionaries (my_vars, Cost, Min and Max) with …

## Are there IEC 61131 / IEC 61499 PLC function blocks that use OPA UA to transport data?

I have a machine learning and advanced control application in Python (TensorFlow + Gekko) that I need to integrate with a Programmable Logic Controller (PLC) that provides the data acquisition and final element control. Can I use a rack-mounted Linux (preferred) or Windows Server as the computational engine, with data transport through OPC-UA (OLE for […]