您好,我是使用Pyomo的新手。我的模型有问题,出现了这个错误
ERROR: Constructing component 'Ecapacity' from data=None failed:
AttributeError: 'Series' object has no attribute 'is_expression_type'
有什么建议吗?
这是约束
def Ecapacity(model,u,t):
return model.P[u,t]<=model.Pmax[u]*model.y[u,t]
return model.P[u,t]>=model.Pmin[u]*model.y[u,t]
return model.P[u,t]<=model.Pmax[u]*(1-model.s[u,t])
return model.P[u,t]>=model.Pmin[u]*(1-model.s[u,t])
model.Ecapacity=pe.Constraint(model.U,model.T,rule=Ecapacity)