了解有关 APPPT 求解器的更多信息

Tit*_*uah 4 optimization nonlinear-optimization mixed-integer-programming gekko

我有几个关于 APOPT 如何解决 MINLP 的问题。

  • APOPT 使用什么非线性规划方法(内部点、信赖域等)?
  • APOPT 如何处理混合整数(B&B、外近似、广义弯曲分解等)?

Joh*_*ren 5

APOPT 是一种使用分支定界的主动集顺序二次规划 (SQP) 求解器。APOPT 使用热启动方法来加速连续的非线性编程 (NLP) 解决方案。WikipediaAPMonitor 文档APOPT.com提供了有关 APOPT 的更多信息。2013 年 INFORMS 演示文稿和 2014 年 APMonitor CACE 论文中提供了基准信息。

\n\n
    \n
  1. Hedengren, JD、Mojica, JL、Lewis, AD 和 Nikbakhsh, S.,结合内点和主动集方法的 MINLP, INFORMS 年会,明尼苏达州明尼阿波利斯,2013 年 10 月。
  2. \n
  3. Hedengren, JD 和 Asgharzadeh Shishavan, R.、Powell, KM 和 Edgar, TF,APMonitor 中的非线性建模、估计和预测控制,计算机和化学工程,第 70 卷,第 70 页。133\xe2\x80\x93148,2014年,doi:10.1016/j.compchemeng.2014.04.013。
  4. \n
\n\n

这是在获取包后使用 Python Gekko 解决的示例 MINLP 问题pip install gekko

\n\n
from gekko import GEKKO\nm = GEKKO() # Initialize gekko\nm.options.SOLVER=1  # APOPT is an MINLP solver\n\n# optional solver settings with APOPT\nm.solver_options = [\'minlp_maximum_iterations 500\', \\\n                    # minlp iterations with integer solution\n                    \'minlp_max_iter_with_int_sol 10\', \\\n                    # treat minlp as nlp\n                    \'minlp_as_nlp 0\', \\\n                    # nlp sub-problem max iterations\n                    \'nlp_maximum_iterations 50\', \\\n                    # 1 = depth first, 2 = breadth first\n                    \'minlp_branch_method 1\', \\\n                    # maximum deviation from whole number\n                    \'minlp_integer_tol 0.05\', \\\n                    # covergence tolerance\n                    \'minlp_gap_tol 0.01\']\n# Initialize variables\nx1 = m.Var(value=1,lb=1,ub=5)\nx2 = m.Var(value=5,lb=1,ub=5)\n# Integer constraints for x3 and x4\nx3 = m.Var(value=5,lb=1,ub=5,integer=True)\nx4 = m.Var(value=1,lb=1,ub=5,integer=True)\nm.Equation(x1*x2*x3*x4>=25)\nm.Equation(x1**2+x2**2+x3**2+x4**2==40)\nm.Obj(x1*x4*(x1+x2+x3)+x3) # Objective\nm.solve(disp=False) # Solve\nprint(\'x1: \' + str(x1.value))\nprint(\'x2: \' + str(x2.value))\nprint(\'x3: \' + str(x3.value))\nprint(\'x4: \' + str(x4.value))\nprint(\'Objective: \' + str(m.options.objfcnval))\n
Run Code Online (Sandbox Code Playgroud)\n\n

迭代摘要提供了有关寻找解决方案的分支定界过程的更多信息。

\n\n
 ----------------------------------------------\n Steady State Optimization with APOPT Solver\n ----------------------------------------------\nIter:     1 I:  0 Tm:      0.00 NLPi:    7 Dpth:    0 Lvs:    3 Obj:  1.70E+01 Gap:       NaN\n--Integer Solution:   1.75E+01 Lowest Leaf:   1.70E+01 Gap:   3.00E-02\nIter:     2 I:  0 Tm:      0.00 NLPi:    5 Dpth:    1 Lvs:    2 Obj:  1.75E+01 Gap:  3.00E-02\nIter:     3 I:  0 Tm:      0.00 NLPi:    6 Dpth:    1 Lvs:    2 Obj:  1.75E+01 Gap:  3.00E-02\n--Integer Solution:   1.75E+01 Lowest Leaf:   1.70E+01 Gap:   3.00E-02\nIter:     4 I:  0 Tm:      0.00 NLPi:    6 Dpth:    2 Lvs:    1 Obj:  2.59E+01 Gap:  3.00E-02\nIter:     5 I:  0 Tm:      0.00 NLPi:    5 Dpth:    1 Lvs:    0 Obj:  2.15E+01 Gap:  3.00E-02\n No additional trial points, returning the best integer solution\n Successful solution\n\n ---------------------------------------------------\n Solver         :  APOPT (v1.0)\n Solution time  :   1.609999999345746E-002 sec\n Objective      :    17.5322673012512     \n Successful solution\n ---------------------------------------------------\n\nx1: [1.3589086474]\nx2: [4.5992789966]\nx3: [4.0]\nx4: [1.0]\nObjective: 17.532267301\n
Run Code Online (Sandbox Code Playgroud)\n