Skip to content

Commit

Permalink
properties check
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Jul 3, 2024
1 parent 209b5b0 commit c0c6e30
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/libs/antares/study/parts/short-term-storage/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ bool Properties::validate()
injectionEfficiency = 1;
}

if (withdrawalEfficiency < 0)
{
logs.warning() << "Property withdrawalEfficiency must be >= 0 " << "for short term storage " << name;
withdrawalEfficiency = 0;
}

if (withdrawalEfficiency > 1)
{
logs.warning() << "Property withdrawalEfficiency must be <= 1 " << "for short term storage " << name;
withdrawalEfficiency = 1;
}

if (initialLevel < 0)
{
initialLevel = initiallevelDefault;
Expand Down

0 comments on commit c0c6e30

Please sign in to comment.