XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_cas, surf_cpu, "Logging specific to the SURF CPU module");
+/***********
+ * Options *
+ ***********/
+
static simgrid::config::Flag<std::string>
cpu_optim_opt("cpu/optim", "Optimization algorithm to use for CPU resources. ", "Lazy",
}
set_maxmin_system(new simgrid::kernel::lmm::System(select));
-
- if (algo == Model::UpdateAlgo::Lazy)
- get_maxmin_system()->modified_set_ = new kernel::resource::Action::ModifiedSet();
}
CpuCas01Model::~CpuCas01Model()
return &speedPerPstate_;
}
-bool CpuCas01::isUsed()
+bool CpuCas01::is_used()
{
return model()->get_maxmin_system()->constraint_used(constraint());
}
}
model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
- if (model()->getUpdateMechanism() == kernel::resource::Model::UpdateAlgo::Lazy) { // remove action from the heap
- action->heapRemove();
+ if (model()->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) { // remove action from the heap
+ model()->get_action_heap().remove(action);
// this is necessary for a variable with weight 0 since such variables are ignored in lmm and we need to set its
// max_duration correctly at the next call to share_resources
model()->get_modified_set()->push_front(*action);
model->get_maxmin_system()->variable_new(this, 1.0 / requestedCore, requestedCore * speed, 1))
, requestedCore_(requestedCore)
{
- if (model->getUpdateMechanism() == kernel::resource::Model::UpdateAlgo::Lazy) {
+ if (model->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) {
set_last_update();
set_last_value(0.0);
}