-void EngineImpl::presolve() const
-{
- XBT_DEBUG("Consume all trace events occurring before the starting time.");
- double next_event_date;
- while ((next_event_date = profile::future_evt_set.next_date()) != -1.0) {
- if (next_event_date > NOW)
- break;
-
- double value = -1.0;
- resource::Resource* resource = nullptr;
- while (auto* event = profile::future_evt_set.pop_leq(next_event_date, &value, &resource)) {
- if (value >= 0)
- resource->apply_event(event, value);
- }
- }
-
- XBT_DEBUG("Set every models in the right state by updating them to 0.");
- for (auto const& model : models_)
- model->update_actions_state(NOW, 0.0);
-}
-