Merging mk branch rev. 675 (bugfix)
This commit is contained in:
@@ -54,7 +54,7 @@ if ((nargin == 2) || (nargin == 3))
|
|||||||
else if (xTol > 0) % only phenotye convergence
|
else if (xTol > 0) % only phenotye convergence
|
||||||
convTerm = MatlabProblem.makePhenConvTerm(xTol, int.opts.TolXEvals);
|
convTerm = MatlabProblem.makePhenConvTerm(xTol, int.opts.TolXEvals);
|
||||||
else if (fTol > 0 ) % only fitness covnergence
|
else if (fTol > 0 ) % only fitness covnergence
|
||||||
convTerm = MatlabProbelm.makeFitConvTerm(fTol, int.opts.TolFunEvals);
|
convTerm = MatlabProblem.makeFitConvTerm(fTol, int.opts.TolFunEvals);
|
||||||
else
|
else
|
||||||
convTerm = 'undef'; % signal that there is no terminator yet
|
convTerm = 'undef'; % signal that there is no terminator yet
|
||||||
end
|
end
|
||||||
|
@@ -58,6 +58,8 @@ public class HistoryConvergenceTerminator implements InterfaceTerminator, Serial
|
|||||||
}
|
}
|
||||||
} else { // look at improvements
|
} else { // look at improvements
|
||||||
AbstractEAIndividual historicHWAgo = subHist.get(0);
|
AbstractEAIndividual historicHWAgo = subHist.get(0);
|
||||||
|
// System.out.println("Ref indy: " + historicHWAgo);
|
||||||
|
// System.out.println("Best historic: " + ((Population)pop).getBestHistoric());
|
||||||
res = true;
|
res = true;
|
||||||
for (int i = 1; i < haltingWindowLen; i++) {
|
for (int i = 1; i < haltingWindowLen; i++) {
|
||||||
// if historic[-hW] is worse than historic[-hW+i] return false
|
// if historic[-hW] is worse than historic[-hW+i] return false
|
||||||
@@ -79,7 +81,7 @@ public class HistoryConvergenceTerminator implements InterfaceTerminator, Serial
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the criterion by which individual improvement is judged. The original version defined
|
* Define the criterion by which individual improvement is judged. The original version defined
|
||||||
* improvement strictly, but for some EA this should be done more laxly. E.g. DE will hardly ever
|
* improvement strictly, but for some EA this should be done more laxly. E.g. DE will hardly ever
|
||||||
* stop improving slightly, so optionally use an epsilon-bound: improvement only counts if it is
|
* stop improving slightly, so optionally use an epsilon-bound: improvement only counts if it is
|
||||||
|
@@ -211,7 +211,7 @@ Serializable {
|
|||||||
*/
|
*/
|
||||||
protected boolean isStillConverged(PopulationInterface pop) {
|
protected boolean isStillConverged(PopulationInterface pop) {
|
||||||
double measure = calcPopulationMeasure(pop);
|
double measure = calcPopulationMeasure(pop);
|
||||||
double allowedLower=Double.MIN_VALUE, allowedUpper=Double.MAX_VALUE;
|
double allowedLower=Double.NEGATIVE_INFINITY, allowedUpper=Double.POSITIVE_INFINITY;
|
||||||
boolean ret;
|
boolean ret;
|
||||||
switch (changeType) {
|
switch (changeType) {
|
||||||
case absoluteChange:
|
case absoluteChange:
|
||||||
@@ -219,7 +219,7 @@ Serializable {
|
|||||||
if (!doCheckImprovement()) allowedUpper=oldMeasure+convThresh;
|
if (!doCheckImprovement()) allowedUpper=oldMeasure+convThresh;
|
||||||
break;
|
break;
|
||||||
case absoluteValue:
|
case absoluteValue:
|
||||||
allowedLower=convThresh;
|
allowedUpper=convThresh;
|
||||||
// if (!doCheckImprovement()) allowedUpper = convThreshUpper;
|
// if (!doCheckImprovement()) allowedUpper = convThreshUpper;
|
||||||
break;
|
break;
|
||||||
case relativeChange:
|
case relativeChange:
|
||||||
|
Reference in New Issue
Block a user