加载模型Pyomo-Python-Gurobi时发生意外异常

时间:2019-07-17 11:00:56

标签: python gurobi pyomo

我正在尝试使用Pyomo优化模型。我正在使用的求解器是Gurobi。我认为代码中的一切都很好,但是从

开始

results = opt.solve(instance, tee=True)

我遇到错误。 有人可以帮我吗?

我在寻找插件,但是Pyomo已经在插件文件中安装了gurobi_direct

Unexpected exception while loading model:
        The problem instance supplied to the <class
        'pyomo.solvers.plugins.solvers.gurobi_direct.GurobiDirect'> plugin
        '_presolve' method must be a Model or a Block

0 个答案:

没有答案
相关问题