Online_evGen_ipOverWdm extends Online_evGen_generalGenerator { @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 initialNetPlan, Map<String, String> algorithmParameters, Map<String, String> simulationParameters, Map<String, String> net2planParameters); @Override void processEvent(NetPlan currentNetPlan, SimEvent event);  }
@Test public void test() { final IEventGenerator generator = new Online_evGen_ipOverWdm (); final IEventProcessor processor = new Online_evProc_ipOverWdm (); 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/2)); simulationParameters.put("simTime" , "" + TIMEPERSIMULATIONINSECONDS); final Map<String,String> net2planParameters = ImmutableMap.of("precisionFactor" , "0.001"); final Map<String,List<String>> generatorParameters = new HashMap <>(); generatorParameters.put("ipOverWdmFailureDefaultMTTFInHours" , Arrays.asList("0.1")); generatorParameters.put("ipOverWdmFailureDefaultMTTRInHours" , Arrays.asList("0.01")); generatorParameters.put("ipOverWDmFailureStatisticalPattern" , Arrays.asList("exponential-iid")); generatorParameters.put("ipTFFastFluctuationType" , Arrays.asList("random-truncated-gaussian")); generatorParameters.put("ipTFSlowFluctuationType" , Arrays.asList("time-zone-based")); 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("wdmNumFrequencySlotsPerFiber" , Arrays.asList("" + WDMUtils.getFiberNumFrequencySlots(np.getLink(0 , np.getNetworkLayer(wdmLayerIndex))))); processorParameters.put("wdmRwaType" , Arrays.asList("srg-disjointness-aware-route-first-fit" , "alternate-routing" , "least-congested-routing" , "load-sharing")); processorParameters.put("wdmTransponderTypesInfo" , Arrays.asList("10 1 1 9600 1 ; 20 1.5 2 9600 1")); processorParameters.put("wdmDefaultAndNewRouteRevoveryType" , Arrays.asList("none" , "restoration" , "1+1-link-disjoint")); 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); } } }