@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ExperimentResults) { ExperimentResults that = (ExperimentResults) o; return (this.configurations.equals(that.getConfigurations())) && (this.scenarios.equals(that.getScenarios())) && (this.showGui == that.isShowGui()) && (this.repetitions == that.getRepetitions()) && (this.masterSeed == that.getMasterSeed()) && (this.results.equals(that.getResults())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ExperimentResults) { ExperimentResults that = (ExperimentResults) o; return (this.configurations.equals(that.getConfigurations())) && (this.scenarios.equals(that.getScenarios())) && (this.showGui == that.isShowGui()) && (this.repetitions == that.getRepetitions()) && (this.masterSeed == that.getMasterSeed()) && (this.results.equals(that.getResults())); } return false; }
@Test public void testCustomPostProcessor() { TestUtil.testEnum(Experiment.Computers.class); final Scenario scenario = ScenarioTestUtil.createRandomScenario(123L, StatsTracker.builder()); final Experiment.Builder builder = Experiment.builder() .addScenario(scenario) .addConfiguration(ExperimentTestUtil.testConfig("test")) .usePostProcessor(ExperimentTestUtil.testPostProcessor()) .addResultListener(new CommandLineProgress(System.out)) .withRandomSeed(123); final ExperimentResults er = builder.perform(); assertEquals(123, er.getMasterSeed()); assertEquals(123, er.getResults().asList().get(0).getSimArgs().getRandomSeed()); @SuppressWarnings("unchecked") final List<Point> positions = (List<Point>) er.getResults().asList().get(0).getResultObject(); assertEquals(10, positions.size()); }