-
Notifications
You must be signed in to change notification settings - Fork 157
feat: enable sorting for CH with list variable #1833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@triceo I noticed other factories used by configurations and annotations that are not located in the public API. Maybe, we should handle that in a separate PR as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, the different selector combinations are causing me to ask questions - see inline.
Downstream tests are failing.
Also, please provide a migration recipe for the move of the interface to the public API; the uses of the old interface should be replaced by the new one.
Finally, the change needs to show up in the upgrade recipe in our docs.
|
||
/** | ||
* Creates a weight to decide the order of a collections of selections | ||
* (a selection is a {@link PlanningEntity}, a planningValue, a {@link Move} or a {@link Selector}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we weight selectors?
(And if selectors are not public API, should this be mentioning them?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sorter is created by the WeightFactorySelectionSorter
, which is utilized by ValueSelectorFactory
and EntitySelectorFactory
when creating the sorter nodes SortingValueSelector
and SortingEntitySelector
, respectively.
core/src/main/java/ai/timefold/solver/core/api/domain/common/SorterWeightFactory.java
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/domain/common/SorterWeightFactory.java
Show resolved
Hide resolved
* For example: sorting 3 computers on strength based on their RAM capacity: | ||
* Computer B (1GB RAM), Computer A (2GB RAM), Computer C (7GB RAM), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a typical use for a list variable, is it?
Let's do VRP instead.
...efold/solver/core/impl/heuristic/selector/common/decorator/SelectionSorterWeightFactory.java
Show resolved
Hide resolved
...in/java/ai/timefold/solver/core/impl/heuristic/selector/list/DestinationSelectorFactory.java
Outdated
Show resolved
Hide resolved
...in/java/ai/timefold/solver/core/impl/heuristic/selector/list/DestinationSelectorFactory.java
Outdated
Show resolved
Hide resolved
89b3bd0
to
beebea8
Compare
I have included a recipe for automatic migration to the new interface. Do we need to add anything to our docs? |
|
No description provided.