[Couenne] Constrain violation
Armando José De La Hoz Moreno
ajdelahozm at gmail.com
Fri Sep 13 22:35:22 EDT 2024
Hi, I have the following code that uses Pyomo and Couenne to optimize the
energy consumption of a pumping system. The code works; however, something
curious happens. I know the optimal result in advance, which is 3810. Most
of the time, I get that result, but in some cases, the constraint is
violated:
# Restricciones de flujo total por sistema
def flujo_restriccion_rule(model):
yield (model.flujo_bb_1_fase_total +
model.flujo_bb_2_fase_total) - requerimientos_hidraulicos['BPC S1'][0] == 0
yield (model.flujo_bb_1_fase_total +
model.flujo_bb_2_fase_total) - model.flujo_bpc_s1_total == 0
yield model.flujo_bpc_s1_total -
requerimientos_hidraulicos['BPC S1'][0] == 0
model.del_component('flujo_restricciones')
model.flujo_restricciones = ConstraintList()
for constraint in flujo_restriccion_rule(model):
model.flujo_restricciones.add(constraint)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/couenne/attachments/20240913/61d97604/attachment.html>
More information about the Couenne
mailing list