Skip to content

Commit

Permalink
Fixes Simultaneous calculation for PHEV-p and PHEV-d is not possible
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi authored and romainsacchi committed Jun 14, 2024
1 parent 87168cf commit 1a59b70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions carculator_utils/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ def fill_xarray_from_input_parameters(input_parameters, sensitivity=False, scope

for missing_pwt in missing_pwts:
if missing_pwt[0] in scope["powertrain"]:
if not any(p in scope["powertrain"] for p in missing_pwt[1:]):
scope["powertrain"].extend(missing_pwt[1:])
for p in missing_pwt[1:]:
if not p in scope["powertrain"]:
scope["powertrain"].append(p)

if any(s for s in scope["size"] if s not in input_parameters.sizes):
raise ValueError("One of the size types is not valid.")
Expand Down

1 comment on commit 1a59b70

@romainsacchi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#7

Please sign in to comment.