示例#1
0
        /// <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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
            }
        }
示例#4
0
 public bool Feasible(IZone origin, IZone destination, Time timeOfDay)
 {
     return(CurrentlyFeasible > 0 && origin.Distance(destination) <= MaxWalkDistance);
 }
示例#5
0
文件: Walking.cs 项目: Cocotus/XTMF
 /// <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;
 }
示例#6
0
文件: Walking.cs 项目: Cocotus/XTMF
 public bool Feasible(IZone origin, IZone destination, Time timeOfDay)
 {
     return CurrentlyFeasible > 0 && origin.Distance( destination ) <= MaxWalkDistance;
 }
示例#7
0
文件: SchoolBus.cs 项目: Cocotus/XTMF
        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;
        }