Closed spartakos87 closed 7 years ago
This is really not the best place to put user support questions. The preferred locations for posting user questions are either to the mailing list (pyomo-forum@googlegroups.com) or on StackOverflow.
That said, assuming a
and t
are defined by Sets model.A
and model.T
, and that your intent in the ord()
calls is to convert the sdet members to their numeric value, then something akin to the following would work:
def con_rule(m, t):
return m.vr[t] == m.tr * m.sr * sum(m.yv[a]*delta[a] for a in m.A if t+a>len(m.T))
model.con = Constraint(model.T, rule=con_rule)
There is any effective way to convert right dollar of gams to pyomo? For example
vr(t) = tr*sr*sum(a$(ord(t)+ord(a) gt card(t)), yv(a)*delta(a));
thx