Exemplo n.º 1
0
 private void testOutputModel(double maximumRelativeMeanError, double maximumRelativeMedianError) {
   ModelEvaluator evaluator = new ModelEvaluator(root, 0, IGeneratorConstants.CALIBRATION);
   DiffAnalyzer analyzer = new DiffAnalyzer(evaluator, DlimTestUtils.getProjectPath());
   try {
     List<Double> stats =
         analyzer.calculateDiff(ArrivalRateReader.readFileToList(TEST_TRACE, 0.0), 0.0);
     assertTrue(stats.get(3) <= maximumRelativeMeanError); // mean
     assertTrue(stats.get(4) <= maximumRelativeMedianError); // mean
   } catch (IOException e) {
     fail("Did not find arrival rate file.");
   }
 }
Exemplo n.º 2
0
 /** Sets up the test. Creates model to extract into. Cleans output directories. */
 @Override
 protected void setUp() {
   DlimTestUtils.cleanTestOutputDirectories();
   root = DlimPackage.eINSTANCE.getDlimFactory().createSequence();
 }