Skip to content

Commit

Permalink
remove apparently now-superseded uniqueness check in names
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Feb 27, 2025
1 parent d53fc16 commit 41c29f5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/corpus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,6 @@ impl Corpus {
})
.collect::<anyhow::Result<_>>()?;

if !has_unique_non_default_values(&heat_system_name_for_zone)
|| !has_unique_non_default_values(&cool_system_name_for_zone)
{
bail!("the heat or cool systems do not have unique names in the inputs");
}

let energy_supply_conn_unmet_demand_zone = set_up_energy_supply_unmet_demand_zones(
energy_supplies[UNMET_DEMAND_SUPPLY_NAME].clone(),
&input.zone,
Expand Down Expand Up @@ -2899,12 +2893,6 @@ impl SpaceHeatCoolSystems<'_> {
}
}

fn has_unique_non_default_values<K, V: Default + Eq + Hash>(map: &IndexMap<K, V>) -> bool {
let values: Vec<&V> = map.values().filter(|x| x != &&V::default()).collect();
let value_set: HashSet<&&V> = values.iter().collect();
values.len() == value_set.len()
}

fn external_conditions_from_input(
input: Arc<ExternalConditionsInput>,
simulation_time: &SimulationTimeIterator,
Expand Down

0 comments on commit 41c29f5

Please sign in to comment.