Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-190

ValueRangeProvider from a custom factory class (not Solution or entity)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Optional Optional
    • Future
    • None
    • optaplanner-core

      For those who don't want to litter their Entities or Solution classes with the value provider logic, we 'd support something like this:

      public class MyFactory {
      
        @ValueRangeProvider(id = "myValueRange")
        public Collection<MyValue> getValues(...) {
      
        }
      
      }
      

      Of course, OptaPlanner will need to know about this, so it will need something like this in the solver config xml:

      <solver>
        <solutionClass>...</>
        ...
        <valueRangeProviderClass>...MyFactory</valueRangeProviderClass>
        ...
      </solver>
      

            Unassigned Unassigned
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: