void checkSpeedStability() {
   double relativeDeviances = 0.;
   double averageSpeed = ListUtils.doubleMean(this.speedTable);
   for (int i = 0; i < this.speedTableSize; i++) {
     relativeDeviances +=
         Math.pow((this.speedTable.get(i).doubleValue() - averageSpeed) / averageSpeed, 2);
   }
   relativeDeviances /= this.noOfModes; // taking dependence on number of modes away
   if (relativeDeviances < 0.0005) {
     this.speedStability = true;
     GenerateFundamentalDiagramData.LOG.info(
         "========== Reaching a certain speed stability in mode: " + modeId);
   } else {
     this.speedStability = false;
   }
 }
 double getSlidingAverageOfLastXHourlyFlows() {
   return ListUtils.doubleMean(this.lastXHourlyFlows);
 }
 double getCurrentHourlyFlow() {
   double nowFlow = ListUtils.doubleSum(this.flowTable900);
   return nowFlow * 4;
 }
 double getActualAverageVelocity() {
   return ListUtils.doubleMean(this.speedTable);
 }