Skip to content

Commit

Permalink
refactor TravelTimeMatrixComputer: reorganize imports and update path…
Browse files Browse the repository at this point in the history
… extraction to include CsvResultOptions
  • Loading branch information
mvpsaraiva committed Oct 20, 2024
1 parent 4761621 commit 93e7ba0
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions java-r5rcore/src/org/ipea/r5r/Process/TravelTimeMatrixComputer.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
package org.ipea.r5r.Process;

import static com.google.common.base.Preconditions.checkState;

import java.lang.reflect.Field;
import java.text.ParseException;
import java.util.Collection;
import java.util.concurrent.ForkJoinPool;

import org.ipea.r5r.RDataFrame;
import org.ipea.r5r.RoutingProperties;
import org.ipea.r5r.R5.R5TravelTimeComputer;
import org.ipea.r5r.Utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.conveyal.r5.OneOriginResult;
import com.conveyal.r5.analyst.TravelTimeComputer;
import com.conveyal.r5.analyst.cluster.PathResult;
import com.conveyal.r5.analyst.cluster.RegionalTask;
import com.conveyal.r5.analyst.cluster.TravelTimeResult;
import com.conveyal.r5.transit.TransportNetwork;
import com.conveyal.r5.transit.path.RouteSequence;
import com.conveyal.analysis.models.CsvResultOptions;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import org.ipea.r5r.R5.R5TravelTimeComputer;
import org.ipea.r5r.RDataFrame;
import org.ipea.r5r.RoutingProperties;
import org.ipea.r5r.Utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Field;
import java.text.ParseException;
import java.util.*;
import java.util.concurrent.ForkJoinPool;

import static com.google.common.base.Preconditions.checkState;

public class TravelTimeMatrixComputer extends R5Process {

Expand Down Expand Up @@ -175,7 +177,7 @@ private Multimap<Integer, PathBreakdown>[] extractPathResults(PathResult paths,
checkState(nIterations > 0, "A path was stored without any iterations");

// extract the route id's
String[] path = routeSequence.detailsWithGtfsIds(this.transportNetwork.transitLayer);
String[] path = routeSequence.detailsWithGtfsIds(this.transportNetwork.transitLayer, new CsvResultOptions());

for (PathResult.Iteration iteration : iterations) {
PathBreakdown breakdown = new PathBreakdown();
Expand Down

0 comments on commit 93e7ba0

Please sign in to comment.