Пример #1
0
        //---------------------------------------------------------------------

        public override void Initialize()
        {
            Model.Core.UI.WriteLine("Initializing {0}...", Name);

            SiteVars.Initialize(Model.Core);
            Timestep         = parameters.Timestep;
            inputMapTemplate = parameters.InputMaps;

            pauseFunction = new Pause(parameters.ExternalScript, parameters.ExternalExecutable, parameters.ExternalCommand);
            if (!pauseFunction.UsePause)
            {
                Model.Core.UI.WriteLine("No pause processes specified, continuing normally");
                pauseFunction = null;
            }
            if (parameters.SiteLogPath != null)
            {
                SiteLog.Initialize(parameters.SiteLogPath);
            }

            // Load initial land uses from input map for timestep 0
            ProcessInputMap(
                delegate(Site site,
                         LandUse initialLandUse)
            {
                SiteVars.LandUse[site] = initialLandUse;
                return(initialLandUse.Name);
            });
        }
Пример #2
0
        //---------------------------------------------------------------------

        public override void Initialize()
        {
            Model.Core.UI.WriteLine("Initializing {0}...", Name);
            SiteVars.Initialize(Model.Core);
            Timestep         = parameters.Timestep;
            inputMapTemplate = parameters.InputMaps;
            if (parameters.SiteLogPath != null)
            {
                SiteLog.Initialize(parameters.SiteLogPath);
            }

            // Load initial land uses from input map for timestep 0
            ProcessInputMap(
                delegate(Site site,
                         LandUse initialLandUse)
            {
                SiteVars.LandUse[site] = initialLandUse;
                return(initialLandUse.Name);
            });
        }