gtopt/coupler_fail_closed.hpp file

"Fail-closed" helpers for coupler elements (rule R2)

A coupler (Turbine, GasTurbine, Converter, Pump, electric GasCompressor) turns a resource of a partner element into another resource. When the coupler is not effective in a stage — it is inactive, or a reference it needs is inactive or has no column — its conversion row cannot be written. Leaving the partner's producing column free would then create energy / water / compression from nothing, so instead the producing direction of that column is closed:

uppb ← min(uppb, 0), lowb ← min(lowb, 0)

A negative lower bound (reverse / consuming direction) is preserved: only production is forbidden. See docs/formulation/mathematical-formulation.md ("Coupler fail-closed rule").

Namespaces

namespace gtopt