Skip to content

Commit

Permalink
Version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zabuzard committed Jul 22, 2018
1 parent 86d70cb commit 77fcc50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion backend/build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<project default="all">
<property name="version" value="1.0" />
<property name="version" value="1.1" />
<property name="projectdir" value="./" />
<property name="Main-class" value="de.unifreiburg.informatik.cobweb.Main" />
<property name="app-name" value="Cobweb" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.junit.platform.console.shadow.joptsimple.internal.Strings;
import java.util.stream.Collectors;

import de.unifreiburg.informatik.cobweb.routing.model.graph.ETransportationMode;
import de.unifreiburg.informatik.cobweb.util.collections.Pair;
Expand Down Expand Up @@ -124,7 +123,7 @@ public List<String> toStringLines() {
entries.add(time);
entries.add(String.valueOf(duration));

lines.add(Strings.join(entries, "\t"));
lines.add(entries.stream().collect(Collectors.joining("\t")));
});
return lines;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ public final class GtfsRealisticTimeExpandedHandler<N extends INode & IHasId & I
* Map connecting stop IDs to transfer nodes.
*/
private final MutableMap<AgencyAndId, List<NodeTime<N>>> mStopToTransferNodes;
/**
* Transfer time in seconds.
*/
private final int mTransferDelay;
/**
* Map connecting trip IDs to stop nodes in the sequence of the trip.
*/
private final MutableMap<AgencyAndId, List<TripStopNodes<N>>> mTripToSequence;

/**
* Whether or not a graph cache is to be used. This determines if GTFS files
* should be filtered by a {@link RecentHandler} or not.
*/
private final boolean mUseGraphCache;

/**
* Transfer time in seconds.
*/
private final int transferDelay;

/**
* Creates a new GTFS realistic time expanded handler which operates on the
* given graph using the given configuration.<br>
Expand All @@ -131,7 +131,7 @@ public GtfsRealisticTimeExpandedHandler(final G graph, final IGtfsConnectionBuil
mStopToTransferNodes = Maps.mutable.empty();
mStopToDepNodes = Maps.mutable.empty();
mStopToArrNodes = Maps.mutable.empty();
transferDelay = config.getTransferDelay();
mTransferDelay = config.getTransferDelay();

mUseGraphCache = config.useGraphCache();
if (mUseGraphCache) {
Expand Down Expand Up @@ -306,7 +306,7 @@ public void handle(final StopTime stopTime) {

final int arrTime = stopTime.getArrivalTime();
final int depTime = stopTime.getDepartureTime();
final int transferTime = arrTime + transferDelay;
final int transferTime = arrTime + mTransferDelay;

// Build nodes
final N arrNode = mBuilder.buildNode((float) stop.getLat(), (float) stop.getLon(), arrTime);
Expand All @@ -318,7 +318,7 @@ public void handle(final StopTime stopTime) {

// Connect arrival with departure and arrival with transfer
final E arrToDepEdge = mBuilder.buildEdge(arrNode, depNode, depTime - arrTime);
final E arrToTransferEdge = mBuilder.buildEdge(arrNode, transferNode, transferDelay);
final E arrToTransferEdge = mBuilder.buildEdge(arrNode, transferNode, mTransferDelay);
mGraph.addEdge(arrToDepEdge);
mGraph.addEdge(arrToTransferEdge);

Expand Down

0 comments on commit 77fcc50

Please sign in to comment.