예제 #1
0
 internal bool GetEgressUtility(int flatEgressZone, int flatDestinationZone, Time time, out float egressUtility)
 {
     // Make sure that we can get from the egress station to the destination zone at that current point in the day
     if (!Third.ValidOd(flatEgressZone, flatDestinationZone, time))
     {
         egressUtility = float.MinValue;
         return(false);
     }
     Third.GetAllData(flatEgressZone, flatDestinationZone, time, out Time ivtt, out Time walk, out Time wait, out Time boarding, out float cost);
     egressUtility = ivtt.ToMinutes() + EgressWaitFactor * wait.ToMinutes() + EgressWalkFactor * walk.ToMinutes();
     return(egressUtility != float.MaxValue);
 }
예제 #2
0
파일: BasicMode.cs 프로젝트: lunaxi7/XTMF
        public bool Feasible(IZone originZone, IZone destinationZone, Time time)
        {
            var zoneArray   = Root.ZoneSystem.ZoneArray;
            var origin      = zoneArray.GetFlatIndex(originZone.ZoneNumber);
            var destination = zoneArray.GetFlatIndex(destinationZone.ZoneNumber);

            if (CurrentlyFeasible <= 0)
            {
                return(false);
            }
            if (AdvancedNetworkData == null)
            {
                return(NetworkData.ValidOd(origin, destination, time) && (!CheckPositiveIVTT || NetworkData.TravelTime(origin, destination, time).ToMinutes() > 0));
            }

            AdvancedNetworkData.GetAllData(origin, destination, time, out float ivtt, out float walk, out float wait, out float boarding, out float cost);
            return(AdvancedNetworkData.ValidOd(origin, destination, time) &&
                   ((!CheckPositiveIVTT || ivtt > 0)) &&
                   ((!CheckPositiveWalk || walk > 0)));
        }
예제 #3
0
파일: Transit.cs 프로젝트: lunaxi7/XTMF
 public bool Feasible(IZone origin, IZone destination, Time timeOfDay)
 {
     return((origin.ZoneNumber == destination.ZoneNumber && UseIntrazonalRegression) || (CurrentlyFeasible > 0 & Data.ValidOd(origin, destination, timeOfDay)));
 }
예제 #4
0
 public virtual bool Feasible(IZone origin, IZone destination, Time time)
 {
     return((CurrentlyFeasible > 0) && (AdvancedNetworkData == null ?
                                        NetworkData.ValidOd(origin, destination, time)
         : AdvancedNetworkData.ValidOd(origin, destination, time)));
 }