conveyal / r5

Developed to power Conveyal's web-based interface for scenario planning and land-use/transport accessibility analysis, R5 is our routing engine for multimodal (transit/bike/walk/car) networks with a particular focus on public transit
https://conveyal.com/learn
MIT License
272 stars 71 forks source link

Prevent ArrayIndexOutOfBoundsException when recording TemporalDensityResult #917

Closed ansoncfit closed 6 months ago

ansoncfit commented 7 months ago

We decided our temporal density results have 120 columns (0 to 119). In the TemporalDensityResult constructor, the third dimension is 120:

this.opportunitiesPerMinute = new double[destinationPointSets.length][nPercentiles][120]

When recording results, opportunities should only be recorded if they are less than 120 minutes away, as proposed in this PR.