/// <summary> /// The Time it takes to walk between two zones /// Time of day does not effect this for walking /// </summary> /// <param name="origin">The origin of Travel</param> /// <param name="destination">The destination of Travel</param> /// <param name="time">The Time of Day</param> /// <returns>The Time it takes to walk from origin to destination</returns> public Time TravelTime(IZone origin, IZone destination, Time time) { double distance = origin == destination ? origin.InternalDistance : origin.Distance(destination); Time ret = Time.FromMinutes((float)(distance / this.AvgWalkSpeed)); return(ret); }
private bool DistanceRequirement(IZone origin, IZone destination, ITashaPerson iPerson) { int grade = GetGrade(iPerson); double distance = origin.Distance(destination); if ((grade > 0) & (grade < 6)) { return(distance > 1600); } if (grade < 9) { return(distance > 3200); } if (grade < 13) { return(distance > 4800); } return(false); }
private bool DistanceRequirement(IZone iZone, IZone iZone_2, ITashaPerson iPerson) { int grade = GetGrade(iPerson); double distance = iZone.Distance(iZone_2); if ((grade > 0) & (grade < 6)) { return(distance > 1600); } else if (grade < 9) { return(distance > 3200); } else if (grade < 13) { return(distance > 4800); } else { return(false); } }
public bool Feasible(IZone origin, IZone destination, Time timeOfDay) { return(CurrentlyFeasible > 0 && origin.Distance(destination) <= MaxWalkDistance); }
/// <summary> /// The Time it takes to walk between two zones /// Time of day does not effect this for walking /// </summary> /// <param name="origin">The origin of Travel</param> /// <param name="destination">The destination of Travel</param> /// <param name="time">The Time of Day</param> /// <returns>The Time it takes to walk from origin to destination</returns> public Time TravelTime(IZone origin, IZone destination, Time time) { double distance = origin == destination ? origin.InternalDistance : origin.Distance( destination ); Time ret = Time.FromMinutes( (float)( distance / this.AvgWalkSpeed ) ); return ret; }
public bool Feasible(IZone origin, IZone destination, Time timeOfDay) { return CurrentlyFeasible > 0 && origin.Distance( destination ) <= MaxWalkDistance; }
private bool DistanceRequirement(IZone iZone, IZone iZone_2, ITashaPerson iPerson) { int grade = GetGrade( iPerson ); double distance = iZone.Distance( iZone_2 ); if ( ( grade > 0 ) & ( grade < 6 ) ) return distance > 1600; else if ( grade < 9 ) return distance > 3200; else if ( grade < 13 ) return distance > 4800; else return false; }