-
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 "cash-flow" variable for ST storage #1633
Conversation
enum | ||
{ | ||
//! How many items have we got | ||
count = 1 + NextT::count, |
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.
const instead of anonymous enum?
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.
We could use constexpr
instead
|
||
inline uint64_t memoryUsage() const | ||
{ | ||
uint64_t r = (sizeof(IntermediateValues) * nbClusters_ + IntermediateValues::MemoryUsage()) |
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.
what r
is for?
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.
It is a temporary variable that's used to compute the memory usage.
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.
Looks good to me. A few small improvements are listed below.
From #1624, we have : Meaning that, if we do only injection (into the network), we have a negative value. |
I made some tests on Antares_Simulator_Tests_NR/valid-v860/tests-ST-storage. [variables selection]
...
select_var + = STS CASHFLOW BY PLANT
... |
About injection and withdrawal, we always adopt the storage point of view. Injection means injection into the storage. |
enum | ||
{ | ||
//! How many items have we got | ||
count = 1 + NextT::count, |
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.
We could use constexpr
instead
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
|
||
inline uint64_t memoryUsage() const | ||
{ | ||
uint64_t r = (sizeof(IntermediateValues) * nbClusters_ + IntermediateValues::MemoryUsage()) |
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.
It is a temporary variable that's used to compute the memory usage.
close #1624