• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IInputParameters类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IInputParameters的典型用法代码示例。如果您正苦于以下问题:C# IInputParameters类的具体用法?C# IInputParameters怎么用?C# IInputParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IInputParameters类属于命名空间,在下文中一共展示了IInputParameters类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        //private static StreamWriter log;
        //---------------------------------------------------------------------
        public static void Initialize(IInputParameters parameters)
        {
            FuncType            = parameters.SppFunctionalType;
            NFixer              = parameters.NFixer;
            GDDmin              = parameters.GDDmin;
            GDDmax              = parameters.GDDmax;
            MinJanTemp          = parameters.MinJanTemp;
            MaxDrought          = parameters.MaxDrought;
            LeafLongevity       = parameters.LeafLongevity;
            Epicormic           = parameters.Epicormic;
            LeafLignin          = parameters.LeafLignin;
            WoodLignin          = parameters.WoodLignin ;
            //CoarseRootLignin    = parameters.CoarseRootLignin ;
            //FineRootLignin      = parameters.FineRootLignin ;
            LeafCN              = parameters.LeafCN;
            WoodCN              = parameters.WoodCN;
            //CoarseRootCN        = parameters.CoarseRootCN;
            LeafLitterCN        = parameters.FoliageLitterCN;
            //FineRootCN          = parameters.FineRootCN;
            //NLimits = new Species.AuxParm<double>(PlugIn.ModelCore.Species);

            Establishment.Initialize();

            // The initial set of establishment probabilities:
            EstablishProbability = Establishment.GenerateNewEstablishProbabilities(parameters.Timestep);

            ChangeParameters(parameters);
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:30,代码来源:SpeciesData.cs


示例2: LoadParameters

        //---------------------------------------------------------------------

        public override void LoadParameters(string dataFile, ICore mCore)
        {
            modelCore = mCore;
            SiteVars.Initialize();
            InputParameterParser parser = new InputParameterParser();
            parameters = Landis.Data.Load<IInputParameters>(dataFile, parser);
        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:9,代码来源:PlugIn.cs


示例3: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IInputParameters parameters)
        {
            string logFileName   = "Century-succession-log.csv";
            PlugIn.ModelCore.Log.WriteLine("   Opening Century-succession log file \"{0}\" ...", logFileName);
            try {
                log = new StreamWriter(logFileName);
            }
            catch (Exception err) {
                string mesg = string.Format("{0}", err.Message);
                throw new System.ApplicationException(mesg);
            }

            log.AutoFlush = true;
            log.Write("Time, Ecoregion, NumSites,");
            log.Write("NEEC, SOMTC, AGB, ");
            log.Write("AG_NPPC, BG_NPPC, LitterfallC, AgeMortality, ");
            log.Write("MineralN, TotalN, GrossMineralization, ");
            log.Write("C:LeafFRoot, C:WoodCRoot, C:DeadWood, C:DeadCRoot, ");
            log.Write("C:SurfStruc, C:SurfMeta, C:SoilStruc, C:SoilMeta, ");
            log.Write("C:SOM1surf, C:SOM1soil, C:SOM2, C:SOM3, ");
            log.Write("N:CohortLeaf, N:CohortWood, N:DeadWood, N:DeadRoot, ");
            log.Write("N:SurfStruc, N:SurfMeta, N:SoilStruc, N:SoilMeta, ");
            log.Write("N:SOM1surf, N:SOM1soil, N:SOM2, N:SOM3, ");
            log.Write("SurfStrucNetMin, SurfMetaNetMin, SoilStrucNetMin, SoilMetaNetMin, ");
            log.Write("SOM1surfNetMin, SOM1soilNetMin, SOM2NetMin, SOM3NetMin, ");
            log.Write("StreamC, StreamN, FireCEfflux, FireNEfflux, ");
            log.Write("Nuptake, Nresorbed, TotalSoilN, Nvol, avgfrassC,");
            log.WriteLine("");
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:30,代码来源:Outputs.cs


示例4: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IInputParameters parameters)
        {
            transpiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            AnnualTranspiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            infiltration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            runoff = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            waterleakage = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            evaporation = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            WHC = parameters.WHC;
            EvaporationFraction = parameters.EvaporationFraction;
            LeakageFraction = parameters.LeakageFraction;
            SnowPack = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            Water = PlugIn.ModelCore.Landscape.NewSiteVar<float>();

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                SnowPack[site] = 0;
                Water[site] = 0;
                infiltration[site] = 0;
                runoff[site] = 0;
                evaporation[site] = 0;
                transpiration[site] = 0;
                AnnualTranspiration[site] = 0;
            }
            PlugIn.ModelCore.RegisterSiteVar(AnnualTranspiration, "Succession.AnnualTranspiration");

            PlugIn.ModelCore.RegisterSiteVar(Water, "Succession.SoilWater");
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:29,代码来源:Hydrology.cs


示例5: LoadParameters

 //---------------------------------------------------------------------
 public override void LoadParameters(string dataFile,
                                     ICore mCore)
 {
     modelCore = mCore;
     InputParametersParser parser = new InputParametersParser();
     parameters = modelCore.Load<IInputParameters>(dataFile, parser);
 }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:8,代码来源:PlugIn.cs


示例6: Initialize

        public static void Initialize(IInputParameters parameters)
        {
            InitializeSpeciesParameters(parameters);
            InitializeSiteVariables();

            PlugIn.ModelCore.RegisterSiteVar(establishments, "Succession.Establishments");
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:7,代码来源:EstablishmentProbability.cs


示例7: LoadParameters

 //---------------------------------------------------------------------
 public override void LoadParameters(string dataFile, ICore mCore)
 {
     modelCore = mCore;
     InputParametersParser.SpeciesDataset = modelCore.Species;
     InputParametersParser parser = new InputParametersParser();
     parameters = Landis.Data.Load<IInputParameters>(dataFile, parser);
 }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Output,代码行数:8,代码来源:PlugIn.cs


示例8: Initialize

 //---------------------------------------------------------------------
 public static void Initialize(IInputParameters parameters)
 {
     RootTurnover = parameters.RootTurnover;
     WoodTurnover = parameters.WoodTurnover;
     FoliageTurnover = parameters.FoliageTurnover;
     FolReten = parameters.FolReten;
     LeafLignin = parameters.LeafLignin;
     MortCurveShapeParm      = parameters.MortCurveShapeParm;
     GrowthCurveShapeParm = parameters.GrowthCurveShapeParm;
     HalfSat = parameters.HalfSat;
     EstRadSensitivity = parameters.EstRadSensitivity;
     EstMoistureSensitivity = parameters.EstMoistureSensitivity;
     PsnTOpt = parameters.PsnTOpt;
     AmaxA = parameters.AmaxA;
     AmaxB = parameters.AmaxB;
     PsnTMin = parameters.PsnTMin;
     DVPD1 = parameters.DVPD1;
     DVPD2 = parameters.DVPD2;
     FolNCon = parameters.FolNCon;
     BaseFolRespFrac = parameters.BaseFolRespFrac;
     GrowthMoistureSensitivity = parameters.GrowthMoistureSensitivity;
     SLWmax = parameters.SLWmax;
     k=parameters.K;
     SenescStart = parameters.SenescStart;
     WUEConst = parameters.WUEConst;
     RespQ10 = parameters.RespQ10;
     PsnAgeRed = parameters.PsnAgeRed;
     InitialFol = parameters.InitialFol;
     GDDFolStart = parameters.GDDFolStart;
     DFol = parameters.DFol;
     GRespFrac = parameters.GRespFrac;
     DRoot = parameters.DRoot;
     DStem = parameters.DStem;
 }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:35,代码来源:SpeciesData.cs


示例9: LoadParameters

        //---------------------------------------------------------------------

        public override void LoadParameters(string dataFile, ICore mCore)
        {
            modelCore = mCore;
            Landis.Library.HarvestManagement.Main.InitializeLib(modelCore);
            InputParametersParser parser = new InputParametersParser(mCore.Species);
            parameters = Landis.Data.Load<IInputParameters>(dataFile, parser);
            if (parser.RoundedRepeatIntervals.Count > 0)
            {
                PlugIn.ModelCore.UI.WriteLine("NOTE: The following repeat intervals were rounded up to");
                PlugIn.ModelCore.UI.WriteLine("      ensure they were multiples of the harvest timestep:");
                PlugIn.ModelCore.UI.WriteLine("      File: {0}", dataFile);
                foreach (RoundedInterval interval in parser.RoundedRepeatIntervals)
                    PlugIn.ModelCore.UI.WriteLine("      At line {0}, the interval {1} rounded up to {2}",
                                 interval.LineNumber,
                                 interval.Original,
                                 interval.Adjusted);
            }
            if (parser.ParserNotes.Count > 0)
            {
                foreach (List<string> nList in parser.ParserNotes)
                {
                    foreach (string nLine in nList)
                    {
                        PlugIn.ModelCore.UI.WriteLine(nLine);
                    }
                }
            }
        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:30,代码来源:PlugIn.cs


示例10: InitializeClimData

        public static void InitializeClimData(IInputParameters _parameters)
        {
            parameters = _parameters;

            ReadContent();

            SetFileProps();

            Data = new DateVar<CClimDay>("ClimateData", FirstYearOnFile, LastYearOnFile);

            for (int Year = FirstYearOnFile; Year < LastYearOnFile; Year++)
            {
                for(int Month = 1; Month <=12; Month++)
                {
                    string line = GetLine(Year, Month);
                    string[] terms = line.Split(delim);
                    if (terms.Count() != ColumnCount)
                    {
                        throw new System.Exception("Unexpected number of columns in " + parameters.climateFileName + " (year,month) "+ Year +" "+ Month);
                    }
                    DateTime CurrentDate = new DateTime(Year, Month, 15);

                    float TMax = float.Parse(terms[TMaxCol]);
                    float TMin = float.Parse(terms[TMinCol]);
                    float CO2 = float.Parse(terms[CO2Col]);
                    float PAR0 = float.Parse(terms[PAR0col]);
                    float Prec = float.Parse(terms[Preccol]);

                    if (TMax < TMin) throw new System.Exception("Recheck climate data in " + parameters.climateFileName + " Tmax < Tmin on " + CurrentDate);
                    else if (Prec < 0) throw new System.Exception("Recheck climate data in " + parameters.climateFileName + " Prec = " + Prec + "\t" + CurrentDate);

                    Data[CurrentDate] = new CClimDay(parameters.Latitude, CurrentDate, PAR0, TMin, TMax, Prec, CO2);
                }
            }
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:35,代码来源:ClimateData.cs


示例11: LoadParameters

        //---------------------------------------------------------------------

        public override void LoadParameters(string dataFile,
                                            ICore mCore)
        {
            ExtensionMain baseHarvest = new BaseHarvest.PlugIn();
            try
            {
                baseHarvest.LoadParameters(null, mCore);
            }
            catch (System.ArgumentNullException)
            {
                // ignore
            }

            modelCore = mCore;

            // Add local event handler for cohorts death due to age-only
            // disturbances.
            Landis.Library.LeafBiomassCohorts.Cohort.AgeOnlyDeathEvent += CohortKilledByAgeOnlyDisturbance;

            InputParametersParser parser = new InputParametersParser(modelCore.Species);

            BaseHarvest.IInputParameters baseParameters = Landis.Data.Load<BaseHarvest.IInputParameters>(dataFile, parser);
            parameters = baseParameters as IInputParameters;
            if (parser.RoundedRepeatIntervals.Count > 0)
            {
                modelCore.UI.WriteLine("NOTE: The following repeat intervals were rounded up to");
                modelCore.UI.WriteLine("      ensure they were multiples of the harvest timestep:");
                modelCore.UI.WriteLine("      File: {0}", dataFile);
                foreach (RoundedInterval interval in parser.RoundedRepeatIntervals)
                    modelCore.UI.WriteLine("      At line {0}, the interval {1} rounded up to {2}",
                                 interval.LineNumber,
                                 interval.Original,
                                 interval.Adjusted);
            }
        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:37,代码来源:PlugIn.cs


示例12: Initialize

        //---------------------------------------------------------------------

        public static void Initialize(IInputParameters parameters)
        {
            manyInsect = parameters.ManyInsect;

            // Assign the method below to the CohortDefoliation delegate in
            // biomass-cohorts/Biomass.CohortDefoliation.cs
            Landis.Library.Biomass.CohortDefoliation.Compute = Defoliate.DefoliateCohort;
        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:10,代码来源:Defoliate.cs


示例13: LoadParameters

        //---------------------------------------------------------------------

        public override void LoadParameters(string dataFile,
                                            ICore mCore)
        {
            modelCore = mCore;
            SiteVars.Initialize(mCore);
            ParameterParser parser = new ParameterParser();
            parameters = mCore.Load<IInputParameters>(dataFile, parser);
            modelCore.Log.WriteLine("Exiting LoadParameters method !!!");
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:11,代码来源:PlugIn.cs


示例14: Initialize

 //---------------------------------------------------------------------
 public static void Initialize(IInputParameters parameters)
 {
     //ChangeParameters(parameters);
     Drought_Y = parameters.Drought_Y;
     Drought_YSE = parameters.Drought_YSE;
     Drought_B = parameters.Drought_B;
     Drought_BSE = parameters.Drought_BSE;
     Drought_Sens = parameters.Drought_Sens;
 }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:10,代码来源:SpeciesData.cs


示例15: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IInputParameters parameters)
        {
            foreach (ActiveSite site in Model.Core.Landscape)
            {
                IEcoregion ecoregion = Model.Core.Ecoregion[site];

                SiteVars.Rock[site].ContentP = (parameters.InitialMineralP[ecoregion] * 0.99);
            }
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Succession,代码行数:10,代码来源:Rock.cs


示例16: Initialize

        //---------------------------------------------------------------------

        public static void Initialize(IInputParameters parameters)
        {
            manyInsect = parameters.ManyInsect;

            // Assign the method below to the CohortGrowthReduction delegate in
            // biomass-cohorts/Biomass.CohortGrowthReduction.cs
            CohortGrowthReduction.Compute = ReduceCohortGrowth;

        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:11,代码来源:GrowthReduction.cs


示例17: Initialize

 //---------------------------------------------------------------------
 public static void Initialize(IInputParameters parameters)
 {
     UpdateParameters(parameters);
     ActiveSiteCount = new Ecoregions.AuxParm<int>(Model.Core.Ecoregions);
     foreach (ActiveSite site in Model.Core.Landscape)
     {
         IEcoregion ecoregion = Model.Core.Ecoregion[site];
         ActiveSiteCount[ecoregion]++;
     }
 }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Succession,代码行数:11,代码来源:EcoregionData.cs


示例18: Initialize

 public static void Initialize(IInputParameters parameters)
 {
     EstRad = parameters.EstRad;
     EstMoist = parameters.EstMoist;
     GDDFolSt = parameters.GDDFolSt;
     PsnTMin = parameters.PsnTMin;
     CDDFolEnd = parameters.CDDFolEnd;
     HalfSat = parameters.HalfSat;
     Porosity = parameters.Porosity;
 }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:10,代码来源:EstablishmentProbability.cs


示例19: LoadParameters

        public override void LoadParameters(string dataFile, ICore mCore)
        {
            modelCore = mCore;
            InputParameterParser parser = new InputParameterParser();
            parameters = Landis.Data.Load<IInputParameters>(dataFile, parser);

            // Add local event handler for cohorts death due to age-only
            // disturbances.
            Cohort.AgeOnlyDeathEvent += CohortKilledByAgeOnlyDisturbance;

        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:11,代码来源:PlugIn.cs


示例20: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IInputParameters parameters)
        {
            AET = parameters.AET;  //FINISH LATER

            B_MAX               = new Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions);
            ActiveSiteCount     = new Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions);

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                IEcoregion ecoregion = PlugIn.ModelCore.Ecoregion[site];
                ActiveSiteCount[ecoregion]++;
            }
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:14,代码来源:EcoregionData.cs



注:本文中的IInputParameters类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IInputStream类代码示例发布时间:2022-05-24
下一篇:
C# IInputOutputArray类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap