Skip to content

Feat: Flexible configuration mechanism #1383

Closed
Closed
@tomAgnicio

Description

@tomAgnicio

Is your feature request related to a problem? Please describe.
The config mechanism is rather rigid, for this topic I'm focussing on ConstraintProvider. You can only pass in Class<? extends ConstraintProvider>

Describe the solution you'd like
An option to pass in an instance of a ConstrainProvider , so I can take full power.

I want to be able to load my constraints from a database or any other storage and define scores based on some runtime context.

Describe alternatives you've considered
There are some override mechanisms but its all seems limited and clumsy.

I took a checkout of the solver core to implement an alternative mechanism but the class is being used all over the place and instantiation happens late. I hoped to easily provide an alternative solution by implementing some interfaces.

So before even attempting this I want to get other people's opinion on this.

One other option is to make a really weird setup where I make a different class for each possible use case and have that delegate to everything else. But this feels weird and ugly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions