Skip to content

Commit fa07e48

Browse files
committed
FIx logic
1 parent fc1be20 commit fa07e48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/simulation/investment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ fn update_demand_map(demand: &mut AllDemandMap, flows: &FlowMap, assets: &[Asset
209209
// Only consider input flows and output flows from the primary output commodity
210210
// (excluding secondary outputs)
211211
if (flow < &Flow(0.0))
212-
| asset
212+
|| asset
213213
.primary_output()
214-
.is_some_and(|p| &p.commodity.id != commodity_id)
214+
.is_some_and(|p| &p.commodity.id == commodity_id)
215215
{
216216
// Note: we use the negative of the flow as input flows are negative in the flow map.
217217
demand

0 commit comments

Comments
 (0)