-
Notifications
You must be signed in to change notification settings - Fork 4
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
#133 CriticalTime Calculation implementation done. Tests added in API… #136
base: master
Are you sure you want to change the base?
Conversation
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.
Could you also please add a IEEE14 based nrt?
@@ -101,6 +101,34 @@ XmlExporter::exportLoadIncreaseResultsToStream(const vector<LoadIncreaseResult>& | |||
formatter->endDocument(); | |||
} | |||
|
|||
void | |||
XmlExporter::exportCriticalTimeResultsToFile(double criticalTime, const std::string& messageCriticalTimeError, std::string filePath) const { |
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 std::string& filePath
/** | ||
* @brief Export critical time calculation results into a file | ||
* | ||
* @param results aggregated results to export |
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.
doxygen is not correct (same below)
|
||
void | ||
CriticalTimeCalculation::setAccuracy(double accuracy) { | ||
if (accuracy < 0 || accuracy > 1) |
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 (accuracy < 0 || accuracy > 1 || doubleIsZero(accuracy))
} | ||
|
||
void | ||
CriticalTimeCalculation::setJobsFile(std::string jobsFile) { |
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 std::string&
dydId_ = dydId; | ||
} | ||
|
||
std::string |
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 std::string&
// First simulation case. | ||
SetParametersAndLaunchSimulation(); | ||
if (results_.getSuccess()) | ||
tSup_ += std::round(((tSup_ - tInf) / 2) * multiplierRound) / multiplierRound; |
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 see any check that tInf < tSup
} | ||
|
||
void | ||
CriticalTimeLauncher::updateIndexes(double& tPrevious, double& curAccuracy, const double& multiplierRound) { |
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.
Since this method is small and called only once in the code I would propose to remove it and put the code directly below
if (!results_.getSuccess()) | ||
tSup_ -= accuracy; | ||
|
||
tSup_ = std::round(tSup_ * multiplierRound) / multiplierRound;; |
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.
additional ;
// | ||
|
||
/** | ||
* @file DYNMarginCriticalimeLauncher.h |
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.
typo: CriticalTime
|
||
std::string simulationMC_SA_CS_CTC = "Set the simulation type to launch : MC (Margin calculation), SA (systematic analysis), CS (compute simulation)" | ||
" or CTC (critical time calculation)"; | ||
const char* allSimulationsType = simulationMC_SA_CS_CTC.c_str(); |
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.
useless, please use directly simulationMC_SA_CS_CTC.c_str() below
…, Common and Launcher
…onst...) + optimize the critical time algorithm following advices from Florentine
53d22cd
to
a83abd7
Compare
I updated with a recent master and added some fix to make the branch work. To make the test case work with Dynawo temporary we need to add the following lines in
|
From my understanding, only the first job of the fic_multiple is read. But it could be useful to compute the CCTs of all generators in one go (possibly using the "dydFile" entry). |
closes #133