-
Notifications
You must be signed in to change notification settings - Fork 71
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
Updated to NTS 2.0 and removed use of GeoAPI where required. Also Fixed 4 Bugs and Fixed most of the Unit Tests #302
Open
juliusfriedman
wants to merge
31
commits into
itinero:develop
Choose a base branch
from
juliusfriedman:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
d570549
Updated to NTS 2.0
e7165e8
Added GetTestRandomRoutesParallel to list of tests to run
e613e4e
Added Locomotive and Train, Enhanced tests to run on all profiles.
ac863da
Enhaced RouterDb to consider Train and Locomotive during testing
5a185e8
Enhanced tests to run on all profiles
e5e2012
WeightMatrixTests now test all profiles
74ccc08
Added parallel test in Resolving which also does routing.
4790d0d
Updated STRM, Fixed multithreading issue in ProfileFactorAndSpeedCach…
juliusfriedman ad6c728
Updated packages in ItineroTest
juliusfriedman 6688ba5
Removed duplicate test
78c4758
Updated OSM Sharp References
722d2d3
Fixed local references to use nuget
f954b1b
Updated InstructionTest to use ParallelEnumerable as indicated.
abaf11b
Enhanced ShapeFileWriterTests to use all profiles.
a96dc7b
Removed new field which hides base member. Ensured all tests are pass…
431becf
Used compound assignment in TestFactorAndSpeed and made TestFactorAnd…
f193ea0
Added test for edge based contractions and their weight matrixes
d309b08
Changed float.MaxValue to _weightHandler.Infinite as in other Algorit…
cf9efe6
Removed buggy code which was causing different weights for contracted…
2fe7e3d
Fixed Coordinate.DistanceEstimateInMeter added TestGeoCoordinateDista…
fc55f3d
Renamed TestEdgeBasedContractions to TestEdgeBasedContractionsMinimal…
4129ea9
Added comments for clarify in TestEdgeBasedContractions
62f4c08
Changed usaged of WasFound to inline expression.
264ef4c
Simplified calulcation in Coordinate by using a const DegreesToRadians
11fe52e
Fixed bug in other test case by using `ManyToMany` instead of `Calcul…
d8eb734
Added Parallel test
34e1347
Addressed https://github.com/itinero/routing/issues/306
juliusfriedman 229fc58
Added osm.pbf files used in tests for https://github.com/itinero/rout…
juliusfriedman 204265a
Everything passes except RouterTests.TestBicycleWithCyclenetwork
21c634d
Revised Math.Pow 2 calls to X * X, even though the later JIT's optomi…
82d4049
netcoreapp 3.1 x64 and corrected nugets and references
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1320,13 +1320,24 @@ public override Result<float[][]> TryCalculateWeight(IProfileInstance profileIns | |
} | ||
weights = algorithm.Weights; | ||
} | ||
//else if (contracted.HasNodeBasedGraph && | ||
// contracted.NodeBasedIsEdgedBased) | ||
//{ // use vertex-based graph for edge-based routing. | ||
// weights = Itinero.Algorithms.Contracted.Dual.RouterExtensions.CalculateManyToMany(contracted, | ||
// _db, profileInstance.Profile, | ||
// weightHandler, sources, targets, maxSearch, cancellationToken).Value; | ||
//} | ||
else if (contracted.HasNodeBasedGraph && | ||
xivk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
contracted.NodeBasedIsEdgedBased) | ||
{ // use vertex-based graph for edge-based routing. | ||
//weights = Itinero.Algorithms.Contracted.Dual.RouterExtensions.CalculateManyToMany(contracted, | ||
// _db, profileInstance.Profile, | ||
// weightHandler, sources, targets, maxSearch, cancellationToken).Value; | ||
|
||
var algorithm = new Itinero.Algorithms.Default.ManyToMany<float>(_db, weightHandler, sources, targets, maxSearch); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As you can see from the commented code above CalculateManyToMany was previously being used but returned different results which didn't match that of the non contracted versions. This change fixed both the simple and complex cases I was made aware of. |
||
algorithm.Run(cancellationToken); | ||
if (!algorithm.HasSucceeded) | ||
{ | ||
return new Result<float[][]>(algorithm.ErrorMessage, (message) => | ||
{ | ||
return new RouteNotFoundException(message); | ||
}); | ||
} | ||
weights = algorithm.Weights; | ||
} | ||
else | ||
{ // use node-based routing. | ||
var algorithm = new Itinero.Algorithms.Contracted.ManyToManyWeightsBidirectionalDykstra<float>(_db, profileInstance.Profile, weightHandler, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was removed and the issue no longer manifested in the simple case