From 010dca785b26b84a35e676da77a2356beb819ef4 Mon Sep 17 00:00:00 2001 From: Dhruv Garg Date: Wed, 6 Nov 2024 21:53:36 -0500 Subject: [PATCH] setting start_time for tasks after placement --- simulator.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simulator.py b/simulator.py index 1ccf06fd..a59e8bf9 100644 --- a/simulator.py +++ b/simulator.py @@ -758,6 +758,9 @@ def __create_events_from_task_placement( placement.placement_time, ) placement.task.schedule(event_time, placement) + + # set task's start_time to the placement_time + placement.task._start_time = placement.placement_time simulator_event = Event( event_type=EventType.TASK_PLACEMENT, @@ -790,6 +793,10 @@ def __create_events_from_task_placement( placement.placement_time, ) placement.task.schedule(event_time, placement) + + # reset task's start_time to the new placement_time + placement.task._start_time = placement.placement_time + simulator_event = Event( event_type=EventType.TASK_PLACEMENT, time=placement.placement_time,