使用python中的差分演化对参数进行约束 [英] Constraints on parameters using differential evolution in python

本文介绍了使用python中的差分演化对参数进行约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用差异进化来基于成本优化可用性.但是,我在这里有三个未知参数(a,b,c),我可以使用界限定义范围.但是,我想将其他约束定义为a + b + c< =10000.我正在使用python做到这一点,并且我尝试在差分进化中使用选项"args",但它不起作用.任何信息将不胜感激.

I am trying to use differential evolution to optimize availability based on cost. However, I have three unknown parameters (a, b, c) here and I can define the range using bounds. However, I want to define additional constraint as a+b+c <= 10000. I am using python to do this and I tried to use an option "args" within differential evolution but it did not work. Any information will be appreciated.

推荐答案

使用差分演化来定义约束不是针对我上面描述的问题的合适解决方案.为此,我们可以使用Nminimize命令,该命令具有专用选项来定义约束.

Defining the constraint using differential evolution is not an appropriate solution for the problem I have described above. For this purpose, we can use Nminimize command which has dedicated option to define constraints.

scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None, hess=None, hessp=None, bounds=None, constraints=(), tol=None, callback=None, options=None)

这篇关于使用python中的差分演化对参数进行约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆