WIP: Enhance Gantt chart plotting by incorporating resource capacities#310
WIP: Enhance Gantt chart plotting by incorporating resource capacities#310merqurio wants to merge 2 commits intoPyJobShop:mainfrom
Conversation
|
Hi @merqurio, thanks for opening this PR and taking this initiative! I will have a look later tonight :) |
|
@merqurio I've tried making a Gantt chart before for capacity-based resources (see #221 (comment)), but I found it difficult to judge what's a "good" visualization because I only have experience solving scheduling problems with machines. That's why I opted for just providing the Could you share some experiences of your use cases, and what you would like to see as the result? These questions will help me better understand your needs to shape this PR. I'm curious to know more about the following details:
|
Sorry, I completely missed that!
Not currently, but I'm still modeling the problem. I see that you adapted the height of the task; was that based on the amount of resource used, right?
We don't at the moment. I checked Pyomo for inspiration, but I don't see anything in their plots. Getting creative here
I like it, and I'm happy to work from there if you feel more comfortable. This is exactly why I opened an early PR, so you could also give some clues on what's important for you. Let me know, and thanks for your fast answer! |
No worries at all! My initial attempt was buried inside a PR, so I didn't expect anyone to find it.
Correct. I saw something like that in your code as well, so we're on the same page here.
That's fine! I already think that the current approach you're taking is something we can continue working with. Let's first focus on purely renewable resources. There are some scenarios and resulting design decisions that we need to experiment with:
Point 1 is actually which I found most challenging. Drawing such plots is actually an optimization problem in itself: How do draw the tasks in the nicest possible way? Should we schedule tasks in order of their starting times (like you already do), but maybe also prioritize tasks with the highest demand first? Or perhaps area (width * height)? (I don't have an answer to this question.) I think that the visualization that I made earlier could be much improved. For instance, there are too many vertical gaps between the tasks. That gives a skewed view of how much of a resource's capacity is used. I'm going to try to find more examples. Please feel free to share ideas and your personal needs, as they can be very helpful in shaping this PR. |
|
My primary focus is to get the first iteration into production as soon as possible. Once that's live, I'll reconnect with you to discuss and ask for your help to merge the charting capabilities. I'm currently creating more charts, similar to the one I just pushed, for debugging purposes. I'll likely push most of them and coordinate with you them, but it might take some time 😄 |
|
Sure thing, good luck! Let me know if you need any help with the scheduling part -- feel free to open an issue or send me an email. |





This PR enhances the
plot_machine_ganttfunction by showing the tasks in a resource with a capacity > 1. These changes make the Gantt chart more informative and visually robust, especially for problems involving multi-capacity resources. This helps users better interpret the schedule and resource utilization. Specifically:This is still WIP, i wanted to open the door to early feedback. At the moment there is still some overlay happening in the resource lanes.
Testing: