使用 Jupyter Notebook 的 Pyomo gurobi 求解器错误

问题描述 投票:0回答:0

我正在 Jupyter Notebook 中使用 Python Pyomo 解决优化单元承诺问题。我使用了一个抽象模型,我已经能够加载所有需要的 CSV 文件并正确定义了问题。但是,在使用 gurobi 解决问题时,我发现以下错误:

ValueError:错误:没有为输入模型定义目标。无法写入合法的 LP 文件。

我附上了一段代码的图像,看看是否有人能找到错误。

enter image description here

enter image description here enter image description here

我已经获得了gurobi的学术许可证,版本是10.0.1

enter image description here

这是我的进口图片

python pyomo gurobi
© www.soinside.com 2019 - 2024. All rights reserved.