- double min = HostModel::nextOccuringEventFull(now);
- ActionList::iterator it(getRunningActionSet()->begin());
- ActionList::iterator itend(getRunningActionSet()->end());
- for (; it != itend; ++it) {
- L07Action *action = static_cast<L07Action*>(&*it);
- if (action->latency_ > 0 && (min < 0 || action->latency_ < min)) {
- min = action->latency_;
- XBT_DEBUG("Updating min with %p (start %f): %f", action, action->getStartTime(), min);
+ set_maxmin_system(sys);
+ loopback_ = NetworkL07Model::createLink("__loopback__", 498000000, 0.000015, s4u::Link::SharingPolicy::FATPIPE);
+}
+
+NetworkL07Model::~NetworkL07Model()
+{
+ set_maxmin_system(nullptr);
+}
+
+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()) {
+ 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.get_start_time(), min);