Skip to content

Nullable + Chained planning variable (for unassigned tasks) #1996

@Southclaws

Description

@Southclaws

Is your feature request related to a problem? Please describe.

So this is something called out in the docs and code via exception, but I was wondering essentially what's the blocker for implementing this.

Currently chained planning variables are not compatible with nullable.

java.lang.IllegalArgumentException: The entityClass (class ...solver.productionschedule.AssemblyDomain$Task) has a @PlanningVariable annotated property (previousStandstill) with chained (true), which is not compatible with nullable (true).

Describe the solution you'd like

I'm unfamiliar with the inner workings of Optaplanner and how chained-variables work, or even why they're special compared to regular planning variables. So, it would be a "nice to have" if I could model "unassigned" (impossible to assign, due to line/machine failure that day etc) but maybe this was omitted due to complexity, which I'd completely understand!

Describe alternatives you've considered

For now I've just done a phantom "Workcentre" (fake production line) where unassigned tasks are "scheduled" and post-processed this to mark them as unassigned so the scheduler can manually push these next-day or deal with it some other way. This works fine so it's not a huge issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    process/needs triageRequires initial assessment of validity, priority etc.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions