You are creating a scalar constraint where you mean to create an indexed constraint. The first argument to all rules is the block that owns the component (in this case, the model).
Please see the documentation for more information: https://software.sandia.gov/downloads/pub/pyomo/PyomoOnlineDocs.html#_constraints
john
--
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.
For more options, visit https://groups.google.com/d/optout.
You are only changing your rule but still declaring a scalar constraint. You also need to declare an indexed constraint (by passing the index as an argument to the constraint constructor). Please look at the numerous examples or the documentation linked below for examples of using indexed constraints.