gekko

Python GEKKO MINLP optimization of energy system: How to build intermediates that are 2D arrays

落爺英雄遲暮 提交于 2021-02-20 15:22:16
问题 I am currently implementing a MINLP optimization problem in Python GEKKO for determining the optimal operational strategy of a trigeneration energy system. As I consider the energy demand during all periods of different representative days as input data, basically all my decision variables, intermediates, etc. are 2D arrays. I suspect that the declaration of the 2D intermediates is my problem. Right now I used list comprehension to declare 2D intermediates, but it seems like python cannot use

Unreachable server working with GEKKO. What is going on?

☆樱花仙子☆ 提交于 2021-02-10 16:00:44
问题 I'm trying to run / solve my model with GEKKO. Yesterday it was working but today I receive an error with the server. Does Pyomo need to connect to the server or I can model with it without server connections? File "C:\ProgramData\Anaconda3\lib\site-packages\gekko\gekko.py", line 2024, in solve raise ImportError('Results files not found. APM did not find a solution or the server is unreachable.') ImportError: Results files not found. APM did not find a solution or the server is unreachable.

How to implement dynamic parameter estimation with missing data in Gekko?

早过忘川 提交于 2021-02-10 16:00:34
问题 Going back and forth through the documentation, I was able to set-up a dynamic parameter estimation in Gekko. Here's the code, with measurement values shown below (the file is named MeasuredAlgebrProductionRate_30min_18h.csv on my system, and uses ; as separator): import numpy as np import matplotlib.pyplot as plt from gekko import GEKKO #%% Read measurement data from CSV file t_x_q_obs = np.genfromtxt('MeasuredAlgebrProductionRate_30min_18h.csv', delimiter=';') #t_obs, x_obs, q_obs = t_xq

How to implement dynamic parameter estimation with missing data in Gekko?

风流意气都作罢 提交于 2021-02-10 15:59:07
问题 Going back and forth through the documentation, I was able to set-up a dynamic parameter estimation in Gekko. Here's the code, with measurement values shown below (the file is named MeasuredAlgebrProductionRate_30min_18h.csv on my system, and uses ; as separator): import numpy as np import matplotlib.pyplot as plt from gekko import GEKKO #%% Read measurement data from CSV file t_x_q_obs = np.genfromtxt('MeasuredAlgebrProductionRate_30min_18h.csv', delimiter=';') #t_obs, x_obs, q_obs = t_xq

Unreachable server working with GEKKO. What is going on?

别来无恙 提交于 2021-02-10 15:57:09
问题 I'm trying to run / solve my model with GEKKO. Yesterday it was working but today I receive an error with the server. Does Pyomo need to connect to the server or I can model with it without server connections? File "C:\ProgramData\Anaconda3\lib\site-packages\gekko\gekko.py", line 2024, in solve raise ImportError('Results files not found. APM did not find a solution or the server is unreachable.') ImportError: Results files not found. APM did not find a solution or the server is unreachable.

Optimal trajectory to minimize force, issues with final conditions

谁说我不能喝 提交于 2021-02-10 09:47:58
问题 I am trying to find a trajectory that minimizes the squared integral of the force to move a block from one point to another. Here are the system dynamics: dx/dt = v (derivative of position is velocity) dv/dt = u (derivative of velocity is acceleration, which is what I am trying to minimize) min integral of u**2 The initial conditions and final conditions are: x(0) = 0, v(0) = 0 x(1) = 1, v(1) = 1 I have implemented this in python using the Gekko library, but I cannot get the final conditions

Trajectory Planner with GEKKO is not able to handle given goal velocities

两盒软妹~` 提交于 2021-02-09 07:30:22
问题 I have set up a Trajectory Planner for a vehicle with GEKKO, so basically i used a kinematic single-track model, which in nonlinear. It all works fine until i get to the part, when i give a goal velocity that is not equal to 0. I can give all other goal states (x-position, y-position, steering angle and yaw angle) without problems, but if i give a goal velocity, the optimizer exits with the following code: Converged to a point of local infeasibility. Problem may be infeasible. I also tried

Trajectory Planner with GEKKO is not able to handle given goal velocities

♀尐吖头ヾ 提交于 2021-02-09 07:26:14
问题 I have set up a Trajectory Planner for a vehicle with GEKKO, so basically i used a kinematic single-track model, which in nonlinear. It all works fine until i get to the part, when i give a goal velocity that is not equal to 0. I can give all other goal states (x-position, y-position, steering angle and yaw angle) without problems, but if i give a goal velocity, the optimizer exits with the following code: Converged to a point of local infeasibility. Problem may be infeasible. I also tried

Trajectory Planner with GEKKO is not able to handle given goal velocities

自作多情 提交于 2021-02-09 07:26:02
问题 I have set up a Trajectory Planner for a vehicle with GEKKO, so basically i used a kinematic single-track model, which in nonlinear. It all works fine until i get to the part, when i give a goal velocity that is not equal to 0. I can give all other goal states (x-position, y-position, steering angle and yaw angle) without problems, but if i give a goal velocity, the optimizer exits with the following code: Converged to a point of local infeasibility. Problem may be infeasible. I also tried

Python Optimization using gekko

回眸只為那壹抹淺笑 提交于 2021-02-08 04:10:07
问题 I'm using gekko for the first time to do optimization with python. I don't have a lot of experience with python, but I know the basics. I get error code -13 when I run the optimization: #import Gekko optimization package from gekko import gekko import math #create gekko model m = gekko() #constants pi = math.pi #initialize needed variables frictionLoss = m.Var() empirical = m.Var(value=1) widthInlet = m.Var(value=1) #in meters heightInlet = m.Var(value=1) #in meters diameterOutlet = m.Var