- std::string optim = xbt_cfg_get_string("network/optim");
- bool select = xbt_cfg_get_boolean("network/maxmin-selective-update");
-
- if (optim == "Full") {
- setUpdateMechanism(UM_FULL);
- selectiveUpdate_ = select;
- } else if (optim == "Lazy") {
- setUpdateMechanism(UM_LAZY);
- selectiveUpdate_ = true;
- xbt_assert(select || (xbt_cfg_is_default_value("network/maxmin-selective-update")),
- "You cannot disable selective update when using the lazy update mechanism");
- } else {
- xbt_die("Unsupported optimization (%s) for this model. Accepted: Full, Lazy.", optim.c_str());
- }
+ std::string optim = simgrid::config::get_value<std::string>("network/optim");
+ bool select = simgrid::config::get_value<bool>("network/maxmin-selective-update");