Skip to content

Commit

Permalink
#35 Implemented Negative Deployment Check, Error, and Correct
Browse files Browse the repository at this point in the history
added an if statement to the beginning of the mass code checking for negative deployment, which prints a message and sets all deployment that is negative to 0.
  • Loading branch information
heathermirletz committed Oct 23, 2024
1 parent 6b27807 commit 99d43f3
Show file tree
Hide file tree
Showing 4 changed files with 6,469 additions and 6,992 deletions.
5 changes: 5 additions & 0 deletions PV_ICE/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,11 @@ def calculateMassFlow(self, scenarios=None, materials_input=None,

# Standard method to calculate Area from the Power
else:
#negative deployment check, error, correct
if (df['new_Installed_Capacity_[MW]'].values<0).any():
print('You have at least 1 negative annual deployment! All years of negative deployment have been set to 0.')
df.loc[df['new_Installed_Capacity_[MW]']<0,'new_Installed_Capacity_[MW]'] = 0.0

df['new_Installed_Capacity_[W]'] = (
df['new_Installed_Capacity_[MW]']*1e6)

Expand Down
Loading

0 comments on commit 99d43f3

Please sign in to comment.