#include <simgrid/kernel/routing/NetZoneImpl.hpp>
#include <simgrid/s4u/Engine.hpp>
-#include "simgrid/sg_config.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/models/cpu_cas01.hpp"
#include "src/kernel/resource/models/cpu_ti.hpp"
#include "src/kernel/resource/profile/Event.hpp"
#include "src/simgrid/module.hpp"
+#include "src/simgrid/sg_config.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_cas, res_cpu, "CPU resource, CAS01 model (used by default)");
get_iface()->turn_on();
}
} else {
- const lmm::Element* elem = nullptr;
- double date = EngineImpl::get_clock();
-
get_iface()->turn_off();
-
- while (const auto* var = get_constraint()->get_variable(&elem)) {
- Action* action = var->get_id();
-
- if (action->get_state() == Action::State::INITED || action->get_state() == Action::State::STARTED ||
- action->get_state() == Action::State::IGNORED) {
- action->set_finish_time(date);
- action->set_state(Action::State::FAILED);
- }
- }
+ cancel_actions();
}
unref_state_event();