OptaPlanner Xml configuration and entitySubclass is not configured as a planning entity error -


i new optaplanner , having diffculty in configuring solution. have anotated of classes correctly getting following error when solver runs.

a planning entity instance of entitysubclass (class  org.optaplanner.core.impl.score.director.drools.droolsscoredirector) not  configured planning entity. if class (droolsscoredirector) (or superclass thereof) not entityclass  ([...part]), check solution implementation's annotated methods. if is, check solver configuration 

here xml configuration using.

<?xml version="1.0" encoding="utf-8"?> <solver>     <solutionclass>(package name).sheetnesting</solutionclass>     <planningentityclass>(package name).part</planningentityclass>     <scoredirectorfactory>         <scoredefinitiontype>hard_soft</scoredefinitiontype>         <scoredrl>/resources/drools/nestingrules.drl</scoredrl>     </scoredirectorfactory>     <termination>         <maximumsecondsspend>500</maximumsecondsspend>     </termination>     <constructionheuristic>         <constructionheuristictype>first_fit_decreasing</constructionheuristictype>     </constructionheuristic>     <localsearch>     <unionmoveselector>       <changemoveselector>         <valueselector>           <variablename>sheet</variablename>         </valueselector>       </changemoveselector>       <movelistfactory>           <movelistfactoryclass>(package name).xposmovefactory</movelistfactoryclass>       </movelistfactory>       <movelistfactory>           <movelistfactoryclass>(package name).yposmovefactory</movelistfactoryclass>       </movelistfactory>     </unionmoveselector>     <acceptor>       <lateacceptancesize>600</lateacceptancesize>     </acceptor>     <forager>       <acceptedcountlimit>4</acceptedcountlimit>     </forager>   </localsearch> </solver> 

the output shows solution establishes (possible evaluates phase(0) error thrown. appreciated.

*edit firstly thank comments. definition of part class follows

@planningentity(difficultycomparatorclass = partcomparator.class) public class part  {      ....     @planningvariable(valuerangeproviderrefs = {"sheetrange"})     public sheet getsheet()     {         ....     }       @planningvariable(valuerangeproviderrefs = {"xposrange"})     public double getxcenter()     {         ....     }      @planningvariable(valuerangeproviderrefs = {"yposrange"})     public double getycenter()     {         ....     } } 

as can see class annotated, described. why believed issue configuration.

seems error it's telling (package name).part class not annotated @planningentity , @planningvariable described in documentation: http://docs.jboss.org/drools/release/6.0.1.final/optaplanner-docs/html_single/index.html#planningentity

if class correctly annotated please share in question.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -