[英]Diference between IPOPT message and Gekko message
Good morning, I'm currently using Gekko in dynamic optimization.早上好,我目前正在使用 Gekko 进行动态优化。 The simulation I've run indicates that it´s converging.
我运行的模拟表明它正在收敛。
from gekko import GEKKO
m = GEKKO()
x = m.Array(m.Var,3)
m.Equation(3*x[0]-2*x[1]**2==7)
m.Equation(4*x[0]-x[2]**2==11)
m.Equation(3*x[0]-2*x[1]**2-7==(3*x[0]-2*x[1]**2-7)**2)
m.Minimize(4*x[0]**2 + 2*x[1]**2 + 2*x[2]**2\
-33*x[0] + 16*x[1] - 24*x[2])
m.solve()
Number of objective function evaluations = 62
Number of objective gradient evaluations = 10
Number of equality constraint evaluations = 63
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 30
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 28
Total CPU secs in IPOPT (w/o function evaluations) = 0.024
Total CPU secs in NLP function evaluations = 0.002
EXIT: Optimal Solution Found.
The solution was found.
The final value of the objective function is 343.408879673171
---------------------------------------------------
Solver : IPOPT (v3.12)
Solution time : 4.040000001259614E-002 sec
Objective : 343.408879673171
Successful solution
---------------------------------------------------
However, when I review the results of the IPOPT details it indicates the following error.但是,当我查看 IPOPT 详细信息的结果时,它指示以下错误。
27r 3.4340888e+02 1.20e-06 3.85e-01 -9.0 5.66e-06 1.8 1.00e+00 8.54e-01f 1
28r 3.4340888e+02 1.20e-08 5.23e-03 -9.0 1.20e-06 1.3 1.00e+00 9.86e-01h 1
Cannot recompute multipliers for feasibility problem. Error in eq_mult_calculator
How can I interpret this error?我该如何解释这个错误? Thank you very much for your attention.
非常感谢您的关注。
From IPOPT issue tracking #69 :来自IPOPT 问题跟踪 #69 :
There is now a new return code (FOUND_FEASIBLE_POINT and Found_Feasible_Point) that is returned when Ipopt found a feasible for a square problem, but the multipliers might be off.
现在有一个新的返回代码(FOUND_FEASIBLE_POINT 和 Found_Feasible_Point),当 Ipopt 发现平方问题可行时返回,但乘数可能关闭。
The problem is with equation 3 that is a degenerate equation and makes it so the Lagrange multiplier calculation may be wrong:问题在于方程 3 是一个退化方程,因此拉格朗日乘数计算可能是错误的:
m.Equation(3*x[0]-2*x[1]**2-7==(3*x[0]-2*x[1]**2-7)**2)
It is degenerate because m.Equation(3*x[0]-2*x[1]**2==7)
is also included.它是退化的,因为
m.Equation(3*x[0]-2*x[1]**2==7)
也包括在内。 Equation 3 is not needed to solve the problem.解决问题不需要公式 3。 Your problem may also have a degenerate equation but the solution is still valid.
您的问题也可能有退化方程,但解仍然有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.