Skip to content

Commit

Permalink
Configure mapping for truck counts
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Sep 17, 2024
1 parent d8482b8 commit c76545d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package org.matsim.dashboard;

import org.matsim.api.core.v01.TransportMode;
import org.matsim.application.prepare.network.CreateAvroNetwork;
import org.matsim.core.config.Config;
import org.matsim.simwrapper.Dashboard;
import org.matsim.simwrapper.DashboardProvider;
import org.matsim.simwrapper.SimWrapper;
import org.matsim.simwrapper.dashboard.TrafficCountsDashboard;
import org.matsim.simwrapper.dashboard.TripDashboard;

import java.util.List;
import java.util.Set;

/**
* Provider for default dashboards in the scenario.
Expand All @@ -26,7 +29,11 @@ public List<Dashboard> getDashboards(Config config, SimWrapper simWrapper) {
CreateAvroNetwork.class, "--filter-properties", "allowed_speed,surface,type,bicycleInfrastructureSpeedFactor,bike,smoothness"
);

return List.of(trips);
TrafficCountsDashboard counts = new TrafficCountsDashboard()
.withModes(TransportMode.car, Set.of(TransportMode.car))
.withModes(TransportMode.truck, Set.of(TransportMode.truck, "freight", "truck8t", "truck18t", "truck26t", "truck40t"));

return List.of(trips, counts);
}

}

0 comments on commit c76545d

Please sign in to comment.