Minor tweaks

This commit is contained in:
Marcel Kronfeld 2011-05-05 13:07:06 +00:00
parent eb1c33549b
commit 1b4f07edb3
2 changed files with 13 additions and 3 deletions

View File

@ -195,6 +195,14 @@ public class CBNPSO extends ClusterBasedNichingEA implements Serializable {
return ToolBox.appendArrays(super.getAdditionalDataHeader(), addVals);
}
@Override
public String[] getAdditionalDataInfo() {
String[] addVals = {"Ratio of interesting solutions within all archived solutions"};
if (getCurrentPeriod()>=0) addVals = new String[]{"Ratio of interesting solutions within all archived solutions",
"Current sigma adaptation period"};
return ToolBox.appendArrays(super.getAdditionalDataInfo(), addVals);
}
/**
* Retrieve the current period of the sinusoidal sigma adaption (in case it is controlled by a threshold adaption)
* or -1 if this does not apply.

View File

@ -120,9 +120,11 @@ public class EvAJobList extends PropertySelectableList<EvAJob> implements Serial
File sFile = fc.getSelectedFile();
if (sFile.exists()) {
for (EvAJob job : selected) {
if (!FileTools.saveObjectToFolder(job, sFile, false, parentComponent)) {
System.err.println("Error on saving jobs...");
return false;
if (job!=null) {
if (!FileTools.saveObjectToFolder(job, sFile, false, parentComponent)) {
System.err.println("Error on saving jobs...");
return false;
}
}
}
} else return false; // invalid folder chosen