tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
59 stars 19 forks source link

ResourceUnavailable should give same error as WorkLoad when used improperly #131

Closed retnuh closed 8 months ago

retnuh commented 1 year ago

I was struggling to get ResourceUnavailable to work properly. On a whim I tried the WorkLoad with a value of 0, as suggested by the docs, and I got the following:

The resource is not assigned to any task. WorkLoad constraint meaningless.

That made me realize that the contraint needed to be added after the workers was added to the tasks. After doing that, things worked as expected.

If ResourceUnavailable had the same error message that would be helpful for folks new to the library figure out what they are doing wrong.

tpaviot commented 1 year ago

Thank you for your feedback. This issue has already been reported and fixed in commit 8cb3ba39ae015620ae3a2dd4ef97fe410a751633 a few weeks ago