Pyomo无法正确建立模型

时间:2019-05-22 17:40:11

标签: mathematical-optimization nonlinear-optimization pyomo

长期运营研究人员,Pyomo的首次用户。我正在建立一个非线性程序作为研究项目,并在Pyomo中对其进行尝试。由于这处于概念验证阶段,因此我只是对所有变量,约束和目标函数进行硬编码。在我将其发送给NEOS之前,一切似乎都很好:

solver_manager = SolverManagerFactory('neos')
results = solver_manager.solve(model, opt=SolverFactory('couenne'))
results.write() 

NEOS显然没有获得完整的模型构建:结果表明它具有92个变量(应为108)和零约束。

results.write()
# ==========================================================
# = Solver Results                                         =
# ==========================================================
# ----------------------------------------------------------
#   Problem Information
# ----------------------------------------------------------
Problem: 
- Lower bound: -inf
  Upper bound: inf
  Number of objectives: 1
  Number of constraints: 0
  Number of variables: 92
  Sense: unknown
# ----------------------------------------------------------
#   Solver Information
# ----------------------------------------------------------
Solver: 
- Status: ok
  Message: couenne\x3a Optimal
  Termination condition: optimal
  Id: 3
# ----------------------------------------------------------
#   Solution Information
# ----------------------------------------------------------
Solution: 
- number of solutions: 0
  number of solutions displayed: 0

在定义或将参数传递给NEOS时,我在做错什么吗?

0 个答案:

没有答案