Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
setter function only need a simcall in MC or with parallel execs
[simgrid.git] / src / surf / disk_s19.cpp
index 1b589d39aff577bf4b9677b11bd945b11b7e1ccd..8299b4bf77037bf299c46b474462bd79af39bf52 100644 (file)
@@ -3,6 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "simgrid/sg_config.hpp"
 #include <simgrid/kernel/routing/NetPoint.hpp>
 #include <simgrid/kernel/routing/NetZoneImpl.hpp>
 #include <simgrid/s4u/Engine.hpp>
 #include "src/surf/disk_s19.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk);
+/***********
+ * Options *
+ ***********/
+static simgrid::config::Flag<std::string> cfg_disk_solver("disk/solver",
+                                                          "Set linear equations solver used by disk model", "maxmin",
+                                                          &simgrid::kernel::lmm::System::validate_solver);
 
 /*********
  * Model *
@@ -28,6 +35,15 @@ void surf_disk_model_init_S19()
 }
 
 namespace simgrid::kernel::resource {
+/*********
+ * Model *
+ *********/
+
+DiskS19Model::DiskS19Model(const std::string& name) : DiskModel(name)
+{
+  set_maxmin_system(lmm::System::build(cfg_disk_solver.get(), true /* selective update */));
+}
+
 
 DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
 {