+ if (heap_.empty())
+ s4u::Engine::on_platform_created_cb([this]() {
+ /* Handle the events of time = 0 right after the platform creation */
+ double next_event_date;
+ while ((next_event_date = this->next_date()) != -1.0) {
+ if (next_event_date > 0)
+ break;
+
+ double value = -1.0;
+ resource::Resource* resource = nullptr;
+ while (auto* event = this->pop_leq(next_event_date, &value, &resource)) {
+ if (value >= 0)
+ resource->apply_event(event, value);
+ }
+ }
+ });
+