optaplanner-core/src/main/java/org/optaplanner/core/impl/solver/termination/OrCompositeTermination.java
@Override
    public double calculatePhaseTimeGradient(AbstractPhaseScope phaseScope) {
        double timeGradient = 0.0;
        for (Termination termination : terminationList) {
            double nextTimeGradient = termination.calculatePhaseTimeGradient(phaseScope);
            if (nextTimeGradient >= 0.0) {
                timeGradient = Math.max(timeGradient, nextTimeGradient);
            }
        }
        return timeGradient;
    }
@Override
    public double calculatePhaseTimeGradient(AbstractPhaseScope phaseScope) {
        double timeGradient = 0.0;
        for (Termination termination : terminationList) {
            double nextTimeGradient = termination.calculatePhaseTimeGradient(phaseScope);
            if (nextTimeGradient >= 0.0) {
                timeGradient = Math.max(timeGradient, nextTimeGradient);
            }
        }
        return timeGradient;
    }
@ Override public double calculatePhaseTimeGradient ( AbstractPhaseScope phaseScope ) { double timeGradient = 0.0 ; for ( Termination termination : terminationList ) { double nextTimeGradient = termination . calculatePhaseTimeGradient ( phaseScope ) ; if ( nextTimeGradient >= 0.0 ) { timeGradient = Math . max ( timeGradient , nextTimeGradient ) ; } } return timeGradient ; }
Calculates the maximum timeGradient of all Terminations.
Not supported timeGradients (-1.0) are ignored.
@param phaseScope never null
@return the maximum timeGradient of the Terminations.
Calculates the maximum timeGradient of all Terminations . Not supported timeGradients ( - 1 . 0 ) are ignored .