简体   繁体   English

如何在Gekko获得目标函数的价值

[英]How to get value for objective function in Gekko

I have a working program in Gekko that outputs 我在Gekko有一个工作程序输出

EXIT: Optimal Solution Found.

 The solution was found.

 The final value of the objective function is   -17.8543906759043     

---------------------------------------------------
 Solver         :  IPOPT (v3.12)
 Solution time  :   0.158899999994901      sec
 Objective      :   -17.8543906759043     
 Successful solution
 ---------------------------------------------------

All I want to do is save the value for the objective function. 我想要做的就是保存目标函数的值。 Is there a way to do this? 有没有办法做到这一点?

You can get the objective function with: 您可以通过以下方式获得目标函数:

m.options.OBJFCNVAL

There is additional documentation on the objective function value , solver iterations , solve time , solver status , and other parameters. 关于目标函数值求解器迭代求解时间求解器状态和其他参数,还有其他文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM