Skip to content

Commit

Permalink
Add Child and Youth Constants for WAT (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesVaughan authored Feb 14, 2024
1 parent 7d87f78 commit 5fe6b4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tasha/V4Modes/PerceivedTravelTimes/WalkAccessTransit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public class WalkAccessTransit : ITashaMode, IIterationSensitive
[RunParameter("NonWorkerStudentTravelCostFactor", 0f, "The factor applied to the travel cost ($'s).")]
public float NonWorkerStudentCostFactor;

[RunParameter("ChildFlag", 0f, "A factor to apply if the person is a child [0-10].")]
public float ChildFlag;

[RunParameter("YouthFlag", 0f, "A factor to apply if the person is a child [11-15].")]
public float YouthFlag;

private ITripComponentData Network;

[Parameter("Feasible", 1f, "Is the mode feasible?(1)")]
Expand Down Expand Up @@ -161,6 +167,8 @@ public double CalculateV(ITrip trip)
v += ZonalDensityForActivitiesArray[d];
break;
}
v += p.Child ? ChildFlag : 0f;
v += p.Youth ? YouthFlag : 0f;
v += GetPlanningDistrictConstant(trip.TripStartTime, originalZone.PlanningDistrict, destinationZone.PlanningDistrict);
return v;
}
Expand Down

0 comments on commit 5fe6b4a

Please sign in to comment.