That's weird:
If there are no solver phases configured, it fails-fast,
yet it doesn't log any solver phase messages.
Logging has improved for 5.4.0.Beta1, try upgrading to that
and put the logging level to trace for org.drools.planner.
Alternatively, put a breakpoint in a method in
DefaultLocalSearchSolverPhase.
Op 30-01-12 13:43, aitchnyu schreef:
I wrote a program in Drools. But it does not do anything. As the logs
show,
the solver finishes in 2 ms and the 'best solution' is an untouched version
of the initial state.
I also noted that not a single movefactory object was created. And at 500
moves/sec and 2 milliseconds of execution, only one move was attempted.
Where do I start troubleshooting?
SudokuGenerator sg = new SudokuGenerator();
Solution sudoku = sg.createSudoku();
Solver solver = createSolver();
solver.setPlanningProblem(sudoku);
solver.solve();
System.out.println("solver over");
Sudoku result = (Sudoku) solver.getBestSolution();
result.displaySolution(); //a method that prints the state of the solution
*Output logs in TRACE mode*
jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java in.co.technovia.sudoku.App
2012-01-30 17:23:33,795 [main] INFO Solver started: time spend (1), score
(0), new best score (0), random seed (0).
2012-01-30 17:23:33,796 [main] INFO Solved: time spend (2), best score (0),
average calculate count per second (500).
*Contents of the solver XML*
<?xml version="1.0" encoding="UTF-8"?>
<solver>
<environmentMode>DEBUG</environmentMode>
<solutionClass>in.co.technovia.sudoku.domain.Sudoku</solutionClass>
<planningEntityClass>in.co.technovia.sudoku.domain.Digit</planningEntityClass>
<scoreDrl>/score.drl</scoreDrl>
<scoreDefinition>
<scoreDefinitionType>SIMPLE</scoreDefinitionType>
</scoreDefinition>
<termination>
<scoreAttained>0</scoreAttained>
</termination>
<constructionHeuristic>
<constructionHeuristicType>FIRST_FIT</constructionHeuristicType>
</constructionHeuristic>
<localSearch>
<selector>
<moveFactoryClass>in.co.technovia.sudoku.solution.RowChangeMoveFactory</moveFactoryClass>
</selector>
<acceptor>
<completeSolutionTabuSize>1000</completeSolutionTabuSize>
</acceptor>
<forager>
</forager>
</localSearch>
</solver>
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-troubleshoot-Drools-planner-doin...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
With kind regards,
Geoffrey De Smet