Online_evProc_adaptiveRoutingDual extends IEventProcessor { @Override public List<Triple<String, String, String>> getParameters() { return InputParameter.getInformationAllInputParameterFieldsOfObject(this); }  @Override String getDescription(); @Override List<Triple<String, String, String>> getParameters(); @Override void initialize(NetPlan currentNetPlan, Map<String, String> algorithmParameters, Map<String, String> simulationParameters, Map<String, String> net2planParameters); @Override void processEvent(NetPlan currentNetPlan, SimEvent event); String finish(StringBuilder st , double simTime);  }
@Test public void test() { final IEventGenerator generator = new Online_evGen_doNothing(); final IEventProcessor processor = new Online_evProc_adaptiveRoutingDual(); final Map<String,String> simulationParameters = new HashMap<> (); simulationParameters.put("disableStatistics" , "false"); simulationParameters.put("refreshTime" , "1"); simulationParameters.put("simEvents" , "-1"); simulationParameters.put("transitoryEvents" , "-1"); simulationParameters.put("transitoryTime" , "" + (TIMEPERSIMULATIONINSECONDS == -1? -1 : TIMEPERSIMULATIONINSECONDS/2)); simulationParameters.put("simTime" , "" + TIMEPERSIMULATIONINSECONDS); final Map<String,String> net2planParameters = ImmutableMap.of("precisionFactor" , "0.001"); final Map<String,List<String>> generatorParameters = new HashMap <>(); final List<Map<String,String>> testsParamGenerator = InputParameter.getCartesianProductOfParameters (generatorParameters); for (Map<String,String> paramsGeneratorChangingThisTest : testsParamGenerator) { final Map<String,String> allParamsGeneratorThisTest = InputParameter.getDefaultParameters(generator.getParameters()); allParamsGeneratorThisTest.putAll(paramsGeneratorChangingThisTest); final Map<String,List<String>> processorParameters = new HashMap <>(); processorParameters.put("simulation_outFileNameRoot" , Arrays.asList(temporalDirectoryTests.getRoot().getAbsolutePath() + "/rootOutput")); final List<Map<String,String>> testsParamProcessor = InputParameter.getCartesianProductOfParameters (processorParameters); for (Map<String,String> paramsProcessorChangingThisTest : testsParamProcessor) { final Map<String,String> allParamsProcessorThisTest = InputParameter.getDefaultParameters(processor.getParameters()); allParamsProcessorThisTest.putAll(paramsProcessorChangingThisTest); System.out.println(allParamsProcessorThisTest); final NetPlan npInput = np.copy (); final NetPlan npOutput = np.copy (); new OnlineTestUtils().runSimulation(npOutput , generator , processor , simulationParameters , net2planParameters , allParamsGeneratorThisTest , allParamsProcessorThisTest , TIMEPERSIMULATIONINSECONDS); checkValidity (npInput , npOutput , allParamsGeneratorThisTest); } } }