Skip to content
Snippets Groups Projects

Better schedule, including plotting

Merged Oscar Gustafsson requested to merge plotschedule into master
Files
2
+ 5
1
@@ -4,7 +4,7 @@ Contains the schema class for scheduling operations in an SFG.
"""
from collections import defaultdict
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Tuple
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import numpy as np
@@ -96,6 +96,10 @@ class Schema:
slack = min(slack, usage_time - available_time)
return slack
def slacks(self, op_id: GraphID) -> Tuple(int, int):
assert op_id in self._start_times, "No operation with the specified op_id in this schema."
return (self.backward_slack(op_id), self.forward_slack(op_id))
def print_slacks(self) -> None:
raise NotImplementedError
Loading