Skip to content
Snippets Groups Projects

Process

Merged Mikael Henriksson requested to merge process into master
1 unresolved thread
5 files
+ 57
72
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 7
3
@@ -65,7 +65,12 @@ def draw_exclusion_graph_coloring(
@@ -65,7 +65,12 @@ def draw_exclusion_graph_coloring(
else:
else:
node_color_dict = {k: color_list[v] for k, v in color_dict.items()}
node_color_dict = {k: color_list[v] for k, v in color_dict.items()}
node_color_list = [node_color_dict[node] for node in exclusion_graph]
node_color_list = [node_color_dict[node] for node in exclusion_graph]
nx.draw_networkx(exclusion_graph, node_color=node_color_list, ax=ax)
nx.draw_networkx(
 
exclusion_graph,
 
node_color=node_color_list,
 
ax=ax,
 
pos=nx.spring_layout(exclusion_graph, seed=1),
 
)
class ProcessCollection:
class ProcessCollection:
@@ -79,7 +84,7 @@ class ProcessCollection:
@@ -79,7 +84,7 @@ class ProcessCollection:
def __init__(self, collection: Optional[Set[Process]] = None):
def __init__(self, collection: Optional[Set[Process]] = None):
if collection is None:
if collection is None:
self._collection = set[Process]()
self._collection: Set[Process] = set()
else:
else:
self._collection = collection
self._collection = collection
@@ -182,7 +187,6 @@ class ProcessCollection:
@@ -182,7 +187,6 @@ class ProcessCollection:
va="center",
va="center",
)
)
_ax.grid(True)
_ax.grid(True)
_ax.set_title(f'Schedule time: {schedule_time}')
_ax.xaxis.set_major_locator(MaxNLocator(integer=True))
_ax.xaxis.set_major_locator(MaxNLocator(integer=True))
_ax.yaxis.set_major_locator(MaxNLocator(integer=True))
_ax.yaxis.set_major_locator(MaxNLocator(integer=True))
Loading