예제 #1
0
파일: Walking.cs 프로젝트: taha-islam/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);
        }
예제 #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
파일: Walking.cs 프로젝트: taha-islam/XTMF
 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;
        }