Pabloo22 / job_shop_lib

A modular Python library for creating, solving, and visualizing Job Shop Scheduling Problems.
https://job-shop-lib.readthedocs.io
MIT License
24 stars 1 forks source link

Visualize operation info in `plot_gantt_chart` #13

Open Pabloo22 opened 3 weeks ago

Pabloo22 commented 3 weeks ago

Answering to:

          Can I see operation IDs or operation information on the gantt chart I created?

_Originally posted by @dogukansert in https://github.com/Pabloo22/job_shop_lib/issues/3#issuecomment-2430958312_

A way to implement this is by adding a new optional argument of plot_gantt_chart that takes a callable similar to the operation_node_labeler parameter in the latest version of plot_disjunctive_graph. This callable would return a label for each ScheduledOperation object, which would then be displayed in the corresponding box. I prefer this option over passing a template string because it is a more flexible approach.

Additionally, another optional parameter could be added to include extra text in the legend, which can help explain the symbols used in the labels. This functionality is already available in plot_disjunctive_graph with the legend_text parameter.

dogukansert commented 1 week ago

Thank you for your feedback. I will work on it.

Pabloo22 commented 1 week ago

Nice. Let me know if you have any questions!