lovedeep sangha
lovedeep sangha

Reputation: 18

Optaplanner termination property not Working according to given time

<scoreDirectorFactory>
    <scoreDrl>Optaplanner/TaskScheduling.drl</scoreDrl>
</scoreDirectorFactory>


<constructionHeuristic>
    <constructionHeuristicType>FIRST_FIT</constructionHeuristicType>
</constructionHeuristic>




 <localSearch>
        <localSearchType>HILL_CLIMBING</localSearchType>
    </localSearch>

<termination>

    <bestScoreLimit>0hard/0soft</bestScoreLimit>

    <minutesSpentLimit>5</minutesSpentLimit>

  
</termination>

Here is the configuration file am using but the solver does not entertain time of termination

'''Solving started: time spent (216), best score (-20init/2000hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0). Construction Heuristic phase (0) ended: time spent (752), best score (24800hard/618soft), score calculation speed (528/sec), step total (20). Solving ended: time spent (764), best score (24800hard/618soft), score calculation speed (369/sec), phase total (2), environment mode (REPRODUCIBLE).'''

Upvotes: 0

Views: 143

Answers (1)

Radovan Synek
Radovan Synek

Reputation: 1029

The default composition style for multiple termination conditions is OR. As the score attained after the Construction Heuristic phase (24800hard/618soft) > 0hard/0soft, the first condition about bestScoreLimit was satisfied and the solver terminated.

Please see more about termination composition in the documentation:

Upvotes: 1

Related Questions