Skip to content

Commit

Permalink
Pt fares minor cleanup (#3414)
Browse files Browse the repository at this point in the history
* shorten parameter set name, remove duplicate parameter set in test, comment
  • Loading branch information
vsp-gleich authored Aug 16, 2024
1 parent 4c66b90 commit 8d209f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void setMinFare(double minFare) {
// in Deutschlandtarif, the linear function for the prices above 100km seem to have a different steepness
// hence the following difference in data points
// prices taken from https://deutschlandtarifverbund.de/wp-content/uploads/2024/07/20231201_TBDT_J_10_Preisliste_V07.pdf
// TODO: This fare will change. We might need a way to select the fare of a specific year
private static DistanceBasedPtFareParams germanWideFare() {
final double MIN_FARE = 1.70;

Expand Down Expand Up @@ -147,7 +148,7 @@ public DistanceClassLinearFareFunctionParams getOrCreateDistanceClassFareParams(

public static class DistanceClassLinearFareFunctionParams extends ReflectiveConfigGroup {

public static final String SET_NAME = "distanceClassLinearFareFunctionParams";
public static final String SET_NAME = "distanceClassLinearFare";
public static final String FARE_SLOPE = "fareSlope";
public static final String FARE_INTERCEPT = "fareIntercept";
public static final String MAX_DISTANCE = "maxDistance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ void testFareZoneBasedPtFareHandler() {
distanceBased.getOrCreateDistanceClassFareParams(999_999_999.);
distanceClassFareParams.setFareSlope(0.00017);
distanceClassFareParams.setFareIntercept(1.6);
distanceBased.addParameterSet(distanceClassFareParams);
distanceBased.setOrder(2);
distanceBased.setTransactionPartner(DISTANCE_BASED_TRANSACTION_PARTNER);

Expand Down

0 comments on commit 8d209f6

Please sign in to comment.