There is a check that 2 way 1 var should not be in non-sync constraints. But the non-sync constraint has also been modified in the same commit (see ebfbefc). I am not sure what that modification is trying to do and it may be causing a problem with 2-way connections using more than 1 variable. I think the correct formulation should be simpler (the line deducting the v_flow from process_source_sink_eff should not be there? Because of the check, there are no 2-way 1-var flows in non-sync constraints (and they would not work anyway). That line is commented out below.):
s.t. non_sync_constraint{g in groupNonSync, (d, t) in dt} :
# Sum all incoming non-synchronous flows to the group nodes (and possibly decrease them with penalty)
# Include incoming non-sync flows if they come from outside of the node group (and ignore sync and non-sync flows within the node group)
+ sum {(p, source, sink) in process_source_sink : (g, sink) in group_node && (p, sink) in process__sink_nonSync && (p, g) not in process__group_inside_group_nonSync}
( + v_flow[p, source, sink, d, t]
* p_entity_unitsize[p]
* step_duration[d, t] )
# Assumes that exogenous inflows are always non-synchronous (there is no separate parameter for this)
+ sum {(g, n) in group_node} p_positive_inflow[n,d,t]
- vq_non_synchronous[g, d, t] * group_capacity_for_scaling[g, d]
<=
# Sum all outgoing flows from the group nodes and multiply that with the non-sync limit
( + sum {(p, source, sink) in process_source_sink_noEff : (g, source) in group_node && (p,g) not in process__group_inside_group_nonSync}
( + v_flow[p, source, sink, d, t]
* p_entity_unitsize[p]
) * step_duration[d, t]
+ sum {(p, source, sink) in process_source_sink_eff: (g, source) in group_node && (p,g) not in process__group_inside_group_nonSync}
( + v_flow[p, source, sink, d, t]
* ( if (p, 'min_load_efficiency') in process__ct_method then pdtProcess_slope[p, d, t]
else 1 / pdtProcess[p, 'efficiency', d, t] )
* ( if p in process_unit then 1 / ( p_process_sink_coefficient[p, sink] * p_process_source_coefficient[p, source])
else 1 )
+ ( if (p, 'min_load_efficiency') in process__ct_method then
+ ( + (if p in process_online_linear then v_online_linear[p, d, t])
+ (if p in process_online_integer then v_online_integer[p, d, t])
)
* pdtProcess_section[p, d, t]
)
# -(if (p,g) in process__group_inside_group_nonSync then v_flow[p, source, sink, d, t] else 0)
) * p_entity_unitsize[p]
* step_duration[d, t]
# Add exogenous outflow (demand)
+ sum {(g, n) in group_node} -p_negative_inflow[n,d,t]
) * pdGroup[g, 'non_synchronous_limit', d]
;
There is a check that 2 way 1 var should not be in non-sync constraints. But the non-sync constraint has also been modified in the same commit (see ebfbefc). I am not sure what that modification is trying to do and it may be causing a problem with 2-way connections using more than 1 variable. I think the correct formulation should be simpler (the line deducting the v_flow from process_source_sink_eff should not be there? Because of the check, there are no 2-way 1-var flows in non-sync constraints (and they would not work anyway). That line is commented out below.):