试图找到一个与Excel Solver函数等效的Python。假设我有以下输入:
import math
totalvolflow=150585.6894
gaspercentvol=0.1
prodmod=1224
blpower=562.57
powercons=6
gasvolflow=totalvolflow*gaspercentvol
quantity=math.ceil(gasvolflow/prodmod)
maxpercentvol=powercons*totalvolflow*prodmod/blpower
我想通过使用以下约束更改gaspercentvol来找到maxpercentvol的最大值:
quantity*powercon<blpower
###############################
解决方法
试图找到一个与Excel Solver函数等效的Python。假设我有以下输入:
import math
totalvolflow=150585.6894
gaspercentvol=0.1
prodmod=1224
blpower=562.57
powercons=6
gasvolflow=totalvolflow*gaspercentvol
quantity=math.ceil(gasvolflow/prodmod)
maxpercentvol=powercons*totalvolflow*prodmod/blpower
我想通过使用以下约束更改gaspercentvol来找到maxpercentvol的最大值:
quantity*powercon<blpower








暂无数据