Commit f3d81d3d authored by René Schöne's avatar René Schöne
Browse files

ACO: Enlarge population and iteration size to (probably) always pass test_05.

parent b1fb4203
......@@ -11,6 +11,6 @@ import de.tudresden.inf.st.mquat.solving.Solver;
public class ACOHandwrittenTest extends HandwrittenTestSuite {
@Override
protected Solver getSolver() {
return new ACOSolver().setPopulation_size(100);
return new ACOSolver().setPopulation_size(1000).setIteration_size(5);
}
}
......@@ -13,6 +13,7 @@ import java.net.URL;
import java.util.Iterator;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertEquals;
public abstract class HandwrittenTestSuite {
private static Logger logger;
......@@ -72,7 +73,7 @@ public abstract class HandwrittenTestSuite {
String instanceName, Assignment expectedProvidingAssignment) {
Instance instance = requiringAssignment.getImplementation().resolveInstance(instanceName).get();
Assignment actualProvidingAssignment = requiringAssignment.mappedAssignment(instance);
Assert.assertEquals(String.format("Not matching assignment for %s", instanceName),
assertEquals(String.format("Not matching assignment for %s", instanceName),
expectedProvidingAssignment, actualProvidingAssignment);
}
......@@ -150,6 +151,8 @@ public abstract class HandwrittenTestSuite {
assertComponentRequirement(configB,"delta", configD);
assertComponentRequirement(configE,"phi", configF);
assertComponentRequirement(configE,"gamma", configG);
assertEquals("Objective does not fit", 21885.66,
modelAndSolution.getSecondElement().computeObjective(), 0.01);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment