Skip to content
Snippets Groups Projects
Commit 778a2daf authored by Andreas Bolin's avatar Andreas Bolin
Browse files

Made Schedule.get_max_end_time() public.

parent 84010dbc
No related branches found
No related tags found
1 merge request!78Add scheduler GUI
Pipeline #73301 passed
......@@ -41,7 +41,7 @@ class Schedule:
raise NotImplementedError(
f"No algorithm with name: {scheduling_alg} defined.")
max_end_time = self._get_max_end_time()
max_end_time = self.get_max_end_time()
if schedule_time is None:
self._schedule_time = max_end_time
......@@ -56,7 +56,8 @@ class Schedule:
assert op_id in self._start_times, "No operation with the specified op_id in this schedule."
return self._start_times[op_id]
def _get_max_end_time(self) -> int:
def get_max_end_time(self) -> int:
"""Returnes the current maximum end time among all operations."""
max_end_time = 0
for op_id, op_start_time in self._start_times.items():
op = self._sfg.find_by_id(op_id)
......@@ -126,7 +127,7 @@ class Schedule:
raise NotImplementedError
def set_schedule_time(self, time: int) -> "Schedule":
assert self._get_max_end_time() <= time, "New schedule time to short."
assert self.get_max_end_time() <= time, "New schedule time to short."
self._schedule_time = time
return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment