Skip to content

Shadow variable or predicate Pinning #2471

Description

@greyhairredbear

Is your feature request related to a problem? Please describe.
In our internal field service routing model, we allow users to pin a start service time of a certain visit on an itinerary. This is implemented on a constraint level and allows changes in the planning list variable before the pinned item on the itinerary (provided the pinned start service time still holds), contrary to the pinning the solver currently supports.

Describe the solution you'd like
Some way (maybe an annotation) to specify that a shadow variable on a planning entity is considered pinned and must not change during solving. After evaluation of the shadow variables, the solver could check whether a pinned shadow variable has changed and reject a move before evaluating any constraint.

Alternatively, we could provide a way to specify a predicate as pinned. The value of that predicate would need to stay true after every move.

Considerations (partially discussed with @triceo)

  • We could save two constraints in our internal field service routing model by having solver support for this
  • other uses cases may be opened up by this
    • Example: Reject moves that create unreachable routes in our internal FSR/PDR models
  • This will blur the lines between "real" pinning, where the solver doesn't even touch entities that are pinned and constraints, where the solver would need to evaluate all constraints before making a decision on whether it accepts or rejects a move
  • what happens if the value of the shadow variable is already different from its pinned value in the initial solution?
    • The solver would need to make sure that no moves are rejected that didn't have any influence one the pinned predicate/shadow variable

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions