docs(javaTest): publish complete center dispatch evidence
This commit is contained in:
@@ -49,6 +49,12 @@ public final class HistoricalDispatchSimulationReportWriter {
|
||||
value.put("database", dataset.getDatabase());
|
||||
value.put("sourceTable", dataset.getSourceTable());
|
||||
value.put("sourceRowCount", dataset.getFullScanTotalRows());
|
||||
value.put("fullMapRows", dataset.getFullMapRows());
|
||||
value.put("passableMapRows", dataset.getFullMapCells().stream()
|
||||
.filter(cell -> cell.getValue() == 1 || cell.getValue() == 2).count());
|
||||
value.put("fullMapSha256", dataset.getFullMapSha256());
|
||||
value.put("plannerVersion", "GridPathPlanner-BFS/full-grid-v1");
|
||||
value.put("pathInfoUsedForPlanning", false);
|
||||
value.put("inputCount", result.getTaskResults().size());
|
||||
value.put("acceleration", result.getAcceleration());
|
||||
value.put("completedCount", result.getCompletedCount());
|
||||
@@ -69,9 +75,13 @@ public final class HistoricalDispatchSimulationReportWriter {
|
||||
value.put("archiveCount", result.getArchiveCount());
|
||||
value.put("wmsDeliveryAttempts", result.getWmsDeliveryAttempts());
|
||||
value.put("wmsBusinessEffects", result.getWmsBusinessEffects());
|
||||
value.put("wmsDuplicateDeliveryAttempts", Math.max(0,
|
||||
result.getWmsDeliveryAttempts() - result.getCompletedCount()));
|
||||
value.put("wmsDuplicateBusinessEffects",
|
||||
result.getInvariants().getDuplicateWmsBusinessEffects());
|
||||
value.put("archiveComplete", result.getArchiveCount() == result.getCompletedCount());
|
||||
value.put("wmsIdempotent", result.getWmsBusinessEffects() == result.getCompletedCount()
|
||||
&& result.getWmsDeliveryAttempts() == result.getCompletedCount() * 2);
|
||||
&& result.getInvariants().getDuplicateWmsBusinessEffects() == 0);
|
||||
value.put("invariants", invariantSummary(result));
|
||||
return value;
|
||||
}
|
||||
@@ -163,7 +173,8 @@ public final class HistoricalDispatchSimulationReportWriter {
|
||||
throws IOException {
|
||||
StringBuilder csv = new StringBuilder("\ufeff");
|
||||
row(csv, "simulation_task_id", "task_no", "guid", "task_type", "priority",
|
||||
"original_start_site", "original_end_site", "historical_agv", "simulated_agv",
|
||||
"business_start_site", "business_end_site", "physical_start_site",
|
||||
"physical_end_site", "historical_agv", "simulated_agv",
|
||||
"historical_path", "planned_path", "assigned_vehicles", "status", "reason",
|
||||
"arrival_ms", "first_assigned_ms", "completed_ms", "waiting_ms",
|
||||
"historical_duration_ms", "simulation_duration_ms", "scaled_source_duration_ms",
|
||||
@@ -176,10 +187,15 @@ public final class HistoricalDispatchSimulationReportWriter {
|
||||
Long difference = historical == null || scaled == null ? null : scaled - historical;
|
||||
String historicalPath = trimTrailingCommas(text(task.getRecord().getPathInfo()));
|
||||
String plannedPath = String.join(",", task.getPlannedPath());
|
||||
String physicalStart = task.getPlannedPath().isEmpty()
|
||||
? "" : task.getPlannedPath().get(0);
|
||||
String physicalEnd = task.getPlannedPath().isEmpty()
|
||||
? "" : task.getPlannedPath().get(task.getPlannedPath().size() - 1);
|
||||
row(csv, task.getSimulationTaskId(), task.getRecord().getTaskNo(),
|
||||
task.getRecord().getGuid(), task.getRecord().getTaskType(),
|
||||
task.getRecord().getPriority(), task.getRecord().getStartSite(),
|
||||
task.getRecord().getEndSite(), task.getRecord().getAgvId(),
|
||||
task.getRecord().getEndSite(), physicalStart, physicalEnd,
|
||||
task.getRecord().getAgvId(),
|
||||
task.getSimulatedVehicleId(), historicalPath, plannedPath,
|
||||
String.join("|", task.getAssignedVehicles()), task.getStatus(), task.getReason(),
|
||||
task.getArrivalMillis(), task.getFirstAssignedMillis(), task.getCompletedMillis(),
|
||||
|
||||
@@ -24,6 +24,7 @@ public final class SimulationInvariantSummary {
|
||||
|
||||
public int totalSafetyViolations() {
|
||||
return capacityViolations + nodeDoubleOccupancyViolations
|
||||
+ oppositeEdgeViolations + duplicateWmsBusinessEffects;
|
||||
+ oppositeEdgeViolations + duplicateArchiveAttempts
|
||||
+ duplicateWmsBusinessEffects;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user