예제 #1
0
        public bool RuntimeValidation(ref string error)
        {
            var networks = Root.NetworkData;

            if (string.IsNullOrWhiteSpace(NetworkType))
            {
                error = "There was no network type selected for the " + (string.IsNullOrWhiteSpace(ModeName) ? "Walk access transit" : ModeName) + " mode!";
                return(false);
            }
            if (!ZonalDensityForActivities.CheckResourceType <SparseArray <float> >())
            {
                error = "In '" + Name + "' the resource for Zonal Density For Activities was of the wrong type!";
                return(false);
            }
            if (!ZonalDensityForHome.CheckResourceType <SparseArray <float> >())
            {
                error = "In '" + Name + "' the resource for Zonal Density For Home was of the wrong type!";
                return(false);
            }
            if (networks == null)
            {
                error = "There was no Auto Network loaded for the Transit Mode!";
                return(false);
            }
            if (!AssignNetwork(networks))
            {
                error = "We were unable to find the network data with the name \"" + NetworkType + "\" in this Model System!";
                return(false);
            }
            return(true);
        }
예제 #2
0
 public bool RuntimeValidation(ref string error)
 {
     if (!ZonalDensityForActivities.CheckResourceType <SparseArray <float> >())
     {
         error = "In '" + Name + "' the resource for Zonal Density For Activities was of the wrong type!";
         return(false);
     }
     if (!ZonalDensityForHome.CheckResourceType <SparseArray <float> >())
     {
         error = "In '" + Name + "' the resource for Zonal Density For Home was of the wrong type!";
         return(false);
     }
     return(true);
 }