Model machines as cumulative resources (with capa 1) in jsp/fjsp #467
Draft
nhuet wants to merge 10 commits into
Draft
Model machines as cumulative resources (with capa 1) in jsp/fjsp #467nhuet wants to merge 10 commits into
nhuet wants to merge 10 commits into
Conversation
We avoid having abstract methods in GenericSchedulingProblem related to cumulative resource so that it will be easier to create a WithoutCumulativeResource mixin
This allows for any scheduling problem to derive from GenericSchedulingProblem by adding the proper mixins when some features are missing. Notes - WithoutMultimode is actually Singlemode - generic lns tools for tasks problems are to be adapted so that check like `isinstance(problem, AllocationProblem)` are replaced by `isinstance(problem, AllocationProblem) and not isinstance(problem, WithoutAllocationProblem)`
- Fix wf parser to enforce integer times - Update wf/sched to have integers in objectives - Increase speed of wf/sched + cpsat test
- automatically create cpsat variables - add constraints corresponding to the different features - warmstart included - generate temporary solution to be converted to actual problem solution via `convert_task_variables_to_solution()` to implement - extra custom constraints to be added by overriding `init_model()` - subclass `SinglemodeGenericSchedulingAutoCpSatSolver` gives access to `get_task_interval()` to avoid having to call a multimode method with mode=default_mode
- jsp - fjsp - rcpsp - rcpsp_multiskill - workforce/scheduling
- the constraints take into account the calendar of each resource - it avoids confusion between renewable and non-renewable resources (and NoRenewableResource, NonRenewableResource, and NoNonRenewableResource)
That way, the no overlap constraint on machines is auto generated by cpsat auto. We also add an option in CalendarResourceCpsatSolver to add cumulative constraint on top of no overlap constraint to mimic the option existing in the fjsp cpsat solver.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That way, the no overlap constraint on machines is auto generated by cpsat auto.
We also add an option in CalendarResourceCpsatSolver to add cumulative constraint on top of no overlap constraint to mimic the option existing in the fjsp cpsat solver.