Skip to content

Commit 5fe6b4a

Browse files
authored
Add Child and Youth Constants for WAT (#239)
1 parent 7d87f78 commit 5fe6b4a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tasha/V4Modes/PerceivedTravelTimes/WalkAccessTransit.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ public class WalkAccessTransit : ITashaMode, IIterationSensitive
8484
[RunParameter("NonWorkerStudentTravelCostFactor", 0f, "The factor applied to the travel cost ($'s).")]
8585
public float NonWorkerStudentCostFactor;
8686

87+
[RunParameter("ChildFlag", 0f, "A factor to apply if the person is a child [0-10].")]
88+
public float ChildFlag;
89+
90+
[RunParameter("YouthFlag", 0f, "A factor to apply if the person is a child [11-15].")]
91+
public float YouthFlag;
92+
8793
private ITripComponentData Network;
8894

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

0 commit comments

Comments
 (0)