Skip to content

Commit

Permalink
visualization bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lschoonheid committed Jan 24, 2023
1 parent 5be0d25 commit d19444d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def main(

# Visualize graph
if verbose:
sampled_result.score_vector
sampled_result.cached_score_vector
print(sampled_result)
G = GraphVisualization(sampled_result.schedule)
G.visualize()
Expand Down
9 changes: 6 additions & 3 deletions program_code/visualisation/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@


def plot_statistics(results: list[Result]):
evening_timeslots = [result.cached_score_vector[1] for result in results]
student_overbookings = [result.cached_score_vector[2] for result in results]
gaps = [result.cached_score_vector[3] for result in results]
evening_timeslots = [result.cached_score_vector[0] for result in results]
student_overbookings = [result.cached_score_vector[1] for result in results]
gaps = [
result.cached_score_vector[2] + result.cached_score_vector[3] + result.cached_score_vector[4]
for result in results
]
total_scores = [result.cached_score for result in results]

fig, (ax1, ax2, ax3, ax4) = plt.subplots(1, 4, figsize=(9, 4.5), tight_layout=True)
Expand Down

0 comments on commit d19444d

Please sign in to comment.