Removes deprecated method createNextGenerationPerformed from
InterfaceStatistics. This was only used in EvA2ESModel.
This commit is contained in:
parent
ca70b48bd2
commit
c3eddfbee4
@ -67,6 +67,8 @@ public class Main {
|
|||||||
final class YamlStatistics implements InterfaceStatistics {
|
final class YamlStatistics implements InterfaceStatistics {
|
||||||
private static final Logger LOGGER = Logger.getLogger(YamlStatistics.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(YamlStatistics.class.getName());
|
||||||
private InterfaceStatisticsParameters statisticsParameters;
|
private InterfaceStatisticsParameters statisticsParameters;
|
||||||
|
private List<LinkedHashMap<String, Object>> runs = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public YamlStatistics(InterfaceStatisticsParameters statisticsParameters) {
|
public YamlStatistics(InterfaceStatisticsParameters statisticsParameters) {
|
||||||
super();
|
super();
|
||||||
@ -113,11 +115,6 @@ final class YamlStatistics implements InterfaceStatistics {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createNextGenerationPerformed(double[] bestFit, double[] worstFit, int calls) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InterfaceStatisticsParameters getStatisticsParameters() {
|
public InterfaceStatisticsParameters getStatisticsParameters() {
|
||||||
return statisticsParameters;
|
return statisticsParameters;
|
||||||
|
@ -920,37 +920,6 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
|
|||||||
return new Pair<>(statValuesString, statValues.toArray(new Object[statValues.size()]));
|
return new Pair<>(statValuesString, statValues.toArray(new Object[statValues.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated The method {@link #createNextGenerationPerformed(eva2.optimization.population.PopulationInterface, eva2.optimization.strategies.InterfaceOptimizer, java.util.List)} should be used instead.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public synchronized void createNextGenerationPerformed(double[] bestFit,
|
|
||||||
double[] worstFit, int calls) {
|
|
||||||
functionCalls = calls;
|
|
||||||
currentBestFit = bestFit;
|
|
||||||
currentWorstFit = worstFit;
|
|
||||||
currentBestFeasibleFit = null;
|
|
||||||
currentMeanFit = null;
|
|
||||||
|
|
||||||
if (firstPlot) {
|
|
||||||
initializePlots(null, null);
|
|
||||||
firstPlot = false;
|
|
||||||
}
|
|
||||||
if ((iterationCounter == 0) && printHeaderByVerbosity()) {
|
|
||||||
printToTextListener(getOutputHeaderFieldNamesAsString(null) + '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doTextOutput() && printLineByVerbosity(calls)) {
|
|
||||||
Pair<String, Object[]> addInfo = getOutputData(null, null);
|
|
||||||
printToTextListener(addInfo.head() + '\n');
|
|
||||||
if (addInfo.tail() != null) {
|
|
||||||
statDataSumOverAll = updateSum(statDataSumOverAll, ToolBox.parseDoubles(addInfo.tail()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
plotCurrentResults();
|
|
||||||
iterationCounter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the given array to the member array. Do some checks etc.
|
* Add the given array to the member array. Do some checks etc.
|
||||||
* If a resultSum array is provided, it is used to add the info and returned. Otherwise
|
* If a resultSum array is provided, it is used to add the info and returned. Otherwise
|
||||||
|
@ -35,8 +35,6 @@ public interface InterfaceStatistics {
|
|||||||
|
|
||||||
void createNextGenerationPerformed(PopulationInterface Pop, InterfaceOptimizer opt, List<InterfaceAdditionalPopulationInformer> informerList);
|
void createNextGenerationPerformed(PopulationInterface Pop, InterfaceOptimizer opt, List<InterfaceAdditionalPopulationInformer> informerList);
|
||||||
|
|
||||||
void createNextGenerationPerformed(double[] bestFit, double[] worstFit, int calls);
|
|
||||||
|
|
||||||
InterfaceStatisticsParameters getStatisticsParameters(); // called from moduleadapter
|
InterfaceStatisticsParameters getStatisticsParameters(); // called from moduleadapter
|
||||||
|
|
||||||
IndividualInterface getRunBestSolution(); // return the best fitness of the last run (may not be equal to the last population)
|
IndividualInterface getRunBestSolution(); // return the best fitness of the last run (may not be equal to the last population)
|
||||||
|
@ -49,11 +49,6 @@ public class StatisticsDummy implements InterfaceStatistics, InterfaceTextListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createNextGenerationPerformed(double[] bestFit,
|
|
||||||
double[] worstFit, int calls) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double[] getBestFitness() {
|
public double[] getBestFitness() {
|
||||||
if (bestIndividualAllover != null) {
|
if (bestIndividualAllover != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user