Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Apr 17, 2024
1 parent 334eabf commit 26c0631
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public final class PiecewiseLinearlLegScoring implements org.matsim.core.scoring
private final ScoringParameters params;
private final Set<String> ptModes;
private final double marginalUtilityOfMoney;
private final Set<String> modesAlreadyConsideredForDailyConstants;
private double score;
private Network network;
private boolean nextEnterVehicleIsFirstOfTrip = true;
private boolean nextStartPtLegIsFirstOfTrip = true;
private boolean currentLegIsPtLeg = false;
private double lastActivityEndTime = Double.NaN;
private final Set<String> modesAlreadyConsideredForDailyConstants;

public PiecewiseLinearlLegScoring(final ScoringParameters params, Network network, Set<String> ptModes) {
this.params = params;
Expand All @@ -83,7 +83,7 @@ public double getScore() {
/**
* Calculate the score for a leg.
*/
private double calcLegScore(final double departureTime, final double arrivalTime, final Leg leg) {
private double calcLegScore(final double departureTime, final double arrivalTime, final Leg leg) {
double tmpScore = 0.0;
// travel time in seconds
double travelTime = arrivalTime - departureTime;
Expand Down Expand Up @@ -138,14 +138,14 @@ private double calcLegScore(final double departureTime, final double arrivalTime
Route route = leg.getRoute();
// distance in meters
double dist = route.getDistance();
if ( Double.isNaN(dist) ) {
if ( ccc<10 ) {
ccc++ ;
if (Double.isNaN(dist)) {
if (ccc < 10) {
ccc++;
LogManager.getLogger(this.getClass()).warn("distance is NaN. Will make score of this plan NaN. Possible reason: Simulation does not report " +
"a distance for this trip. Possible reason for that: mode is teleported and router does not " +
"write distance into plan. Needs to be fixed or these plans will die out.") ;
if ( ccc==10 ) {
LogManager.getLogger(this.getClass()).warn(Gbl.FUTURE_SUPPRESSED) ;
"write distance into plan. Needs to be fixed or these plans will die out.");
if (ccc == 10) {
LogManager.getLogger(this.getClass()).warn(Gbl.FUTURE_SUPPRESSED);
}
}
}
Expand Down

0 comments on commit 26c0631

Please sign in to comment.