if(j1<j2) and d[j1]==d[j2]): return riga[j1]<=riga[j2] else: return Constraint.Skip model.v15=Constraint(model.pazienti,model.pazienti,rule=v15)
where riga is a PositiveIntegers variable and model.pazienti is a RangeSet.
And python return me this error, that I don't know how to fix:
'int' object is not subscriptableThanks for replies.
What are the types of ‘d’ and ‘riga’? Are they singletons or lists? Are they Pyomo components or native Python types?
Bethany
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyomo-forum/34a710ef-2506-438c-b631-54060fea2b93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.