我希望这是这个问题的正确 stackexchange;如果没有,请指导我!
我在Linux上。我已经安装了 IPOPT 和 AMPL,以及所需的所有第三方东西:ASL、HSL、Lapack、Metis、Mumps。
当我使用二进制或整数变量从 AMPL 运行求解器时,IPOPT 将它们转换为连续的。有谁知道为什么或如何解决它?这是一个最小的例子。
文件 test.mod:
option solver ipopt;
var x, integer;
maximize best: x;
s.t. cons1: x <= 5;
solve;
当我运行它时(第二行输出是问题):
$ ampl t2.mod
Ipopt 3.10.2:
==> Warning: Treating 0 binary and 1 integer variables as continous.
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************
NOTE: You are using Ipopt by default with the MUMPS linear solver.
Other linear solvers might be more efficient (see Ipopt documentation).
This is Ipopt version 3.10.2, running with linear solver mumps.
Number of nonzeros in equality constraint Jacobian...: 0
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 0
// lots more output
谢谢你的帮助!