gurobipy.GurobiError:LinExpr乘法的参数无效

时间:2015-10-22 14:50:53

标签: python syntax-error gurobi objective-function

我收到错误: class Document < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base belongs_to :company has_many :documents end class Company < ActiveRecord::Base has_many :users end === Query selected_company: Company.first documents_in_selected_company = Document.joins(:User).joins(:User => :Company).where(:company_id => selected_company[:id) 该错误必须在以下行中:

gurobipy.GurobiError: Invalid argument to LinExpr multiplication

m.setObjective(quicksum(sum(s[d, r] *x[d, r] for r in piecewise) * h[d] * Z * VarDemand[d] for d in demandStage) + quicksum(sum(s[j, r] * x[j, r] for r in piecewise) *h[j] * Z * Var[j] for j in intermediateStage), GRB.MINIMIZE) 是变量,其余的都是使用excel文件中的导入值的dicts。

我已经盯着这个很长一段时间了,但我看不出这个错误。

0 个答案:

没有答案