-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hydro remix algorithm #2532
base: develop
Are you sure you want to change the base?
Conversation
BOOST_CHECK(new_H == expected_H); | ||
BOOST_CHECK(new_D == expected_D); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai l'impression que ce test est très similaire au test précédent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oui, en effet, la seule chose qui change, c'est la Pmax qui est maintenant de 50 (au lieu de 40).
D'ou le titre de ce 2eme test
std::vector<double> expected_D = {20., 30., 40., 50., 60.}; | ||
BOOST_CHECK(new_H == expected_H); | ||
BOOST_CHECK(new_D == expected_D); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lui aussi ressemble beaucoup au précédent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oui, ce test est le symétrique du test hydro_increases_and_pmax_40mwh___H_is_flattened_to_mean_H_20mwh
C'est pour montrer que l'algo est lui-même symétrique
…acity on remix hydro algorithm
…tial level too low
…e of std::all_of instead
return std::ranges::all_of(v, [&c](const double& e) { return e >= c; }); | ||
} | ||
|
||
static void checkInputCorrectness(const std::vector<double>& G, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several functions have a lots of args, maybe creating a struct to encapsulate the data will be simpler ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what its better : have many and detailed input arguments, or have a unique input struct argument encapsulating a list of many input data.
Having an input struct as argument may have a disadvantage :
we first have to pack input data into the struct, and then, inside the algorithm, we have to unpack the arguments, meaning we have to call input.someData
or input.someOtherData
, etc.
It may require more lines of code to do that.
I'm not sure it worth it to have a struct as input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add a new CMake target
- Renaming "hydro-remix-new" -> better name
std::vector<double> levels; | ||
}; | ||
|
||
RemixHydroOutput new_remix_hydro(const std::vector<double>& DispatchGen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change name + camelCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
const std::vector<double>& DTG_MRG) | ||
{ | ||
std::vector<double> levels(DispatchGen.size()); | ||
if (levels.size()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (levels.size()) | |
if (!levels.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Done |
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
No description provided.