[rules-users] Multiple planning variables in optaplanner 6.0.1‏

Geoffrey De Smet ge0ffrey.spam at gmail.com
Mon Feb 17 03:14:14 EST 2014


The examination example is the only example which is left on my "to 
cleanup" list.
It's difficult and convoluted currently.

The curriculum course example is very similar, has 2 planning variables 
on the same planning entity,
and is a much prettier example to learn from.
Here's how you configure it to avoid that Exception:
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/resources/org/optaplanner/examples/curriculumcourse/solver/curriculumCourseSolverConfig.xml

On 10-02-14 23:16, lloydstockman wrote:
> Hi Guys,
>
> I am trying to get a basic program going using Optaplanner 6.0.1 I have come
> across a problem because I am using two planning variables within a single
> planning entity. I have checked other examples, such as the examination
> example, and it seems fine to have multiple planning variables within a
> single planning entity. I also tried to add another planning variable to the
> cloud balancing example and the same error occurs so I believe there is
> something I need to do to be able to use multiple planning variables in a
> single entity. The error is as follows.
>
> Exception in thread "main" java.lang.IllegalArgumentException: The
> selectorConfig (ValueSelectorConfig(null)) has no configured variableName
> (null) for planningEntityClass (class domain.Provisional) and because there
> are multiple in the variableNameSet ([date, morning, technician]), it can
> not be deducted automatically.
>      at
> org.optaplanner.core.config.heuristic.selector.SelectorConfig.deduceVariableDescriptor(SelectorConfig.java:108)
>
> I haven't found anything in the manual to suggest what needs to be done in
> this scenario, or found any posts of the forum regarding this topic. If
> anyone can point me in the right direction I would greatly appreciate it.
>
> best regards,
>   - Lloyd Stockman
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Multiple-planning-variables-in-optaplanner-6-0-1-tp4028047.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list