Skip to content

Commit

Permalink
#431 Update following DYN-2455 (following Part. 4)
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim committed Nov 21, 2024
1 parent 4985b9e commit db03644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sources/Launcher/DYNComputeLoadVariationLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ComputeLoadVariationLauncher::launch() {
boost::shared_ptr<DYN::Simulation> simulation = createAndInitSimulation(workingDir, job, params, result, inputs_);

if (simulation) {
boost::shared_ptr<DYN::ModelMulti> modelMulti = boost::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
std::shared_ptr<DYN::ModelMulti> modelMulti = std::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
auto subModels = modelMulti->findSubModelByLib(createAbsolutePath(std::string("DYNModelVariationArea") + DYN::sharedLibraryExtension(), DDBDir));
double duration = 0;
for (unsigned int i=0; i < subModels.size(); i++) {
Expand Down
4 changes: 2 additions & 2 deletions sources/Launcher/DYNMarginCalculationLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ MarginCalculationLauncher::launchScenario(const MultiVariantInputs& inputs, cons
simulation->setTimelineOutputFile("");
simulation->setConstraintsOutputFile("");
// The event time should be adapted (the list of events models supported currently corresponds to events really used)
boost::shared_ptr<DYN::ModelMulti> modelMulti = boost::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
std::shared_ptr<DYN::ModelMulti> modelMulti = std::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
std::string DDBDir = getEnvVar("DYNAWO_DDB_DIR");
decltype(modelMulti->findSubModelByLib("")) subModels;
auto addSubModelsByLib = [&](const std::string& libName) {
Expand Down Expand Up @@ -820,7 +820,7 @@ MarginCalculationLauncher::launchLoadIncrease(const boost::shared_ptr<LoadIncrea
boost::shared_ptr<DYN::Simulation> simulation = createAndInitSimulation(workingDir, job, params, result, inputs_);

if (simulation) {
boost::shared_ptr<DYN::ModelMulti> modelMulti = boost::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
std::shared_ptr<DYN::ModelMulti> modelMulti = std::dynamic_pointer_cast<DYN::ModelMulti>(simulation->getModel());
std::string DDBDir = getMandatoryEnvVar("DYNAWO_DDB_DIR");
auto subModels = modelMulti->findSubModelByLib(createAbsolutePath(std::string("DYNModelVariationArea") + DYN::sharedLibraryExtension(), DDBDir));
for (std::vector<boost::shared_ptr<DYN::SubModel> >::const_iterator it = subModels.begin(); it != subModels.end(); ++it) {
Expand Down

0 comments on commit db03644

Please sign in to comment.