Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pulse Physiology Suite
engine
Commits
1b71ec02
Commit
1b71ec02
authored
Jun 27, 2020
by
Aaron Bray
Browse files
Propagate dataDir override in scenario execution classes
parent
2437a233
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cpp/cdm/scenario/SEScenarioExec.cpp
View file @
1b71ec02
...
...
@@ -54,6 +54,8 @@ bool SEScenarioExec::ExecuteFile(PhysiologyEngine& pe, const std::string& scenar
rFile
=
scenarioFile
;
rFile
+=
".out"
;
}
if
(
m_Scenario
->
HasPatientConfiguration
())
m_Scenario
->
GetPatientConfiguration
().
SetDataRoot
(
dataDir
);
bool
success
=
Execute
(
pe
,
*
m_Scenario
,
rFile
,
ec
);
return
success
;
}
...
...
@@ -88,6 +90,8 @@ bool SEScenarioExec::Execute(PhysiologyEngine& pe, const std::string& scenarioFi
Error
(
"Error reading scenario file "
+
scenarioFile
+
" "
+
ex
.
what
());
return
false
;
}
if
(
m_Scenario
->
HasPatientConfiguration
())
m_Scenario
->
GetPatientConfiguration
().
SetDataRoot
(
dataDir
);
bool
success
=
Execute
(
pe
,
*
m_Scenario
,
resultsFile
,
ec
);
return
success
;
}
...
...
src/cpp/cpm/PulseScenarioExec.cpp
View file @
1b71ec02
...
...
@@ -6,6 +6,7 @@
#include
"controller/Engine.h"
#include
"engine/SEAction.h"
#include
"engine/SEAutoSerialization.h"
#include
"engine/SEPatientConfiguration.h"
#include
"PulseScenario.h"
#include
"PulseConfiguration.h"
#include
"properties/SEScalarTime.h"
...
...
@@ -95,6 +96,8 @@ bool PulseScenarioExec::Execute(PhysiologyEngine& engine, const std::string& sce
Error
(
"Unable to load scenario : "
+
scenario
);
return
false
;
}
if
(
m_PulseScenario
->
HasPatientConfiguration
())
m_PulseScenario
->
GetPatientConfiguration
().
SetDataRoot
(
dataDir
);
return
Execute
(
engine
,
*
m_PulseScenario
,
resultsFile
);
}
catch
(
CommonDataModelException
&
ex
)
...
...
@@ -128,6 +131,8 @@ bool PulseScenarioExec::ExecuteFile(PhysiologyEngine& engine, const std::string&
rFile
=
scenarioFile
;
rFile
+=
".csv"
;
}
if
(
m_PulseScenario
->
HasPatientConfiguration
())
m_PulseScenario
->
GetPatientConfiguration
().
SetDataRoot
(
dataDir
);
return
Execute
(
engine
,
*
m_PulseScenario
,
rFile
);
}
catch
(
CommonDataModelException
&
ex
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment