From d2089ef85ca1677a8f91ecef785fc4f4c02026bf Mon Sep 17 00:00:00 2001 From: Janie115 <43097430+Janie115@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:25:43 -0400 Subject: [PATCH] Fixes in transmission targets (#1155) * Fix transmission min targets formulation in negative direction * Fix exporting results for transmission target contributions --- .../transmission_target_contributions.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gridpath/transmission/operations/transmission_target_contributions.py b/gridpath/transmission/operations/transmission_target_contributions.py index 7d78ca539..8fca75097 100644 --- a/gridpath/transmission/operations/transmission_target_contributions.py +++ b/gridpath/transmission/operations/transmission_target_contributions.py @@ -203,7 +203,7 @@ def transmit_power_neg_dir_net_rule(mod, tx, tmp): else: return ( mod.Transmission_Target_Net_Energy_MW_Neg_Dir[tx, tmp] - == mod.Transmit_Power_MW[tx, tmp] + == -mod.Transmit_Power_MW[tx, tmp] ) m.Transmission_Target_Net_Energy_MW_Neg_Dir_Constraint = Constraint( @@ -302,8 +302,16 @@ def export_results( [ tx, tmp, - value(m.TxSimpleBinary_Transmit_Power_Positive_Direction_MW[tx, tmp]), - value(m.TxSimpleBinary_Transmit_Power_Negative_Direction_MW[tx, tmp]), + ( + value(m.TxSimpleBinary_Transmit_Power_Positive_Direction_MW[tx, tmp]) + if float(m.contributes_net_flow_to_tx_target[tx]) == 0 + else value(m.TxSimple_Transmit_Power_MW[tx, tmp]) + ), + ( + value(m.TxSimpleBinary_Transmit_Power_Negative_Direction_MW[tx, tmp]) + if float(m.contributes_net_flow_to_tx_target[tx]) == 0 + else value(-m.TxSimple_Transmit_Power_MW[tx, tmp]) + ), ( value(m.Transmission_Target_Energy_MW_Pos_Dir[tx, tmp]) if float(m.contributes_net_flow_to_tx_target[tx]) == 0