StateSet;
enum class State {
- inited, /**< Created, but not started yet */
- running, /**< Started, currently running */
- failed, /**< Completed (unsuccessfully: either the resource failed, or the action was canceled) */
- done, /**< Completed (successfully) */
- ignored /**< e.g. failure detectors, these infinite sleep actions that are put on resources which failure should be notified */
+ INITED, /**< Created, but not started yet */
+ STARTED, /**< Currently running */
+ FAILED, /**< either the resource failed, or the action was canceled */
+ FINISHED, /**< Successfully completed */
+ IGNORED /**< e.g. failure detectors, these infinite sleep actions that are put on resources which failure should be
+ notified */
};
enum class SuspendStates {
/** @brief Get the set of [actions](@ref Action) in *inited* state */
Action::StateSet* get_inited_action_set() const { return inited_action_set_; }
- /** @brief Get the set of [actions](@ref Action) in *running* state */
- Action::StateSet* get_running_action_set() const { return running_action_set_; }
+ /** @brief Get the set of [actions](@ref Action) in *started* state */
+ Action::StateSet* get_started_action_set() const { return started_action_set_; }
/** @brief Get the set of [actions](@ref Action) in *failed* state */
Action::StateSet* get_failed_action_set() const { return failed_action_set_; }
- /** @brief Get the set of [actions](@ref Action) in *done* state */
- Action::StateSet* get_done_action_set() const { return done_action_set_; }
+ /** @brief Get the set of [actions](@ref Action) in *finished* state */
+ Action::StateSet* get_finished_action_set() const { return finished_action_set_; }
/** @brief Get the set of modified [actions](@ref Action) */
Action::ModifiedSet* get_modified_set() const;
lmm::System* maxmin_system_ = nullptr;
const UpdateAlgo update_algorithm_;
Action::StateSet* inited_action_set_ = new Action::StateSet(); /**< Created not started */
- Action::StateSet* running_action_set_ = new Action::StateSet(); /**< Started not done */
+ Action::StateSet* started_action_set_ = new Action::StateSet(); /**< Started not done */
Action::StateSet* failed_action_set_ = new Action::StateSet(); /**< Done with failure */
- Action::StateSet* done_action_set_ = new Action::StateSet(); /**< Done successful */
+ Action::StateSet* finished_action_set_ = new Action::StateSet(); /**< Done successful */
ActionHeap action_heap_;
};
void simgrid::kernel::activity::CommImpl::post()
{
/* Update synchro state */
- if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
+ if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::FINISHED)
state_ = SIMIX_SRC_TIMEOUT;
- else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::done)
+ else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::FINISHED)
state_ = SIMIX_DST_TIMEOUT;
- else if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
+ else if (src_timeout && src_timeout->get_state() == simgrid::kernel::resource::Action::State::FAILED)
state_ = SIMIX_SRC_HOST_FAILURE;
- else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::failed)
+ else if (dst_timeout && dst_timeout->get_state() == simgrid::kernel::resource::Action::State::FAILED)
state_ = SIMIX_DST_HOST_FAILURE;
- else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) {
+ else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::FAILED) {
state_ = SIMIX_LINK_FAILURE;
} else
state_ = SIMIX_DONE;
/* If the host running the synchro failed, notice it. This way, the asking
* process can be killed if it runs on that host itself */
state_ = SIMIX_FAILED;
- } else if (surf_action_ && surf_action_->get_state() == simgrid::kernel::resource::Action::State::failed) {
+ } else if (surf_action_ && surf_action_->get_state() == simgrid::kernel::resource::Action::State::FAILED) {
/* If the host running the synchro didn't fail, then the synchro was canceled */
state_ = SIMIX_CANCELED;
- } else if (timeout_detector_ && timeout_detector_->get_state() == simgrid::kernel::resource::Action::State::done) {
+ } else if (timeout_detector_ &&
+ timeout_detector_->get_state() == simgrid::kernel::resource::Action::State::FINISHED) {
state_ = SIMIX_TIMEOUT;
} else {
state_ = SIMIX_DONE;
e_smx_state_t result;
switch (surf_sleep->get_state()) {
- case simgrid::kernel::resource::Action::State::failed:
+ case simgrid::kernel::resource::Action::State::FAILED:
simcall->issuer->context->iwannadie = 1;
result = SIMIX_SRC_HOST_FAILURE;
break;
- case simgrid::kernel::resource::Action::State::done:
+ case simgrid::kernel::resource::Action::State::FINISHED:
result = SIMIX_DONE;
break;
}
switch (surf_io->get_state()) {
- case simgrid::kernel::resource::Action::State::failed:
+ case simgrid::kernel::resource::Action::State::FAILED:
state_ = SIMIX_FAILED;
break;
- case simgrid::kernel::resource::Action::State::done:
+ case simgrid::kernel::resource::Action::State::FINISHED:
state_ = SIMIX_DONE;
break;
default:
void simgrid::kernel::activity::RawImpl::post()
{
XBT_IN("(%p)",this);
- if (sleep->get_state() == simgrid::kernel::resource::Action::State::failed)
+ if (sleep->get_state() == simgrid::kernel::resource::Action::State::FAILED)
state_ = SIMIX_FAILED;
- else if (sleep->get_state() == simgrid::kernel::resource::Action::State::done)
+ else if (sleep->get_state() == simgrid::kernel::resource::Action::State::FINISHED)
state_ = SIMIX_SRC_TIMEOUT;
SIMIX_synchro_finish(this);
if (failed)
state_set_ = get_model()->get_failed_action_set();
else
- state_set_ = get_model()->get_running_action_set();
+ state_set_ = get_model()->get_started_action_set();
state_set_->push_back(*this);
}
Action::State Action::get_state() const
{
if (state_set_ == model_->get_inited_action_set())
- return Action::State::inited;
- if (state_set_ == model_->get_running_action_set())
- return Action::State::running;
+ return Action::State::INITED;
+ if (state_set_ == model_->get_started_action_set())
+ return Action::State::STARTED;
if (state_set_ == model_->get_failed_action_set())
- return Action::State::failed;
- if (state_set_ == model_->get_done_action_set())
- return Action::State::done;
- return Action::State::ignored;
+ return Action::State::FAILED;
+ if (state_set_ == model_->get_finished_action_set())
+ return Action::State::FINISHED;
+ return Action::State::IGNORED;
}
void Action::set_state(Action::State state)
{
simgrid::xbt::intrusive_erase(*state_set_, *this);
switch (state) {
- case Action::State::inited:
+ case Action::State::INITED:
state_set_ = model_->get_inited_action_set();
break;
- case Action::State::running:
- state_set_ = model_->get_running_action_set();
+ case Action::State::STARTED:
+ state_set_ = model_->get_started_action_set();
break;
- case Action::State::failed:
+ case Action::State::FAILED:
state_set_ = model_->get_failed_action_set();
break;
- case Action::State::done:
- state_set_ = model_->get_done_action_set();
+ case Action::State::FINISHED:
+ state_set_ = model_->get_finished_action_set();
break;
default:
state_set_ = nullptr;
void Action::cancel()
{
- set_state(Action::State::failed);
+ set_state(Action::State::FAILED);
if (get_model()->get_update_algorithm() == Model::UpdateAlgo::Lazy) {
if (modified_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this);
get_model()->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
if (get_model()->get_update_algorithm() == Model::UpdateAlgo::Lazy) {
get_model()->get_action_heap().remove(this);
- if (state_set_ == get_model()->get_running_action_set() && sharing_priority_ > 0) {
+ if (state_set_ == get_model()->get_started_action_set() && sharing_priority_ > 0) {
// If we have a lazy model, we need to update the remaining value accordingly
update_remains_lazy(surf_get_clock());
}
Model::~Model()
{
delete inited_action_set_;
- delete running_action_set_;
+ delete started_action_set_;
delete failed_action_set_;
- delete done_action_set_;
+ delete finished_action_set_;
delete maxmin_system_;
}
maxmin_system_->modified_set_->pop_front();
bool max_duration_flag = false;
- if (action->get_state_set() != running_action_set_)
+ if (action->get_state_set() != started_action_set_)
continue;
/* bogus priority, skip it */
double min = -1;
- for (Action& action : *get_running_action_set()) {
+ for (Action& action : *get_started_action_set()) {
double value = action.get_variable()->get_value();
if (value > 0) {
if (action.get_remains() > 0)
[](void*, void* arg) {
auto sleep = static_cast<simgrid::kernel::activity::SleepImpl*>(arg);
if (sleep->surf_sleep)
- sleep->surf_sleep->finish(simgrid::kernel::resource::Action::State::done);
+ sleep->surf_sleep->finish(simgrid::kernel::resource::Action::State::FINISHED);
intrusive_ptr_release(sleep);
return 0;
},
receiver->get_cname(), comm->surfAction_);
/* If a link is failed, detect it immediately */
- if (comm->surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) {
+ if (comm->surfAction_->get_state() == simgrid::kernel::resource::Action::State::FAILED) {
XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure", sender->get_cname(),
receiver->get_cname());
comm->state_ = SIMIX_LINK_FAILURE;
while ((var = cnst->get_variable(&elem))) {
kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
- if (action->get_state() == kernel::resource::Action::State::inited ||
- action->get_state() == kernel::resource::Action::State::running ||
- action->get_state() == kernel::resource::Action::State::ignored) {
+ if (action->get_state() == kernel::resource::Action::State::INITED ||
+ action->get_state() == kernel::resource::Action::State::STARTED ||
+ action->get_state() == kernel::resource::Action::State::IGNORED) {
action->set_finish_time(date);
- action->set_state(kernel::resource::Action::State::failed);
+ action->set_state(kernel::resource::Action::State::FAILED);
}
}
}
CpuAction* action = static_cast<CpuAction*>(get_action_heap().pop());
XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
- action->finish(kernel::resource::Action::State::done);
+ action->finish(kernel::resource::Action::State::FINISHED);
XBT_CDEBUG(surf_kernel, "Action %p finished", action);
}
if (TRACE_is_enabled()) {
//defining the last timestamp that we can safely dump to trace file
//without losing the event ascending order (considering all CPU's)
double smaller = -1;
- for (kernel::resource::Action const& action : *get_running_action_set()) {
+ for (kernel::resource::Action const& action : *get_started_action_set()) {
if (smaller < 0 || action.get_last_update() < smaller)
smaller = action.get_last_update();
}
void CpuModel::update_actions_state_full(double now, double delta)
{
- for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
+ for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
CpuAction& action = static_cast<CpuAction&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_weight() > 0)) ||
((action.get_max_duration() != NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
- action.finish(kernel::resource::Action::State::done);
+ action.finish(kernel::resource::Action::State::FINISHED);
}
}
}
void CpuAction::update_remains_lazy(double now)
{
- xbt_assert(get_state_set() == get_model()->get_running_action_set(),
+ xbt_assert(get_state_set() == get_model()->get_started_action_set(),
"You're updating an action that is not running.");
xbt_assert(get_priority() > 0, "You're updating an action that seems suspended.");
while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) {
CpuTiAction* action = static_cast<CpuTiAction*>(get_action_heap().pop());
XBT_DEBUG("Action %p: finish", action);
- action->finish(kernel::resource::Action::State::done);
+ action->finish(kernel::resource::Action::State::FINISHED);
/* update remaining amount of all actions */
action->cpu_->update_remaining_amount(surf_get_clock());
}
/* put all action running on cpu to failed */
for (CpuTiAction& action : action_set_) {
- if (action.get_state() == kernel::resource::Action::State::inited ||
- action.get_state() == kernel::resource::Action::State::running ||
- action.get_state() == kernel::resource::Action::State::ignored) {
+ if (action.get_state() == kernel::resource::Action::State::INITED ||
+ action.get_state() == kernel::resource::Action::State::STARTED ||
+ action.get_state() == kernel::resource::Action::State::IGNORED) {
action.set_finish_time(date);
- action.set_state(kernel::resource::Action::State::failed);
+ action.set_state(kernel::resource::Action::State::FAILED);
get_model()->get_action_heap().remove(&action);
}
}
sum_priority_ = 0.0;
for (CpuTiAction const& action : action_set_) {
/* action not running, skip it */
- if (action.get_state_set() != surf_cpu_model_pm->get_running_action_set())
+ if (action.get_state_set() != surf_cpu_model_pm->get_started_action_set())
continue;
/* bogus priority, skip it */
for (CpuTiAction& action : action_set_) {
double min_finish = -1;
/* action not running, skip it */
- if (action.get_state_set() != surf_cpu_model_pm->get_running_action_set())
+ if (action.get_state_set() != surf_cpu_model_pm->get_started_action_set())
continue;
/* verify if the action is really running on cpu */
XBT_DEBUG("Flops total: %f, Last update %f", area_total, last_update_);
for (CpuTiAction& action : action_set_) {
/* action not running, skip it */
- if (action.get_state_set() != get_model()->get_running_action_set())
+ if (action.get_state_set() != get_model()->get_started_action_set())
continue;
/* bogus priority, skip it */
void CpuTiAction::cancel()
{
- this->set_state(Action::State::failed);
+ this->set_state(Action::State::FAILED);
get_model()->get_action_heap().remove(this);
cpu_->set_modified(true);
}
// no need to communicate anymore
// assume that flows that reached max_duration have remaining of 0
XBT_DEBUG("Action %p finished", action);
- action->finish(Action::State::done);
+ action->finish(Action::State::FINISHED);
get_action_heap().remove(action);
}
}
void NetworkCm02Model::update_actions_state_full(double now, double delta)
{
- for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
+ for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
NetworkCm02Action& action = static_cast<NetworkCm02Action&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
XBT_DEBUG("Something happened to action %p", &action);
if (((action.get_remains() <= 0) && (action.get_variable()->get_weight() > 0)) ||
((action.get_max_duration() > NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
- action.finish(Action::State::done);
+ action.finish(Action::State::FINISHED);
}
}
}
while ((var = get_constraint()->get_variable(&elem))) {
Action* action = static_cast<Action*>(var->get_id());
- if (action->get_state() == Action::State::inited || action->get_state() == Action::State::running) {
+ if (action->get_state() == Action::State::INITED || action->get_state() == Action::State::STARTED) {
action->set_finish_time(now);
- action->set_state(Action::State::failed);
+ action->set_state(Action::State::FAILED);
}
}
}
if ((get_remains_no_update() <= 0 && (get_variable()->get_weight() > 0)) ||
((max_duration > NO_MAX_DURATION) && (max_duration <= 0))) {
- finish(Action::State::done);
+ finish(Action::State::FINISHED);
get_model()->get_action_heap().remove(this);
}
double NetworkConstantModel::next_occuring_event(double /*now*/)
{
double min = -1.0;
- for (kernel::resource::Action const& action : *get_running_action_set()) {
+ for (kernel::resource::Action const& action : *get_started_action_set()) {
const NetworkConstantAction& net_action = static_cast<const NetworkConstantAction&>(action);
if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min))
min = net_action.latency_;
void NetworkConstantModel::update_actions_state(double /*now*/, double delta)
{
- for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
+ for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
NetworkConstantAction& action = static_cast<NetworkConstantAction&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
if (action.latency_ > 0) {
if ((action.get_remains_no_update() <= 0) ||
((action.get_max_duration() != NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
- action.finish(kernel::resource::Action::State::done);
+ action.finish(kernel::resource::Action::State::FINISHED);
}
}
}
{
latency_ = latency;
if (latency_ <= 0.0)
- NetworkConstantAction::set_state(Action::State::done);
+ NetworkConstantAction::set_state(Action::State::FINISHED);
};
NetworkConstantAction::~NetworkConstantAction() = default;
using simgrid::kernel::resource::IBNode;
using simgrid::kernel::resource::NetworkIBModel;
- if (action->get_state() != simgrid::kernel::resource::Action::State::done)
+ if (action->get_state() != simgrid::kernel::resource::Action::State::FINISHED)
return;
std::pair<IBNode*,IBNode*> pair = ((NetworkIBModel*)surf_network_model)->active_comms[action];
XBT_DEBUG("IB callback - action %p finished", action);
{
double minRes = Model::next_occuring_event_full(now);
- for (Action const& action : *get_running_action_set()) {
+ for (Action const& action : *get_started_action_set()) {
const NetworkAction& net_action = static_cast<const NetworkAction&>(action);
if (net_action.latency_ > 0)
minRes = (minRes < 0) ? net_action.latency_ : std::min(minRes, net_action.latency_);
XBT_DEBUG("ns3_next_occuring_event");
//get the first relevant value from the running_actions list
- if (not get_running_action_set()->size() || now == 0.0)
+ if (not get_started_action_set()->size() || now == 0.0)
return -1.0;
else
do {
static std::vector<std::string> socket_to_destroy;
/* If there are no running flows, advance the NS3 simulator and return */
- if (get_running_action_set()->empty()) {
+ if (get_started_action_set()->empty()) {
while(double_positive(now - ns3::Simulator::Now().GetSeconds(), sg_surf_precision))
ns3_simulator(now-ns3::Simulator::Now().GetSeconds());
XBT_DEBUG("Processing socket %p (action %p)",sgFlow,action);
action->set_remains(action->get_cost() - sgFlow->sentBytes_);
- if (TRACE_is_enabled() && action->get_state() == kernel::resource::Action::State::running) {
+ if (TRACE_is_enabled() && action->get_state() == kernel::resource::Action::State::STARTED) {
double data_delta_sent = sgFlow->sentBytes_ - action->lastSent_;
std::vector<LinkImpl*> route = std::vector<LinkImpl*>();
if(sgFlow->finished_){
socket_to_destroy.push_back(ns3Socket);
XBT_DEBUG("Destroy socket %p of action %p", ns3Socket.c_str(), action);
- action->finish(kernel::resource::Action::State::done);
+ action->finish(kernel::resource::Action::State::FINISHED);
} else {
XBT_DEBUG("Socket %p sent %u bytes out of %u (%u remaining)", ns3Socket.c_str(), sgFlow->sentBytes_,
sgFlow->totalBytes_, sgFlow->remaining_);
double HostL07Model::next_occuring_event(double now)
{
double min = HostModel::next_occuring_event_full(now);
- for (kernel::resource::Action const& action : *get_running_action_set()) {
+ for (kernel::resource::Action const& action : *get_started_action_set()) {
const L07Action& net_action = static_cast<const L07Action&>(action);
if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) {
min = net_action.latency_;
void HostL07Model::update_actions_state(double /*now*/, double delta)
{
- for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
+ for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
L07Action& action = static_cast<L07Action&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
if (action.latency_ > 0) {
if (((action.get_remains() <= 0) && (action.get_variable()->get_weight() > 0)) ||
((action.get_max_duration() > NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
- action.finish(kernel::resource::Action::State::done);
+ action.finish(kernel::resource::Action::State::FINISHED);
} else {
/* Need to check that none of the model has failed */
int i = 0;
void* constraint_id = cnst->get_id();
if (static_cast<simgrid::kernel::resource::Resource*>(constraint_id)->is_off()) {
XBT_DEBUG("Action (%p) Failed!!", &action);
- action.finish(kernel::resource::Action::State::failed);
+ action.finish(kernel::resource::Action::State::FAILED);
break;
}
cnst = action.get_variable()->get_constraint(i);
void StorageN11Model::update_actions_state(double /*now*/, double delta)
{
- for (auto it = std::begin(*get_running_action_set()); it != std::end(*get_running_action_set());) {
+ for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
StorageAction& action = static_cast<StorageAction&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
action.update_remains(lrint(action.get_variable()->get_value() * delta));
if (((action.get_remains_no_update() <= 0) && (action.get_variable()->get_weight() > 0)) ||
((action.get_max_duration() > NO_MAX_DURATION) && (action.get_max_duration() <= 0))) {
- action.finish(kernel::resource::Action::State::done);
+ action.finish(kernel::resource::Action::State::FINISHED);
}
}
}
void StorageN11Action::cancel()
{
- set_state(Action::State::failed);
+ set_state(Action::State::FAILED);
}
void StorageN11Action::suspend()
simgrid::kernel::resource::Action* surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model)
{
- return ActionListExtract(model->get_done_action_set());
+ return ActionListExtract(model->get_finished_action_set());
}
simgrid::kernel::resource::Action* surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model)
int surf_model_running_action_set_size(simgrid::kernel::resource::Model* model)
{
- return model->get_running_action_set()->size();
+ return model->get_started_action_set()->size();
}
void surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound)
static const char* string_action(simgrid::kernel::resource::Action::State state)
{
switch (state) {
- case simgrid::kernel::resource::Action::State::inited:
+ case simgrid::kernel::resource::Action::State::INITED:
return "SURF_ACTION_INITED";
- case simgrid::kernel::resource::Action::State::running:
+ case simgrid::kernel::resource::Action::State::STARTED:
return "SURF_ACTION_RUNNING";
- case simgrid::kernel::resource::Action::State::failed:
+ case simgrid::kernel::resource::Action::State::FAILED:
return "SURF_ACTION_FAILED";
- case simgrid::kernel::resource::Action::State::done:
+ case simgrid::kernel::resource::Action::State::FINISHED:
return "SURF_ACTION_DONE";
- case simgrid::kernel::resource::Action::State::ignored:
+ case simgrid::kernel::resource::Action::State::IGNORED:
return "SURF_ACTION_IGNORED";
default:
return "INVALID STATE";
action.unref();
}
- action_list = surf_cpu_model_pm->get_done_action_set();
+ action_list = surf_cpu_model_pm->get_finished_action_set();
while (not action_list->empty()) {
simgrid::kernel::resource::Action& action = action_list->front();
XBT_INFO(" CPU Done action");
action.unref();
}
- action_list = surf_network_model->get_done_action_set();
+ action_list = surf_network_model->get_finished_action_set();
while (not action_list->empty()) {
simgrid::kernel::resource::Action& action = action_list->front();
XBT_INFO(" Network Done action");
}
} while (
- (surf_network_model->get_running_action_set()->size() || surf_cpu_model_pm->get_running_action_set()->size()) &&
+ (surf_network_model->get_started_action_set()->size() || surf_cpu_model_pm->get_started_action_set()->size()) &&
surf_solve(-1.0) >= 0.0);
XBT_DEBUG("Simulation Terminated");