if (action->get_type() == kernel::resource::Action::Type::LATENCY) {
XBT_DEBUG("Latency paid for action %p. Activating", action);
maxmin_system_->update_variable_weight(action->get_variable(), action->weight_);
- action->heapRemove(getActionHeap());
+ action->heapRemove();
action->set_last_update();
// if I am wearing a max_duration or normal hat
// assume that flows that reached max_duration have remaining of 0
XBT_DEBUG("Action %p finished", action);
action->finish(kernel::resource::Action::State::done);
- action->heapRemove(getActionHeap());
+ action->heapRemove();
}
}
}
if (getUpdateMechanism() == UM_LAZY) {
// add to the heap the event when the latency is payed
XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->latency_ + action->get_last_update());
- action->heapInsert(getActionHeap(), action->latency_ + action->get_last_update(),
- route.empty() ? kernel::resource::Action::Type::NORMAL
- : kernel::resource::Action::Type::LATENCY);
+ action->heapInsert(action->latency_ + action->get_last_update(), route.empty()
+ ? kernel::resource::Action::Type::NORMAL
+ : kernel::resource::Action::Type::LATENCY);
}
} else
action->set_variable(maxmin_system_->variable_new(action, 1.0, -1.0, constraints_per_variable));
if ((get_remains_no_update() <= 0 && (get_variable()->get_weight() > 0)) ||
((max_duration > NO_MAX_DURATION) && (max_duration <= 0))) {
finish(Action::State::done);
- heapRemove(get_model()->getActionHeap());
+ heapRemove();
}
set_last_update();