Skip to content

Commit

Permalink
Merge pull request #92 from BauhausLuftfahrt/routingBug
Browse files Browse the repository at this point in the history
Routing bug fixed
  • Loading branch information
RRothfeld authored Dec 10, 2023
2 parents ab8e2f6 + d88def6 commit 9dc4c05
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ And the following to you maven pom.xml under `dependencies` for the latest versi
<dependency>
<groupId>net.bhl.matsim</groupId>
<artifactId>matsim-uam</artifactId>
<version>4.1.2</version>
<version>4.1.3</version>
</dependency>
```
Versions 4.1.1, 4.1.0, 4.0.1, 4.0.0, and 3.0.0 are also available. Older versions are currently not supported.
Versions 4.1.2, 4.1.1, 4.1.0, 4.0.1, 4.0.0, and 3.0.0 are also available. Older versions are currently not supported.

## Versions and Change Log

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>net.bhl.matsim</groupId>
<artifactId>matsim-uam</artifactId>
<version>4.1.2</version>
<version>4.1.3</version>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void install() {
ExecutorService es = Executors.newFixedThreadPool(processes);
for (TripItem trip : trips) {
if (trips.size() < 100 || counter % (trips.size() / 100) == 0)
log.info("Calculation completion: " + counter + "/" + trips.size() + " ("
log.info("Calculation started for: " + counter + "/" + trips.size() + " ("
+ String.format("%.0f", (double) counter / trips.size() * 100) + "%).");

while (threadCounter.getProcesses() >= processes - 1)
Expand Down Expand Up @@ -258,8 +258,8 @@ public void run() {
e.printStackTrace();
}

Link from = NetworkUtils.getNearestLink(network, trip.origin);
Link to = NetworkUtils.getNearestLink(network, trip.destination);
Link from = NetworkUtils.getNearestLink(networkCar, trip.origin);
Link to = NetworkUtils.getNearestLink(networkCar, trip.destination);
Facility fromFacility = new LinkWrapperFacility(from);
Facility toFacility = new LinkWrapperFacility(to);

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/bhl/matsim/uam/qsim/BookingEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ private double getTravelTime(Plan plan, Integer planElementsIndex) {
if (((Leg) pe).getMode().equals(UAMConstants.uam))
found = true;
else
travelTime += ((Leg) pe).getTravelTime().seconds();
// It seems the leg itself does no longer store travel times, but only its route
// travelTime += ((Leg) pe).getTravelTime().seconds();
travelTime += ((Leg) pe).getRoute().getTravelTime().seconds();
}
else {
travelTime += ((Activity)pe).getMaximumDuration().seconds();
Expand Down

0 comments on commit 9dc4c05

Please sign in to comment.