Skip to content

Commit

Permalink
customize dashboard + add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed May 14, 2024
1 parent bd66567 commit ed989e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/org/matsim/dashboard/CreateAverageDashboards.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.matsim.api.core.v01.TransportMode;
import org.matsim.application.MATSimAppCommand;
import org.matsim.simwrapper.Dashboard;
import org.matsim.simwrapper.SimWrapper;
import picocli.CommandLine;

Expand Down Expand Up @@ -52,11 +53,14 @@ public Integer call() throws Exception {
.filter(d -> d.getAbsolutePath().contains(TransportMode.drt))
.forEach(f -> modes.add(f.getAbsolutePath().substring(f.getAbsolutePath().lastIndexOf("\\") + 1)));

SimWrapper sw = SimWrapper.create();

for (String m : modes) {
// TODO: how to write output files to drt / drt-av folder rather than overwrite existing ones
// TODO: same for dashbord, how to write a second dashboard for av instead of overwriting the existing one
SimWrapper sw = SimWrapper.create();
sw.addDashboard(new AverageDrtDashboard(foldersSeeded, m, noRuns));
Dashboard.Customizable d = Dashboard.customize(new AverageDrtDashboard(foldersSeeded, m, noRuns))
.context(m);

sw.addDashboard(d);
// TODO: rather call generate method with append true than the standard one bc we are in post processing
sw.generate(Path.of(inputPath));
sw.run(Path.of(inputPath));
}
Expand Down

0 comments on commit ed989e4

Please sign in to comment.