Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make update_algorithm optional in model creation. Full is default
[simgrid.git] / src / kernel / resource / Model.cpp
index b02fe64..c9058be 100644 (file)
@@ -12,9 +12,14 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {}
 Model::~Model() = default; // Don't move this declaration to the header, or it will break external projects such as SimGrid-FMI
 
+Model* Model::set_update_algorithm(Model::UpdateAlgo algo)
+{
+  update_algorithm_ = algo;
+  return this;
+}
+
 Action::ModifiedSet* Model::get_modified_set() const
 {
   return maxmin_system_->modified_set_.get();