热线电话:13121318867

登录
2019-01-21 阅读量: 853
Python获取Excel Solver出现错误

试图找到一个与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

0.0000
4
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子