- ActionList *running_actions = getRunningActionSet();
- double min = this->shareResourcesMaxMin(running_actions, maxminSystem_, bottleneck_solve);
-
- for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end()); it != itend ; ++it) {
- action = static_cast<L07Action*>(&*it);
- if (action->m_latency > 0) {
- if (min < 0) {
- min = action->m_latency;
- XBT_DEBUG("Updating min (value) with %p (start %f): %f", action, action->getStartTime(), min);
- } else if (action->m_latency < min) {
- min = action->m_latency;
- XBT_DEBUG("Updating min (latency) with %p (start %f): %f", action, action->getStartTime(), min);
- }
+double HostL07Model::nextOccuringEvent(double now)
+{
+ double min = HostModel::nextOccuringEventFull(now);
+ for (kernel::resource::Action const& action : *getRunningActionSet()) {
+ const L07Action& net_action = static_cast<const L07Action&>(action);
+ if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) {
+ min = net_action.latency_;
+ XBT_DEBUG("Updating min with %p (start %f): %f", &net_action, net_action.getStartTime(), min);