Пример #1
0
  public CountsCompareAnalyzer(
      LinkOccupancyCalculator calculator, String countsFile, double factor) {
    this.calculator = calculator;
    this.factor = factor;

    counts = new Counts();
    CountsReaderMatsimV1 reader = new CountsReaderMatsimV1(counts);
    reader.readFile(countsFile);
  }
Пример #2
0
 public boolean loadCountsFromFile(String path) {
   if (board.net == null) return false;
   board.clearCounts();
   CountsReaderMatsimV1 countsReader = new CountsReaderMatsimV1(board.counts);
   try {
     countsReader.parse(path);
   } catch (Exception e) {
     e.printStackTrace();
     return false;
   }
   return true;
 }