<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi Armando,</div>
<div> </div>
<div>please note that this list is no longer the right way to communicate with the Couenne and COIN-OR community, please use</div>
<div> </div>
<div>https://github.com/coin-or/Couenne/issues</div>
<div> </div>
<div>About your problem, by how much is the constraint violated? I'm not a Pyomo expert but it seems to me that the constraint is linear. In general linear constraints are copied as they are so they should be satisfied.</div>
<div> </div>
<div>Thanks,</div>
<div>Pietro</div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Saturday, September 14, 2024 at 4:35 AM<br/>
<b>From:</b> "Armando José De La Hoz Moreno" <ajdelahozm@gmail.com><br/>
<b>To:</b> couenne@list.coin-or.org<br/>
<b>Subject:</b> [Couenne] Constrain violation</div>
<div name="quoted-content">
<div>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:
<div> </div>
<div> # Restricciones de flujo total por sistema<br/>
def flujo_restriccion_rule(model):<br/>
yield (model.flujo_bb_1_fase_total + model.flujo_bb_2_fase_total) - requerimientos_hidraulicos['BPC S1'][0] == 0<br/>
yield (model.flujo_bb_1_fase_total + model.flujo_bb_2_fase_total) - model.flujo_bpc_s1_total == 0<br/>
yield model.flujo_bpc_s1_total - requerimientos_hidraulicos['BPC S1'][0] == 0<br/>
<br/>
model.del_component('flujo_restricciones')<br/>
model.flujo_restricciones = ConstraintList()<br/>
<br/>
for constraint in flujo_restriccion_rule(model):<br/>
model.flujo_restricciones.add(constraint)</div>
</div>
_______________________________________________ Couenne mailing list Couenne@list.coin-or.org <a href="https://list.coin-or.org/mailman/listinfo/couenne" target="_blank">https://list.coin-or.org/mailman/listinfo/couenne</a></div>
</div>
</div>
</div></div></body></html>