finalIntensity);
double max = 0;
double sum = 0;
final StandardDeviation sd = new StandardDeviation();
final List<Double> dynamismValues = newArrayList();
for (int j = 0; j < numSamples; j++) {
final List<Double> times = generator.generate(rng);
final double dyn = Metrics.measureDynamism(times, lengthOfScenario);
dynamismValues.add(dyn);
sd.increment(dyn);
sum += dyn;
max = Math.max(max, dyn);
if (j < 3) {
// System.out.printf("%1.3f%% %d%n", dyn * 100, times.size());
Analysis.writeTimes(
lengthOfScenario,
times,
new File(
"files/test/times/orders"
+ Strings.padStart(Integer.toString(i), 2, '0') + "_" + j
+ "-" + (dyn * 100)
+ ".times"));
}
}
try {
writer.append(Double.toString(relHeight));
writer.append(" ");
writer.append(Joiner.on(" ").join(dynamismValues).toString());
writer.append("\n");
} catch (final IOException e) {
checkState(false);
}
System.out.printf(" > dyn %1.3f+-%1.3f%n",
+(sum / numSamples), sd.getResult());
dataPoints.add(new Point(relHeight, (sum / numSamples)));
}
writer.close();
Analysis.writeLocationList(dataPoints, new File(
"files/test/times/intensity-analysis.txt"));