简体   繁体   English

使用逐次二次规划 (SQP) 进行多目标优化的 Python 包

[英]Python packages for multi-objective optimization using Successive Quadratic Programming (SQP)

Following are the characteristics of my problem:以下是我的问题的特点:

Objective function: two non-linear functions and one linear function目标函数:两个非线性函数和一个线性函数

Decision variable: two integer variables - can be relaxed as real (thus, problem can be INLP or NLP)决策变量:两个整数变量 - 可以放松为实数(因此,问题可以是 INLP 或 NLP)

Constraint: three (two bounding constraint and one relationship constraint)约束:三个(两个边界约束和一个关系约束)

Problem type: non-convex问题类型:非凸

Solution required: Global optimum所需解决方案:全局最优

Is there any python solvers to solve the above multi-objective optimization problem using Successive Quadratic Programming (SQP) or Interior Point Methods or other appropriate NLP solution methods?是否有任何 python 求解器可以使用连续二次规划 (SQP) 或内点方法或其他适当的 NLP 求解方法来解决上述多目标优化问题?

You could try one of these two:您可以尝试以下两种方法之一:

  • BONMIN , EPL license, nonlinear interior point solver. BONMIN ,EPL 许可证,非线性内点求解器。
  • Knitro , commercial, branch-and-bound or MISQP. Knitro ,商业,分支和绑定或 MISQP。

If unsure which one works best, you can model your problem with CasADi .如果不确定哪一个效果最好,您可以使用CasADi 为您的问题建模。 It has a convenient symbolic systems, and backend plugins for both of these solvers.它有一个方便的符号系统,以及这两个求解器的后端插件。 Here is for instance a MINLP example with CasADi .例如,这是一个带有 CasADi 的 MINLP 示例

Here is a simple example of an MINLP solved with Python Gekko and the APOPT solver:下面是一个使用 Python Gekko 和 APPT 求解器求解的 MINLP 的简单示例:

from gekko import GEKKO
m = GEKKO() # create GEKKO model
# create binary variables
x1 = m.Var(integer=True,lb=0,ub=1) 
x2 = m.Var(integer=True,lb=0,ub=1)
m.Minimize(4*x1**2-4*x2*x1**2+x2**2+x1**2-x1+1)
m.options.SOLVER = 1 # APOPT solver
m.solve()
print('x1: ' + str(x1.value[0]))
print('x2: ' + str(x2.value[0]))

Here is another example with equality and inequality constraints and integer variables (Hock Schittkowski #71 benchmark but with integer variables).这是另一个具有等式和不等式约束以及整数变量的示例(Hock Schittkowski #71 benchmark but with integer variables)。

HS71

from gekko import GEKKO    
import numpy as np
m = GEKKO()
x = m.Array(m.Var,4,integer=True,value=1,lb=1,ub=5)
x1,x2,x3,x4 = x
# change initial values
x2.value = 5; x3.value = 5
m.Equation(x1*x2*x3*x4>=25)
m.Equation(x1**2+x2**2+x3**2+x4**2==40)
m.Minimize(x1*x4*(x1+x2+x3)+x3)
m.options.SOLVER=1
m.solve()
print('x: ', x)
print('Objective: ',m.options.OBJFCNVAL)

There is additional information in the Gekko documentation and on this page about MINLP Optimization . Gekko 文档和此页面上提供了有关MINLP 优化的其他信息。 The only requirement that it doesn't satisfy is to find a global optimum.它不满足的唯一要求是找到全局最优值。 A multi-start method or a dedicated solver such as BONMIN or BARON are options.可以选择多启动方法或专用求解器,例如 BONMIN 或 BARON。

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

相关问题 使用DEAP的具有多个变量的多目标优化 - python - Multi-Objective optimization with multiple variables using DEAP 使用 Platypus (Python) 进行整数、多目标优化 - Integer, multi-objective optimization with Platypus (Python) Pyomo:多目标优化 - Pyomo: Multi-objective optimization pyomo 中的多目标优化 - Multi-objective optimization in pyomo 在 Python 中使用 Gekko,对于多目标优化问题,是否所有目标函数都必须具有相同的单位? - Using Gekko in Python, for a multi-objective optimization problem, do all objective functions have to be of the same unit? 使用带有 NSGA2 的 python DEAP 库解决多目标优化问题 - Solving a multi-objective optimization problem using python DEAP library with NSGA2 如何使用神经网络进行多目标优化? - How to do multi-objective optimization using neural networks? 使用 DEAP 的遗传算法多目标优化 - Multi-objective optimization with Genetic Algorithm using DEAP Optuna 多目标优化的最佳参数 - Best parameters of an Optuna multi-objective optimization 我可以在Scipy中使用SQP(顺序二次规划)进行神经网络回归优化吗? - Can I use SQP(Sequential quadratic programming) in scipy for neural network regression optimization?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM