Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/nav 17 simple algorithm implementation #15

Merged
merged 40 commits into from
May 23, 2024

Conversation

munterfi
Copy link
Member

@munterfi munterfi commented May 19, 2024

Not ready to merge:

  • Needs fix of footpath only test case of raptor.
org.opentest4j.AssertionFailedError: 
Expected :1
Actual   :0
<Click to see difference>


	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
	at ch.naviqore.raptor.model.RaptorTest$EarliestArrival.shouldFindConnectionBetweenOnlyFootpath(RaptorTest.java:128)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
  • Needs fix of benchmark:
Exception in thread "main" java.lang.NullPointerException: Cannot read field "stopIdx" because "arrival.previous" is null
	at ch.naviqore.raptor.model.Raptor.reconstructParetoOptimalSolutions(Raptor.java:243)
	at ch.naviqore.raptor.model.Raptor.routeEarliestArrival(Raptor.java:58)
	at ch.naviqore.Benchmark.processRequests(Benchmark.java:98)
	at ch.naviqore.Benchmark.main(Benchmark.java:53)

munterfi and others added 30 commits April 29, 2024 21:21
# Conflicts:
#	src/test/java/ch/naviqore/Benchmark.java
- Connection and Leg implement comparable, change to sorting based on this class property. Connections are sorted according to the earliest arrival time. Legs are sorted according to departure time.
- Change access of Raptor.Leg and Raptor.ArrivalType to private since they are not needed from outside the class.
- Refactor the connections class, make it initializable and immutable. Hide building methods outside the package.
- Introduce raptor test builder with test extension for parameter injection.
- Refactor input validation in raptor and add test cases.
- Introduce generic value object cache in the utils package.
- Memory usage stays the same.

Closes: #9
…-cache

ENH: NAV-43 - Generic value object cache
- Add trip validator wit test cases.
- Add validation in stop time construction.
- Place todo in raptor builder.
…ound (entering to earlier trip not possible in same round)
…r builder

- Raptor builder validates trips and stop times. The order of adding trips and stop times does not matter anymore.
- Adjusted GtfsToRaptorConverter to new Raptor builder.
…le-algorithm-implementation' into feature/NAV-42-input-validation-raptor-builder-trip-id
- Some cosmetics: Remove sys.out.print call and correct log config file path in benchmark javadoc.
@munterfi
Copy link
Member Author

@clukas1 @Brunner246

Wait for #18 and a fix of the benchmark. Then we should merge and tag our first algorithm version 🚀

clukas1 and others added 8 commits May 23, 2024 00:00
…on' into feature/NAV-42-input-validation-raptor-builder-trip-id
- Only request valid stop ids from raptor.
- Write more information to the results.
- Add converters to ServiceDayTime.
- Check for invalid minute (0,60) and seconds (0, 60) in service day time constructor. Update tests.
- Rename non-existent trips in route builder test.
…raptor-builder-trip-id

Feature/nav 42 input validation raptor builder trip
@clukas1
Copy link
Member

clukas1 commented May 23, 2024

Would say this branch is ready for a final review @munterfi, @Brunner246

Open Tasks for new Issues:

  • Refactoring Core Algorithm in smaller methods
  • Add more test cases (circular, self intersecting routes, overlapping routes)
  • Figure out why so many connections not possible in Switzerland GTFS Benchmark (maybe missing footpath transfers?)
  • Add feature to reverse direction of Raptor (Start from Arrival Time at target and go backwards to best departure time at source stop)
  • Add feature to define minimum transfertime by user and use maximum value of requested minimum transfertime and same station transfer)
  • Multi Constraint Raptor (McRaptor)
  • Range Raptor (rRaptor)

@munterfi
Copy link
Member Author

Perfect, thanks.

from my side the PR is ready. Should we tag after merge with v1.0.0 to mark this initial walking skeleton of the algoritm?

@Brunner246
Copy link
Contributor

@clukas1 i will review it tonight or early tomorrow tomorrow morning.
Thanks both of you (@munterfi) for your incredible effort!!

Copy link
Contributor

@Brunner246 Brunner246 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@munterfi @clukas1
I have left two minor suggestions for modifications. If you think this is unnecessary, please ingore it and merge.

@clukas1 clukas1 merged commit c60524e into main May 23, 2024
1 check passed
@clukas1 clukas1 deleted the feature/NAV-17-simple-algorithm-implementation branch May 23, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants