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