Skip to content
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

Feat: PlanningVariable Pinning #1321

Open
StefanWolf-tp opened this issue Jan 14, 2025 · 2 comments
Open

Feat: PlanningVariable Pinning #1321

StefanWolf-tp opened this issue Jan 14, 2025 · 2 comments
Labels
enhancement New feature or request process/needs triage Requires initial assessment of validity, priority etc.

Comments

@StefanWolf-tp
Copy link

Is your feature request related to a problem? Please describe.
I have a situation where i can only change one planningvariable in my entity which has more planningvariable. this situation is new and it should be everything pinned except of one planningvariable. I looked up if there is something i can use and found an old feature request of optaplanner (https://issues.redhat.com/browse/PLANNER-124)

My current solution is, that i have a (similar) logic in my valueRangeProviders, which is returning only the set value except of the planning variable which should not be pinned.

Describe the solution you'd like
https://issues.redhat.com/browse/PLANNER-124

@StefanWolf-tp StefanWolf-tp added enhancement New feature or request process/needs triage Requires initial assessment of validity, priority etc. labels Jan 14, 2025
@triceo
Copy link
Contributor

triceo commented Jan 14, 2025

Hello @StefanWolf-tp! Thanks for reporting.

This is indeed a functionality gap - at the moment, I cannot promise if or when we'll get to closing it.

@StefanWolf-tp
Copy link
Author

okay for documentation - in case the redhat link will not availible anymore.

Old title: Planning variable immovability (not just per entity): A planning variable can be immovable for Planner based on a SelectionFilter while another variable in the same entity is movable

Not simple, because:

  • entities would need to be selected, but only in move selectors that actually change one of the pinned planning variables.
  • moves selectors that change multiple variables must not change pinned planning variables

strawman napkin design:

@PlanningEntity
class Lesson {

   @PlanningPin(variable= {"room"})
   private boolean roomLocked;

    @PlanningVariable
    private Timeslot timeslot;
    @PlanningVariable
    private Room room;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request process/needs triage Requires initial assessment of validity, priority etc.
Projects
None yet
Development

No branches or pull requests

2 participants