|
@@ -49,17 +49,14 @@ int main()
|
|
|
AContext context(artis::utils::DateTime::toJulianDayNumber("2016-1-1"),
|
|
|
artis::utils::DateTime::toJulianDayNumber("2016-1-5"));
|
|
|
|
|
|
- {
|
|
|
- ::Trace::trace().clear();
|
|
|
+ ::Trace::trace().clear();
|
|
|
|
|
|
+ {
|
|
|
ASimulator simulator(new RootModel, globalParameters);
|
|
|
|
|
|
simulator.init(artis::utils::DateTime::toJulianDayNumber("2016-1-1"),
|
|
|
modelParameters);
|
|
|
simulator.run(context);
|
|
|
-
|
|
|
- std::cout << ::Trace::trace().elements().filter_variable("BX").to_string(artis::utils::DATE_FORMAT_YMD) << std::endl;
|
|
|
-
|
|
|
simulator.save(context);
|
|
|
|
|
|
std::ofstream os("state");
|
|
@@ -68,14 +65,15 @@ int main()
|
|
|
oa << context;
|
|
|
}
|
|
|
|
|
|
+ std::cout << ::Trace::trace().elements().filter_variable("BX").to_string(
|
|
|
+ artis::utils::DATE_FORMAT_YMD) << std::endl;
|
|
|
|
|
|
std::cout << "==== PAUSE ====" << std::endl;
|
|
|
|
|
|
- {
|
|
|
- ::Trace::trace().clear();
|
|
|
+ ::Trace::trace().clear();
|
|
|
|
|
|
+ {
|
|
|
AContext new_context(context);
|
|
|
-
|
|
|
ASimulator simulator(new RootModel, globalParameters);
|
|
|
|
|
|
new_context.begin(
|
|
@@ -83,21 +81,19 @@ int main()
|
|
|
new_context.end(
|
|
|
artis::utils::DateTime::toJulianDayNumber("2016-1-10"));
|
|
|
simulator.run(new_context);
|
|
|
-
|
|
|
- std::cout << ::Trace::trace().elements().filter_type(artis::utils::COMPUTE).to_string() << std::endl;
|
|
|
}
|
|
|
|
|
|
+ std::cout << ::Trace::trace().elements().filter_type(
|
|
|
+ artis::utils::COMPUTE).to_string() << std::endl;
|
|
|
+
|
|
|
std::cout << "==== PAUSE ====" << std::endl;
|
|
|
|
|
|
- {
|
|
|
- ::Trace::trace().clear();
|
|
|
+ ::Trace::trace().clear();
|
|
|
|
|
|
+ {
|
|
|
AContext new_context;
|
|
|
-
|
|
|
ASimulator simulator(new RootModel, globalParameters);
|
|
|
-
|
|
|
std::ifstream is("state");
|
|
|
-
|
|
|
boost::archive::binary_iarchive ia(is);
|
|
|
|
|
|
ia >> new_context;
|
|
@@ -107,9 +103,9 @@ int main()
|
|
|
new_context.end(
|
|
|
artis::utils::DateTime::toJulianDayNumber("2016-1-10"));
|
|
|
simulator.run(new_context);
|
|
|
-
|
|
|
- std::cout << ::Trace::trace().elements().to_string() << std::endl;
|
|
|
}
|
|
|
|
|
|
+ std::cout << ::Trace::trace().elements().to_string() << std::endl;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|