Skip to content

Commit

Permalink
Merge pull request #117 from ibi-group/atl-fare-module
Browse files Browse the repository at this point in the history
Atl fare module
  • Loading branch information
daniel-heppner-ibigroup authored Sep 1, 2022
2 parents d614b17 + 3a7b906 commit 85f63a0
Show file tree
Hide file tree
Showing 6 changed files with 747 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ jobs:
if: github.event_name == 'push' && env.GITHUB_HEAD_REF_SLUG == 'ibi-dev'
run: |
aws s3 cp ./target/mkdocs s3://otp-docs.ibi-transit.com --recursive --acl public-read
# Push notification to Teams.
- name: Notify us of the build status on MS Teams
# Push notification to Teams. TODO: Not working.
# - name: Notify us of the build status on MS Teams
# Release https://github.com/toko-bifrost/ms-teams-deploy-card/releases/tag/3.1.2 this matches
# the full length commit SHA below. This must not be changed without first reviewing the code of the newer
# version for potential security risks.
uses: toko-bifrost/ms-teams-deploy-card@dcc94e4ce4088b1e6b6de5c9a3cda4ddcbe97d2e
if: always()
with:
github-token: ${{ github.token }}
webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
# uses: toko-bifrost/ms-teams-deploy-card@dcc94e4ce4088b1e6b6de5c9a3cda4ddcbe97d2e
# if: always()
# with:
# github-token: ${{ github.token }}
# webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
3 changes: 2 additions & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ The current list of custom fare type is:
- `san-francisco` (no parameters)
- `new-york` (no parameters)
- `seattle` (no parameters)
- `orca` (no parameters) - Calculates various fare types based off various restrictions seen in each transit agency in the Pugest Sound region
- `orca` (no parameters) - Calculates various fare types based off various restrictions seen in each transit agency in the Puget Sound region
- `atlanta` (no parameters) - Calculates fares for the Breeze card in Atlanta
- `highestFareInFreeTransferWindow` - Will apply the highest observed transit fare (across all operators) within a free transfer window, adding to the cost if a trip is boarded outside the free transfer window. It accepts the following parameters:
- `freeTransferWindowInMinutes` - the number of minutes that free transfers are possible after the board time of the first transit leg. Default: 150 mintues.
- `analyzeInterlinedTransfers` - If true, will treat interlined transfers as actual transfers. This is merely a work-around for transit agencies that choose to code their fares in a route-based fashion instead of a zone-based fashion. Default: false.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.opentripplanner.routing.impl;

import com.fasterxml.jackson.databind.JsonNode;
import org.opentripplanner.model.FeedScopedId;
import org.opentripplanner.model.OtpTransitService;
import org.opentripplanner.routing.core.FareRuleSet;
import org.opentripplanner.routing.services.FareService;

import java.util.HashMap;
import java.util.Map;

public class ATLFareServiceFactory extends DefaultFareServiceFactory {
protected Map<FeedScopedId, FareRuleSet> regularFareRules = new HashMap<>();

@Override
public FareService makeFareService() {
return new ATLFareServiceImpl(regularFareRules.values());
}

/**
* This step ensures that the fares in the source GTFS data are accounted for correctly.
*/
@Override
public void processGtfs(OtpTransitService transitService) {
fillFareRules(transitService.getAllFareAttributes(), transitService.getAllFareRules(), regularFareRules);
}

/**
* There is no configuration code in DefaultFareServiceFactory. We override the super class's method just in case it changes.
*/
@Override
public void configure(JsonNode config) {
// No configuration at the moment.
}
}
Loading

0 comments on commit 85f63a0

Please sign in to comment.