public static StatisticsDTO singleRun(Scenario scenario, MASConfiguration c, long seed, ObjectiveFunction objFunc, boolean showGui) { return (StatisticsDTO) Experiment .singleRun(scenario, c, seed, showGui, PostProcessors.statisticsPostProcessor(objFunc), null) .getResultObject(); }
Builder() { configurationsSet = newLinkedHashSet(); scenariosBuilder = ImmutableSet.builder(); scenarioProviderBuilder = Optional.absent(); fileReader = ScenarioIO.reader(); resultListeners = newArrayList(); showGui = false; repetitions = 1; seedRepetitions = 1; masterSeed = 0L; numThreads = Runtime.getRuntime().availableProcessors(); numBatches = 1; compositeTaskSize = 1; computerType = Computers.LOCAL; postProc = PostProcessors.defaultPostProcessor(); experimentOrdering = DEFAULT_EXPERIMENT_ORDERING; }
.withThreads(1) .usePostProcessor( PostProcessors.statisticsPostProcessor( Gendreau06ObjectiveFunction.instance(vehicleSpeedKmh), FailureStrategy.INCLUDE))
Builder() { configurationsSet = newLinkedHashSet(); scenariosBuilder = ImmutableSet.builder(); scenarioProviderBuilder = Optional.absent(); fileReader = ScenarioIO.reader(); resultListeners = newArrayList(); showGui = false; repetitions = 1; seedRepetitions = 1; masterSeed = 0L; numThreads = Runtime.getRuntime().availableProcessors(); numBatches = 1; compositeTaskSize = 1; computerType = Computers.LOCAL; postProc = PostProcessors.defaultPostProcessor(); experimentOrdering = DEFAULT_EXPERIMENT_ORDERING; }
.addConfiguration(Central.solverConfiguration(dsc)) .addScenario(scenario) .usePostProcessor(PostProcessors.statisticsPostProcessor(obj)) .perform(); assertEquals(1, results.getResults().size());
RtCentral.solverConfigurationAdapt(RandomSolver.supplier(), "")) .usePostProcessor(PostProcessors .statisticsPostProcessor(Gendreau06ObjectiveFunction.instance())) .perform();
static StatisticsDTO simulate(Scenario scenario) { final ExperimentResults results = Experiment.builder() .addScenario(scenario) .addConfiguration(Central.solverConfiguration( StochasticSuppliers.constant(TestSolvers.lazyInsertion()))) .withThreads(1) .usePostProcessor(PostProcessors.statisticsPostProcessor(OBJ_FUNC)) .showGui(View.builder() .withAutoPlay() // .withAutoClose() .withSpeedUp(4) // .withFullScreen() .withTitleAppendix("AAMAS 2016 Experiment") .with(RoadUserRenderer.builder() .withToStringLabel()) .with(PDPModelRenderer.builder()) .with(RouteRenderer.builder()) .with(PlaneRoadModelRenderer.builder()) .with(TimeLinePanel.builder()) .withResolution(1280, 1024)) .showGui(false) .perform(); final SimulationResult res = results.getResults().iterator().next(); final StatisticsDTO stats = (StatisticsDTO) res.getResultObject(); return stats; }