Op 11-07-12 17:52, Geoffrey De Smet schreef:
>
>
> Op 11-07-12 17:19, Garf schreef:
>> I'm using v5.4. I've built a prototype which uses the constructionHeuristic,
>> and localSearch, as the example does, and am able to run the solver (though
>> it still doesn't do a good job of solving at this point).
>>
>> I've now added customSolverPhase, and set it to use an initializer class
>> which implements CustomSolverPhaseCommand.
>>
>> In my changeWorkingSolution, I call scoreDirector.beforeEntityAdded(), and
>> then set the planning entity's planning variable, and then call
>> afterEntityAdded().
>>
>> If I leave any entities unadded -- and let the constructionHeuristic
>> (BEST_FIT, etc) do the fitting (which I can verify from the logs)-- I then
>> get this exception:
>>
>> /java.lang.IllegalStateException: Phase localSearch started with an
>> uninitialized Solution. First initialize the Solution. For example, run a
>> phase constructionHeuristic first./
> This sounds like a bug.
> Unless, you called afterEntityAdded() on the non initialized entities too?
>
> If that's not the case, could you file a jira?
>     https://issues.jboss.org/browse/JBRULES
It's strange though: partially initialized solutions work fine in 
real-time planning use cases in cloud balance example etc.
Double check if you aren't calling afterEntityAdded() on the 
non-initialized entities too.
Also check that the construction heurstics run before the localSearch 
solver does (the order in which they are declared in the config xml 
matters).

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to