【发布时间】:2022-12-14 05:47:44
【问题描述】:
如何仅在线性不等式约束下使用求解器 'trust-constr? 我的限制条件是 c(x)>0 & c(x)=g(x,teta)-ymin 我怎样才能对求解器 'trust-constr' 使用这种线性不等式约束?
c(x) 约束的 python 代码正在执行如下插值:
#pressure_cons_val is ymin
#input_val is teta
input_val = (BHP, GOR, WC, GLR, LR)
#function do_interpolation is written
interpol=self.file.do_interpolation(0)
res=interpol(input_val) #g(x,teta)
cons=res-pressure_cons_val
【问题讨论】:
-
您好,请尝试提供一个最小的可复制示例:stackoverflow.com/help/minimal-reproducible-example
标签: python optimization scipy scipy-optimize-minimize