public File getRunDir(Run run) { String runName = run.getName(); if (runName == null) throw new IllegalArgumentException("Run doesn't have a name."); File runDir = new File(root, runName); if (!runDir.exists()) runDir.mkdir(); return runDir; }
public boolean needsToRun(Run run, int generation) { Population pop = getPopulationFor(run, generation); int count = run.getIntProperty(GenetikConstants.POPULATION, Integer.MAX_VALUE, true); int scoreCount = 0; for (int i = 0, max = pop.size(); i < max; i++) { Individual ind = pop.get(i); if (ind.hasFitness() && ind.hasScores()) { scoreCount++; } } return scoreCount != count; }