def loss_rule(model, t, b):
return model.losses[t, b] == b.pcu * ((model.power[t, b] / b.rating) ** 2)
model.loss_calc = pyomo.Constraint(model.IDX_time,
model.IDX_buses,
rule=loss_rule,
doc='Loss calculation')
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Gurobi does support some forms of quadratic constraints (we have used it to solve MISOCP problems). I would look at their documentation.
On a separate note, in the code below, it looks like “b” is an index (from IDX_buses), but it also has data (b.pcu, b.rating). Are the indices actually hashable objects containing this data, or is something else going on?
--
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 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.
model.IDX_buses = pyomo.Set(initialize=[bus for bus in caseStudy.network.buses])
--
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+unsubscribe@googlegroups.com.
--
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.