public ActionResult Create(int portfolioId, PropertyDescription propertydescription) { if (ModelState.IsValid) { db.Portfolios.Find(portfolioId).Properties.Add(propertydescription); //db.PropertyDescriptions.Add(propertydescription); db.SaveChanges(); return RedirectToAction("Details", "Portfolio", new { id = portfolioId }); } return View();//todo - look at this? }
public RangeEditorViewModel(string propertyName, PropertyDescription propertyDescription, EffectProcessor effectViewModel) : base(effectViewModel) { m_propertyDescription = propertyDescription; PropertyName = propertyName; Minimum = propertyDescription.MinValue != null ? Convert.ToDouble(propertyDescription.MinValue) : 0; Maximum = AdjustMaximumValueIfNeeded(propertyDescription.MaxValue); EditorTemplateKey = "RangeEditorTemplate"; if (m_EffectViewModel.Effect != null) { m_Value = Convert.ToDouble(GetPropertyValue(PropertyName)); } }
public Preciprec() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 100; v1.Description = "The density of the new snow fixed by the user"; v1.Id = 0; v1.MaxValue =; v1.MinValue =; v1.Name = "rho"; v1.Size = 1; v1.Units = "kg/m**3"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd1.PropertyName = "Sdry"; pd1.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd2.PropertyName = "Sdry"; pd2.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd3.PropertyName = "Swet"; pd3.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd4.PropertyName = "Swet"; pd4.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd5.PropertyName = "Sdepth"; pd5.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd6.PropertyName = "Sdepth"; pd6.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd7.PropertyName = "Mrf"; pd7.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Mrf).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Mrf); _inputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowAuxiliary); pd8.PropertyName = "precip"; pd8.PropertyType = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.precip).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.precip); _inputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd9.PropertyName = "Snowaccu"; pd9.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu); _inputs0_0.Add(pd9); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd10.PropertyName = "preciprec"; pd10.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.preciprec).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.preciprec); _outputs0_0.Add(pd10); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public MaximumPotentialFinalLAI() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0; v1.Description = "Number of leaves produced after floral initiation"; v1.Id = 0; v1.MaxValue = 0; v1.MinValue = 0; v1.Name = "NLL"; v1.Size = 1; v1.Units = "leaf"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0; v2.Description = "Maximum potential surface area of the penultimate leaf lamina"; v2.Id = 0; v2.MaxValue = 0; v2.MinValue = 0; v2.Name = "AreaPL"; v2.Size = 1; v2.Units = "cm²/lamina"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0; v3.Description = "Ratio of flag leaf to penultimate leaf lamina surface area"; v3.Id = 0; v3.MaxValue = 0; v3.MinValue = 0; v3.Name = "RatioFLPL"; v3.Size = 1; v3.Units = "dimensionless"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 0; v4.Description = "Potential surface area of the leaves produced before floral initiation"; v4.Id = 0; v4.MaxValue = 0; v4.MinValue = 0; v4.Name = "AreaSL"; v4.Size = 1; v4.Units = "cm²/lamina"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 0; v5.Description = "Potential surface area of the sheath of the leaves produced before floral initiation"; v5.Id = 0; v5.MaxValue = 0; v5.MinValue = 0; v5.Name = "AreaSS"; v5.Size = 1; v5.Units = "cm²/lamina"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd1.PropertyName = "newLeafHasAppeared"; pd1.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd2.PropertyName = "leafNumber"; pd2.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd3.PropertyName = "roundedFinalLeafNumber"; pd3.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.roundedFinalLeafNumber)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.roundedFinalLeafNumber); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd4.PropertyName = "finalLeafNumber"; pd4.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.finalLeafNumber)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.finalLeafNumber); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd5.PropertyName = "leafTillerNumberArray"; pd5.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafTillerNumberArray)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafTillerNumberArray); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd6.PropertyName = "tilleringProfile"; pd6.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.tilleringProfile)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.tilleringProfile); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd7.PropertyName = "isSmallPhytomer"; pd7.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.isSmallPhytomer)).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.isSmallPhytomer); _inputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd8.PropertyName = "phytonum"; pd8.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.phytonum)).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.phytonum); _inputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd9.PropertyName = "index"; pd9.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.index)).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.index); _inputs0_0.Add(pd9); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd10.PropertyName = "MaximumPotentialSheathAI"; pd10.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.MaximumPotentialSheathAI)).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.MaximumPotentialSheathAI); _outputs0_0.Add(pd10); PropertyDescription pd11 = new PropertyDescription(); pd11.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd11.PropertyName = "MaximumPotentialLaminaeAI"; pd11.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.MaximumPotentialLaminaeAI)).ValueType.TypeForCurrentValue; pd11.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.MaximumPotentialLaminaeAI); _outputs0_0.Add(pd11); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public calcLER() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 4.25; v1.Description = "potential growth of leaf 6"; v1.Id = 0; v1.MaxValue = 10; v1.MinValue = -10; v1.Name = "LERa"; v1.Size = 1; v1.Units = "mm/dd"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = -1.15; v2.Description = "effect of vapor pressure deficit on leaf 6 elongation"; v2.Id = 0; v2.MaxValue = 10; v2.MinValue = -10; v2.Name = "LERb"; v2.Size = 1; v2.Units = "mm/[dd.kPa]"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 3.69; v3.Description = "effect of soil water deficit on leaf 6 elongation"; v3.Id = 0; v3.MaxValue = 10; v3.MinValue = -10; v3.Name = "LERc"; v3.Size = 1; v3.Units = "mm/[dd.Bars]"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd1.PropertyName = "FPAW"; pd1.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.FPAW)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.FPAW); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd2.PropertyName = "VPDeq"; pd2.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.VPDeq)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.VPDeq); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd3.PropertyName = "TCanopyHourly"; pd3.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.TCanopyHourly)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.TCanopyHourly); _inputs0_0.Add(pd3); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd4.PropertyName = "LER"; pd4.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.LER)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.LER); _outputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd5.PropertyName = "hLER"; pd5.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.hLER)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.hLER); _outputs0_0.Add(pd5); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
protected void ProcessColumns(Dictionary <Column, Column> columns, string file, string merge, bool dropColumns, string name_space, List <Pair <string> > prohibited) { OrmObjectsDef odef = null; if (File.Exists(file)) { if (merge == "error") { throw new InvalidOperationException("The file " + file + " is already exists."); } odef = OrmObjectsDef.LoadFromXml(new System.Xml.XmlTextReader(file)); } else { odef = new OrmObjectsDef(); odef.Namespace = name_space; odef.SchemaVersion = "1"; } foreach (Column c in columns.Keys) { bool ent, col; EntityDescription e = GetEntity(odef, c.Schema, c.Table, out ent); PropertyDescription pd = AppendColumn(columns, c, e, out col); if (ent) { Console.WriteLine("Create class {0} ({1})", e.Name, e.Identifier); _ents.Add(e.Identifier, null); } else if (col) { if (!_ents.ContainsKey(e.Identifier)) { Console.WriteLine("Alter class {0} ({1})", e.Name, e.Identifier); _ents.Add(e.Identifier, null); } Console.WriteLine("\tAdd property: " + pd.Name); } } ProcessProhibited(columns, prohibited, odef); ProcessM2M(columns, odef); if (dropColumns) { foreach (EntityDescription ed in odef.Entities) { List <PropertyDescription> col2remove = new List <PropertyDescription>(); foreach (PropertyDescription pd in ed.Properties) { string[] ss = ed.Tables[0].Name.Split('.'); Column c = new Column(ss[0].Trim(new char[] { '[', ']' }), ss[1].Trim(new char[] { '[', ']' }), pd.FieldName.Trim(new char[] { '[', ']' }), false, null, null, null, false); if (!columns.ContainsKey(c)) { col2remove.Add(pd); } } foreach (PropertyDescription pd in col2remove) { ed.Properties.Remove(pd); Console.WriteLine("Remove: {0}.{1}", ed.Name, pd.Name); } } } using (System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(file, System.Text.Encoding.UTF8)) { writer.Formatting = System.Xml.Formatting.Indented; odef.GetXmlDocument().Save(writer); } }
public VernalizationProgress() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.0; v1.Description = "Minimum temperature for vernalization to occur"; v1.Id = 0; v1.MaxValue = 60; v1.MinValue = -20; v1.Name = "minTvern"; v1.Size = 1; v1.Units = "°C"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 11.0; v2.Description = "Intermediate temperature for vernalization to occur"; v2.Id = 0; v2.MaxValue = 60; v2.MinValue = -20; v2.Name = "intTvern"; v2.Size = 1; v2.Units = "°C"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0.015; v3.Description = "Response of vernalization rate to temperature"; v3.Id = 0; v3.MaxValue = 1; v3.MinValue = 0; v3.Name = "vAI"; v3.Size = 1; v3.Units = "d-1 °C-1"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 0.01; v4.Description = "Vernalization rate at 0°C"; v4.Id = 0; v4.MaxValue = 1; v4.MinValue = 0; v4.Name = "vBEE"; v4.Size = 1; v4.Units = "d-1"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 8.0; v5.Description = "Threshold daylength below which it does influence vernalization rate"; v5.Id = 0; v5.MaxValue = 24; v5.MinValue = 12; v5.Name = "minDL"; v5.Size = 1; v5.Units = "h"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); VarInfo v6 = new VarInfo(); v6.DefaultValue = 15.0; v6.Description = "Saturating photoperiod above which final leaf number is not influenced by daylength"; v6.Id = 0; v6.MaxValue = 24; v6.MinValue = 0; v6.Name = "maxDL"; v6.Size = 1; v6.Units = "h"; v6.URL = ""; v6.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v6.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v6); VarInfo v7 = new VarInfo(); v7.DefaultValue = 23.0; v7.Description = "Maximum temperature for vernalization to occur"; v7.Id = 0; v7.MaxValue = 60; v7.MinValue = -20; v7.Name = "maxTvern"; v7.Size = 1; v7.Units = "°C"; v7.URL = ""; v7.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v7.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v7); VarInfo v8 = new VarInfo(); v8.DefaultValue = 4.0; v8.Description = "Number of primorida in the apex at emergence"; v8.Id = 0; v8.MaxValue = 24; v8.MinValue = 0; v8.Name = "pNini"; v8.Size = 1; v8.Units = "primordia"; v8.URL = ""; v8.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v8.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v8); VarInfo v9 = new VarInfo(); v9.DefaultValue = 24.0; v9.Description = "Absolute maximum leaf number"; v9.Id = 0; v9.MaxValue = 25; v9.MinValue = 0; v9.Name = "aMXLFNO"; v9.Size = 1; v9.Units = "leaf"; v9.URL = ""; v9.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v9.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v9); VarInfo v10 = new VarInfo(); v10.DefaultValue = 1; v10.Description = "true if the plant is vernalizable"; v10.Id = 0; v10.MaxValue = 1; v10.MinValue = 0; v10.Name = "isVernalizable"; v10.Size = 1; v10.Units = ""; v10.URL = ""; v10.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v10.ValueType = VarInfoValueTypes.GetInstanceForName("Integer"); _parameters0_0.Add(v10); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd1.PropertyName = "dayLength"; pd1.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.dayLength).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.dayLength); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd2.PropertyName = "deltaTT"; pd2.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.deltaTT).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.deltaTT); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd3.PropertyName = "cumulTT"; pd3.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd4.PropertyName = "leafNumber"; pd4.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd5.PropertyName = "calendarMoments"; pd5.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd6.PropertyName = "calendarDates"; pd6.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd7.PropertyName = "calendarCumuls"; pd7.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _inputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd8.PropertyName = "vernaprog"; pd8.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.vernaprog).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.vernaprog); _inputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd9.PropertyName = "currentdate"; pd9.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate); _inputs0_0.Add(pd9); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd10.PropertyName = "minFinalNumber"; pd10.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.minFinalNumber).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.minFinalNumber); _inputs0_0.Add(pd10); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd11 = new PropertyDescription(); pd11.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd11.PropertyName = "vernaprog"; pd11.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.vernaprog).ValueType.TypeForCurrentValue; pd11.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.vernaprog); _outputs0_0.Add(pd11); mo0_0.Outputs = _outputs0_0; PropertyDescription pd12 = new PropertyDescription(); pd12.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd12.PropertyName = "minFinalNumber"; pd12.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.minFinalNumber).ValueType.TypeForCurrentValue; pd12.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.minFinalNumber); _outputs0_0.Add(pd12); mo0_0.Outputs = _outputs0_0; PropertyDescription pd13 = new PropertyDescription(); pd13.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd13.PropertyName = "calendarMoments"; pd13.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd13.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _outputs0_0.Add(pd13); mo0_0.Outputs = _outputs0_0; PropertyDescription pd14 = new PropertyDescription(); pd14.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd14.PropertyName = "calendarDates"; pd14.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd14.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates); _outputs0_0.Add(pd14); mo0_0.Outputs = _outputs0_0; PropertyDescription pd15 = new PropertyDescription(); pd15.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd15.PropertyName = "calendarCumuls"; pd15.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd15.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _outputs0_0.Add(pd15); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public LeafExpansionDroughtFactor() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0; v1.Description = "Fraction of plant available water below which the rate of leaf expansion equals zer"; v1.Id = 0; v1.MaxValue = 0; v1.MinValue = 0; v1.Name = "LowerFPAWexp"; v1.Size = 1; v1.Units = "dimensionless"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0; v2.Description = "Fraction of plant available water threshold below which the rate of leaf expansion starts to decrease"; v2.Id = 0; v2.MaxValue = 0; v2.MinValue = 0; v2.Name = "UpperFPAWexp"; v2.Size = 1; v2.Units = "dimensionless"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0; v3.Description = "Maximum rate of acceleration of leaf senescence in response to soil water deficit"; v3.Id = 0; v3.MaxValue = 0; v3.MinValue = 0; v3.Name = "MaxDSF"; v3.Size = 1; v3.Units = "dimensionless"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 0; v4.Description = "Fraction of plant available water value below which DSFmax is reached"; v4.Id = 0; v4.MaxValue = 0; v4.MinValue = 0; v4.Name = "LowerFPAWsen"; v4.Size = 1; v4.Units = "dimensionless"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 0; v5.Description = "Fraction of plant available water threshold below which the rate of leaf senescence starts to accelerate"; v5.Id = 0; v5.MaxValue = 0; v5.MinValue = 0; v5.Name = "UpperFPAWsen"; v5.Size = 1; v5.Units = "dimensionless"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); VarInfo v6 = new VarInfo(); v6.DefaultValue = 0; v6.Description = "Canopy-to-air VPD below which the rate of leaf expansion equals zero and the rate of leaf senescence is maximum"; v6.Id = 0; v6.MaxValue = 0; v6.MinValue = 0; v6.Name = "UpperVPD"; v6.Size = 1; v6.Units = "hPa"; v6.URL = ""; v6.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v6.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v6); VarInfo v7 = new VarInfo(); v7.DefaultValue = 0; v7.Description = "Canopy-to-air VPD threshold above which the rate of leaf expansion strats to decreaseand the rate of leaf senescence starts to increase"; v7.Id = 0; v7.MaxValue = 0; v7.MinValue = 0; v7.Name = "LowerVPD"; v7.Size = 1; v7.Units = "hPa"; v7.URL = ""; v7.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v7.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v7); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd1.PropertyName = "FPAW"; pd1.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.FPAW)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.FPAW); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd2.PropertyName = "isPotentialLAI"; pd2.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.isPotentialLAI)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.isPotentialLAI); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd3.PropertyName = "VPDairCanopy"; pd3.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.VPDairCanopy)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.VPDairCanopy); _inputs0_0.Add(pd3); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd4.PropertyName = "DSF"; pd4.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.DSF)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.DSF); _outputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd5.PropertyName = "DEF"; pd5.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.DEF)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.DEF); _outputs0_0.Add(pd5); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public Penman() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.66; v1.Description = "psychrometric constant"; v1.Id = 0; v1.MaxValue = 1; v1.MinValue = 0; v1.Name = "psychrometricConstant"; v1.Size = 1; v1.Units = "hPa/degC"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 1.5; v2.Description = "Priestley-Taylor evapotranspiration proportionality constant"; v2.Id = 0; v2.MaxValue = 100; v2.MinValue = 0; v2.Name = "Alpha"; v2.Size = 1; v2.Units = ""; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 2.454; v3.Description = "latent heat of vaporization of water"; v3.Id = 0; v3.MaxValue = 10; v3.MinValue = 0; v3.Name = "lambdaV"; v3.Size = 1; v3.Units = "MJ/kg"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 1.225; v4.Description = "Density of air"; v4.Id = 0; v4.MaxValue = 1.225; v4.MinValue = 1.225; v4.Name = "rhoDensityAir"; v4.Size = 1; v4.Units = "kg/m**3"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 0.00101; v5.Description = "Specific heat capacity of dry air"; v5.Id = 0; v5.MaxValue = 1; v5.MinValue = 0; v5.Name = "specificHeatCapacityAir"; v5.Size = 1; v5.Units = "(MJ/kg)/degC"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityEnergybalance.DomainClass.EnergybalanceRate); pd1.PropertyName = "evapoTranspirationPriestlyTaylor"; pd1.PropertyType = (SiriusQualityEnergybalance.DomainClass.EnergybalanceRateVarInfo.evapoTranspirationPriestlyTaylor).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityEnergybalance.DomainClass.EnergybalanceRateVarInfo.evapoTranspirationPriestlyTaylor); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliary); pd2.PropertyName = "hslope"; pd2.PropertyType = (SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliaryVarInfo.hslope).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliaryVarInfo.hslope); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliary); pd3.PropertyName = "VPDair"; pd3.PropertyType = (SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliaryVarInfo.VPDair).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityEnergybalance.DomainClass.EnergybalanceAuxiliaryVarInfo.VPDair); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityEnergybalance.DomainClass.EnergybalanceState); pd4.PropertyName = "conductance"; pd4.PropertyType = (SiriusQualityEnergybalance.DomainClass.EnergybalanceStateVarInfo.conductance).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityEnergybalance.DomainClass.EnergybalanceStateVarInfo.conductance); _inputs0_0.Add(pd4); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityEnergybalance.DomainClass.EnergybalanceRate); pd5.PropertyName = "evapoTranspirationPenman"; pd5.PropertyType = (SiriusQualityEnergybalance.DomainClass.EnergybalanceRateVarInfo.evapoTranspirationPenman).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityEnergybalance.DomainClass.EnergybalanceRateVarInfo.evapoTranspirationPenman); _outputs0_0.Add(pd5); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public UpdateLeafFlag() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(Phenology.DomainClass.PhenologyAuxiliary); pd1.PropertyName = "cumulTT"; pd1.PropertyType = (Phenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (Phenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd2.PropertyName = "leafNumber"; pd2.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.leafNumber); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd3.PropertyName = "calendarMoments"; pd3.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd4.PropertyName = "calendarDates"; pd4.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarDates); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd5.PropertyName = "calendarCumuls"; pd5.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(Phenology.DomainClass.PhenologyAuxiliary); pd6.PropertyName = "currentdate"; pd6.PropertyType = (Phenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (Phenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd7.PropertyName = "finalLeafNumber"; pd7.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.finalLeafNumber).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.finalLeafNumber); _inputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd8.PropertyName = "hasFlagLeafLiguleAppeared"; pd8.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared); _inputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd9.PropertyName = "phase"; pd9.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.phase).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.phase); _inputs0_0.Add(pd9); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd10.PropertyName = "hasFlagLeafLiguleAppeared"; pd10.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared); _outputs0_0.Add(pd10); mo0_0.Outputs = _outputs0_0; PropertyDescription pd11 = new PropertyDescription(); pd11.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd11.PropertyName = "calendarMoments"; pd11.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd11.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _outputs0_0.Add(pd11); mo0_0.Outputs = _outputs0_0; PropertyDescription pd12 = new PropertyDescription(); pd12.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd12.PropertyName = "calendarDates"; pd12.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd12.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarDates); _outputs0_0.Add(pd12); mo0_0.Outputs = _outputs0_0; PropertyDescription pd13 = new PropertyDescription(); pd13.DomainClassType = typeof(Phenology.DomainClass.PhenologyState); pd13.PropertyName = "calendarCumuls"; pd13.PropertyType = (Phenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd13.PropertyVarInfo = (Phenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _outputs0_0.Add(pd13); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public LeafNumber() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd1.PropertyName = "deltaTT"; pd1.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.deltaTT).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.deltaTT); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd2.PropertyName = "phyllochron"; pd2.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phyllochron).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phyllochron); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd3.PropertyName = "hasFlagLeafLiguleAppeared"; pd3.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasFlagLeafLiguleAppeared); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd4.PropertyName = "leafNumber"; pd4.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd5.PropertyName = "phase"; pd5.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phase).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phase); _inputs0_0.Add(pd5); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd6.PropertyName = "leafNumber"; pd6.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber); _outputs0_0.Add(pd6); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public calcTipTT() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 190; v1.Description = "Thermal time from sowing to emergence"; v1.Id = 0; v1.MaxValue = 500; v1.MinValue = 0; v1.Name = "Dse"; v1.Size = 1; v1.Units = "°Cd"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 50; v2.Description = "Phyllochron of tip appearence"; v2.Id = 0; v2.MaxValue = 1000; v2.MinValue = 0; v2.Name = "atip"; v2.Size = 1; v2.Units = "°Cd/leaf"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = -49; v3.Description = "Intercept of the regression of thermal time with tip appearance"; v3.Id = 0; v3.MaxValue = 1000; v3.MinValue = -1000; v3.Name = "btip"; v3.Size = 1; v3.Units = "°Cd"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd1.PropertyName = "leafNumber"; pd1.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd2.PropertyName = "previousLeafNumber"; pd2.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.previousLeafNumber)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.previousLeafNumber); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd3.PropertyName = "newLeafHasAppeared"; pd3.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd4.PropertyName = "cumulTTPHenoMaize"; pd4.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.cumulTTPHenoMaize)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.cumulTTPHenoMaize); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd5.PropertyName = "deltaTTPhenoMaize"; pd5.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.deltaTTPhenoMaize)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.deltaTTPhenoMaize); _inputs0_0.Add(pd5); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLeafState); pd6.PropertyName = "tipTT"; pd6.PropertyType = ((SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.tipTT)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.tipTT); _outputs0_0.Add(pd6); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public SnowWet() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd1.PropertyName = "Swet"; pd1.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowAuxiliary); pd2.PropertyName = "precip"; pd2.PropertyType = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.precip).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.precip); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd3.PropertyName = "Snowaccu"; pd3.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd4.PropertyName = "Mrf"; pd4.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Mrf).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Mrf); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd5.PropertyName = "M"; pd5.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.M).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.M); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd6.PropertyName = "Sdry"; pd6.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdry); _inputs0_0.Add(pd6); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd7.PropertyName = "Swet"; pd7.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Swet); _outputs0_0.Add(pd7); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public RegisterZadok() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 300; v1.Description = "Duration of the endosperm endoreduplication phase"; v1.Id = 0; v1.MaxValue = 10000; v1.MinValue = 0; v1.Name = "Der"; v1.Size = 1; v1.Units = "°Cd"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0.9; v2.Description = "Slope of the relationship between Haun stage at terminal spikelet and final leaf number"; v2.Id = 0; v2.MaxValue = 10000; v2.MinValue = 0; v2.Name = "slopeTSFLN"; v2.Size = 1; v2.Units = "-"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 2.6; v3.Description = "Intercept of the relationship between Haun stage at terminal spikelet and final leaf number"; v3.Id = 0; v3.MaxValue = 10000; v3.MinValue = 0; v3.Name = "intTSFLN"; v3.Size = 1; v3.Units = "leaf"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd1.PropertyName = "cumulTT"; pd1.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.cumulTT)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.cumulTT); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd2.PropertyName = "phase_"; pd2.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.phase_)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.phase_); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd3.PropertyName = "LeafNumber"; pd3.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.LeafNumber)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.LeafNumber); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd4.PropertyName = "cumulTTFromZC_65"; pd4.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.cumulTTFromZC_65)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.cumulTTFromZC_65); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd5.PropertyName = "currentdate"; pd5.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.currentdate)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.currentdate); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd6.PropertyName = "Calendar"; pd6.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.Calendar)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.Calendar); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd7.PropertyName = "IsLatestLeafInternodeLengthPotPositive"; pd7.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.IsLatestLeafInternodeLengthPotPositive)).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.IsLatestLeafInternodeLengthPotPositive); _inputs0_0.Add(pd7); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd8.PropertyName = "hasZadokStageChanged"; pd8.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.hasZadokStageChanged)).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.hasZadokStageChanged); _outputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd9.PropertyName = "currentZadokStage"; pd9.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.currentZadokStage)).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.currentZadokStage); _outputs0_0.Add(pd9); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd10.PropertyName = "Calendar"; pd10.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.Calendar)).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.Calendar); _outputs0_0.Add(pd10); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public bool Equals(ContentTypeProperty input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( RootPropertyName == input.RootPropertyName || (RootPropertyName != null && RootPropertyName.Equals(input.RootPropertyName)) ) && ( ReadableName == input.ReadableName || (ReadableName != null && ReadableName.Equals(input.ReadableName)) ) && ( Value == input.Value || (Value != null && Value.Equals(input.Value)) ) && ( PropertyDescription == input.PropertyDescription || (PropertyDescription != null && PropertyDescription.Equals(input.PropertyDescription)) ) && ( Localizable == input.Localizable || (Localizable != null && Localizable.Equals(input.Localizable)) ) && ( Fallback == input.Fallback || (Fallback != null && Fallback.Equals(input.Fallback)) ) && ( Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled)) ) && ( Order == input.Order || (Order.Equals(input.Order)) ) && ( Visible == input.Visible || (Visible != null && Visible.Equals(input.Visible)) ) && ( IsTitle == input.IsTitle || (IsTitle != null && IsTitle.Equals(input.IsTitle)) ) && ( Required == input.Required || (Required != null && Required.Equals(input.Required)) ) && ( MaxLength == input.MaxLength || (MaxLength.Equals(input.MaxLength)) ) && ( MaxByteLength == input.MaxByteLength || (MaxByteLength.Equals(input.MaxByteLength)) ) && ( MaxFileSize == input.MaxFileSize || (MaxFileSize.Equals(input.MaxFileSize)) ) && ( Regexp == input.Regexp || (Regexp != null && Regexp.Equals(input.Regexp)) ) && ( ValidateAs == input.ValidateAs || (ValidateAs != null && ValidateAs.Equals(input.ValidateAs)) ) && ( RssAttribute == input.RssAttribute || (RssAttribute != null && RssAttribute.Equals(input.RssAttribute)) ) && ( VisibleDependency == input.VisibleDependency || (VisibleDependency != null && VisibleDependency.Equals(input.VisibleDependency)) ) && ( VisibleOn == input.VisibleOn || (VisibleOn != null && VisibleOn.Equals(input.VisibleOn)) ) && ( Datatype == input.Datatype || (Datatype != null && Datatype.Equals(input.Datatype)) ) && ( Attributes == input.Attributes || (Attributes != null && Attributes.SequenceEqual(input.Attributes)) ) && ( ChildProperties == input.ChildProperties || (ChildProperties != null && ChildProperties.SequenceEqual(input.ChildProperties)) ) && ( ContentTypeAllowed == input.ContentTypeAllowed || (ContentTypeAllowed != null && ContentTypeAllowed.Equals(input.ContentTypeAllowed)) ) && ( BindToProperty == input.BindToProperty || (BindToProperty != null && BindToProperty.Equals(input.BindToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( RepresentationSelection == input.RepresentationSelection || (RepresentationSelection != null && RepresentationSelection.SequenceEqual(input.RepresentationSelection)) ) && ( DefaultValues == input.DefaultValues || (DefaultValues != null && DefaultValues.SequenceEqual(input.DefaultValues)) ) && ( IsExternalAllowed == input.IsExternalAllowed || (IsExternalAllowed != null && IsExternalAllowed.Equals(input.IsExternalAllowed)) ) && ( PropertySection == input.PropertySection || (PropertySection != null && PropertySection.Equals(input.PropertySection)) ) && ( Weight == input.Weight || (Weight.Equals(input.Weight)) ) && ( Entitytype == input.Entitytype || (Entitytype != null && Entitytype.Equals(input.Entitytype)) ) && ( IsCombo == input.IsCombo || (IsCombo != null && IsCombo.Equals(input.IsCombo)) ) && ( SuppressProperty == input.SuppressProperty || (SuppressProperty != null && SuppressProperty.Equals(input.SuppressProperty)) ) && ( LegalContentTypes == input.LegalContentTypes || (LegalContentTypes != null && LegalContentTypes.SequenceEqual(input.LegalContentTypes)) ) && ( RepresentationValidationString == input.RepresentationValidationString || (RepresentationValidationString != null && RepresentationValidationString.Equals(input.RepresentationValidationString)) ) && ( MinWidth == input.MinWidth || (MinWidth.Equals(input.MinWidth)) ) && ( MaxWidth == input.MaxWidth || (MaxWidth.Equals(input.MaxWidth)) ) && ( MinHeight == input.MinHeight || (MinHeight.Equals(input.MinHeight)) ) && ( MaxHeight == input.MaxHeight || (MaxHeight.Equals(input.MaxHeight)) ) && ( IsVideo == input.IsVideo || (IsVideo != null && IsVideo.Equals(input.IsVideo)) ) && ( IsImage == input.IsImage || (IsImage != null && IsImage.Equals(input.IsImage)) )); }
public ShootNumber() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List<VarInfo> _parameters0_0 = new List<VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 288.0; v1.Description = "number of plant /m²"; v1.Id = 0; v1.MaxValue = 500; v1.MinValue = 0; v1.Name = "sowingDensity"; v1.Size = 1; v1.Units = "plant m-2"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 600.0; v2.Description = "max value of shoot number for the canopy"; v2.Id = 0; v2.MaxValue = 1000; v2.MinValue = 280; v2.Name = "targetFertileShoot"; v2.Size = 1; v2.Units = "shoot"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); mo0_0.Parameters=_parameters0_0; //Inputs List<PropertyDescription> _inputs0_0 = new List<PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd1.PropertyName = "canopyShootNumber"; pd1.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.canopyShootNumber).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.canopyShootNumber); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd2.PropertyName = "leafNumber"; pd2.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd3.PropertyName = "tilleringProfile"; pd3.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.tilleringProfile).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.tilleringProfile); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd4.PropertyName = "leafTillerNumberArray"; pd4.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafTillerNumberArray).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafTillerNumberArray); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd5.PropertyName = "numberTillerCohort"; pd5.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.numberTillerCohort).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.numberTillerCohort); _inputs0_0.Add(pd5); mo0_0.Inputs=_inputs0_0; //Outputs List<PropertyDescription> _outputs0_0 = new List<PropertyDescription>(); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd6.PropertyName = "averageShootNumberPerPlant"; pd6.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.averageShootNumberPerPlant).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.averageShootNumberPerPlant); _outputs0_0.Add(pd6); mo0_0.Outputs=_outputs0_0;PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd7.PropertyName = "canopyShootNumber"; pd7.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.canopyShootNumber).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.canopyShootNumber); _outputs0_0.Add(pd7); mo0_0.Outputs=_outputs0_0;PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd8.PropertyName = "leafTillerNumberArray"; pd8.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafTillerNumberArray).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafTillerNumberArray); _outputs0_0.Add(pd8); mo0_0.Outputs=_outputs0_0;PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd9.PropertyName = "tilleringProfile"; pd9.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.tilleringProfile).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.tilleringProfile); _outputs0_0.Add(pd9); mo0_0.Outputs=_outputs0_0;PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd10.PropertyName = "numberTillerCohort"; pd10.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.numberTillerCohort).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo =(SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.numberTillerCohort); _outputs0_0.Add(pd10); mo0_0.Outputs=_outputs0_0; //Associated strategies List<string> lAssStrat0_0 = new List<string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public CalculateHourlyAirTemperature() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0; v1.Description = "latitude"; v1.Id = 0; v1.MaxValue = 90; v1.MinValue = -90; v1.Name = "latitude"; v1.Size = 1; v1.Units = "°"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMeteo.MeteoState); pd1.PropertyName = "maxTair"; pd1.PropertyType = ((SiriusQualityMeteo.MeteoStateVarInfo.maxTair)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMeteo.MeteoStateVarInfo.maxTair); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMeteo.MeteoState); pd2.PropertyName = "minTair"; pd2.PropertyType = ((SiriusQualityMeteo.MeteoStateVarInfo.minTair)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMeteo.MeteoStateVarInfo.minTair); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMeteo.MeteoState); pd3.PropertyName = "dayOfYear"; pd3.PropertyType = ((SiriusQualityMeteo.MeteoStateVarInfo.dayOfYear)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMeteo.MeteoStateVarInfo.dayOfYear); _inputs0_0.Add(pd3); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMeteo.MeteoState); pd4.PropertyName = "hourlyAirTemperature"; pd4.PropertyType = ((SiriusQualityMeteo.MeteoStateVarInfo.hourlyAirTemperature)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMeteo.MeteoStateVarInfo.hourlyAirTemperature); _outputs0_0.Add(pd4); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public CalculatePTQ() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 70; v1.Description = "Thermal time window in which averages are computed"; v1.Id = 0; v1.MaxValue = 70000; v1.MinValue = 0; v1.Name = "TTWindowForPTQ"; v1.Size = 1; v1.Units = "°Cd"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0.45; v2.Description = "Exctinction Coefficient"; v2.Id = 0; v2.MaxValue = 50; v2.MinValue = 0; v2.Name = "Kl"; v2.Size = 1; v2.Units = "dimesionless"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd1.PropertyName = "ListTTShootTTWindowForPTQ"; pd1.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.ListTTShootTTWindowForPTQ)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.ListTTShootTTWindowForPTQ); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd2.PropertyName = "ListPARTTWindowForPTQ"; pd2.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.ListPARTTWindowForPTQ)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.ListPARTTWindowForPTQ); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd3.PropertyName = "ListGAITTWindowForPTQ"; pd3.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.ListGAITTWindowForPTQ)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.ListGAITTWindowForPTQ); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd4.PropertyName = "PAR"; pd4.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.PAR)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.PAR); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd5.PropertyName = "DeltaTT"; pd5.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.DeltaTT)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.DeltaTT); _inputs0_0.Add(pd5); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd6.PropertyName = "ListPARTTWindowForPTQ"; pd6.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.ListPARTTWindowForPTQ)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.ListPARTTWindowForPTQ); _outputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd7.PropertyName = "ListTTShootTTWindowForPTQ"; pd7.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.ListTTShootTTWindowForPTQ)).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.ListTTShootTTWindowForPTQ); _outputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityPhenology.PhenologyState); pd8.PropertyName = "PTQ"; pd8.PropertyType = ((SiriusQualityPhenology.PhenologyStateVarInfo.PTQ)).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualityPhenology.PhenologyStateVarInfo.PTQ); _outputs0_0.Add(pd8); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public CalculateConductance() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.42; v1.Description = "von Karman constant"; v1.Id = 0; v1.MaxValue = 1; v1.MinValue = 0; v1.Name = "vonKarman"; v1.Size = 1; v1.Units = "?"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 2; v2.Description = "reference height of wind and humidity measurements"; v2.Id = 0; v2.MaxValue = 10; v2.MinValue = 0; v2.Name = "heightWeatherMeasurements"; v2.Size = 1; v2.Units = "m"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0.13; v3.Description = "roughness length governing momentum transfer, FAO"; v3.Id = 0; v3.MaxValue = 1; v3.MinValue = 0; v3.Name = "zm"; v3.Size = 1; v3.Units = "?"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 0.013; v4.Description = "roughness length governing transfer of heat and vapour, FAO"; v4.Id = 0; v4.MaxValue = 1; v4.MinValue = 0; v4.Name = "zh"; v4.Size = 1; v4.Units = "?"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 0.67; v5.Description = "corresponding to 2/3. This is multiplied to the crop heigth for calculating the zero plane displacement height, FAO"; v5.Id = 0; v5.MaxValue = 1; v5.MinValue = 0; v5.Name = "d"; v5.Size = 1; v5.Units = "?"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd1.PropertyName = "plantHeight"; pd1.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.plantHeight)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.plantHeight); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd2.PropertyName = "wind"; pd2.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.wind)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.wind); _inputs0_0.Add(pd2); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd3.PropertyName = "conductance"; pd3.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.conductance)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.conductance); _outputs0_0.Add(pd3); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public RegisterZadok() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 300.0; v1.Description = "Duration of the endosperm endoreduplication phase"; v1.Id = 0; v1.MaxValue = 10000; v1.MinValue = 0; v1.Name = "der"; v1.Size = 1; v1.Units = "°C d"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0.9; v2.Description = "used to calculate Terminal spikelet"; v2.Id = 0; v2.MaxValue = 10000; v2.MinValue = 0; v2.Name = "slopeTSFLN"; v2.Size = 1; v2.Units = ""; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0.9; v3.Description = "used to calculate Terminal spikelet"; v3.Id = 0; v3.MaxValue = 10000; v3.MinValue = 0; v3.Name = "intTSFLN"; v3.Size = 1; v3.Units = ""; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = -1D; v4.Description = " Date of Sowing"; v4.Id = 0; v4.MaxValue =; v4.MinValue =; v4.Name = "sowingDate"; v4.Size = 1; v4.Units = ""; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Date"); _parameters0_0.Add(v4); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd1.PropertyName = "cumulTT"; pd1.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTT); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd2.PropertyName = "phase"; pd2.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phase).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.phase); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd3.PropertyName = "leafNumber"; pd3.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.leafNumber); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd4.PropertyName = "calendarMoments"; pd4.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd5.PropertyName = "calendarDates"; pd5.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates); _inputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd6.PropertyName = "calendarCumuls"; pd6.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _inputs0_0.Add(pd6); PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd7.PropertyName = "cumulTTFromZC_65"; pd7.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTTFromZC_65).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.cumulTTFromZC_65); _inputs0_0.Add(pd7); PropertyDescription pd8 = new PropertyDescription(); pd8.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyAuxiliary); pd8.PropertyName = "currentdate"; pd8.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate).ValueType.TypeForCurrentValue; pd8.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyAuxiliaryVarInfo.currentdate); _inputs0_0.Add(pd8); PropertyDescription pd9 = new PropertyDescription(); pd9.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd9.PropertyName = "finalLeafNumber"; pd9.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.finalLeafNumber).ValueType.TypeForCurrentValue; pd9.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.finalLeafNumber); _inputs0_0.Add(pd9); PropertyDescription pd10 = new PropertyDescription(); pd10.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd10.PropertyName = "currentZadokStage"; pd10.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.currentZadokStage).ValueType.TypeForCurrentValue; pd10.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.currentZadokStage); _inputs0_0.Add(pd10); PropertyDescription pd11 = new PropertyDescription(); pd11.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd11.PropertyName = "hasZadokStageChanged"; pd11.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasZadokStageChanged).ValueType.TypeForCurrentValue; pd11.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasZadokStageChanged); _inputs0_0.Add(pd11); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd12 = new PropertyDescription(); pd12.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd12.PropertyName = "hasZadokStageChanged"; pd12.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasZadokStageChanged).ValueType.TypeForCurrentValue; pd12.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.hasZadokStageChanged); _outputs0_0.Add(pd12); mo0_0.Outputs = _outputs0_0; PropertyDescription pd13 = new PropertyDescription(); pd13.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd13.PropertyName = "currentZadokStage"; pd13.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.currentZadokStage).ValueType.TypeForCurrentValue; pd13.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.currentZadokStage); _outputs0_0.Add(pd13); mo0_0.Outputs = _outputs0_0; PropertyDescription pd14 = new PropertyDescription(); pd14.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd14.PropertyName = "calendarMoments"; pd14.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments).ValueType.TypeForCurrentValue; pd14.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarMoments); _outputs0_0.Add(pd14); mo0_0.Outputs = _outputs0_0; PropertyDescription pd15 = new PropertyDescription(); pd15.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd15.PropertyName = "calendarDates"; pd15.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates).ValueType.TypeForCurrentValue; pd15.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarDates); _outputs0_0.Add(pd15); mo0_0.Outputs = _outputs0_0; PropertyDescription pd16 = new PropertyDescription(); pd16.DomainClassType = typeof(SiriusQualityPhenology.DomainClass.PhenologyState); pd16.PropertyName = "calendarCumuls"; pd16.PropertyType = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls).ValueType.TypeForCurrentValue; pd16.PropertyVarInfo = (SiriusQualityPhenology.DomainClass.PhenologyStateVarInfo.calendarCumuls); _outputs0_0.Add(pd16); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public calcStartExpTT() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 50; v1.Description = "Phyllochron of tip appearence"; v1.Id = 0; v1.MaxValue = 1000; v1.MinValue = 0; v1.Name = "atip"; v1.Size = 1; v1.Units = "°C/leaf"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 1.412; v2.Description = "Fraction of slope for leaf initiation for upper group of maize leaf"; v2.Id = 0; v2.MaxValue = 10; v2.MinValue = 0; v2.Name = "k_bl"; v2.Size = 1; v2.Units = "dimensionless"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 6.617; v3.Description = "limite number for upper group of leaves"; v3.Id = 0; v3.MaxValue = 30; v3.MinValue = 0; v3.Name = "Nlim"; v3.Size = 1; v3.Units = "leaf"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); VarInfo v4 = new VarInfo(); v4.DefaultValue = 500; v4.Description = "Thermal time of the appearance of the first leaf "; v4.Id = 0; v4.MaxValue = 1000; v4.MinValue = 0; v4.Name = "btip"; v4.Size = 1; v4.Units = "°Cd"; v4.URL = ""; v4.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v4.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v4); VarInfo v5 = new VarInfo(); v5.DefaultValue = 190; v5.Description = "Thermal time from sowing to emergence"; v5.Id = 0; v5.MaxValue = 500; v5.MinValue = 0; v5.Name = "Dse"; v5.Size = 1; v5.Units = "°Cd"; v5.URL = ""; v5.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v5.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v5); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLeafState); pd1.PropertyName = "tipTT"; pd1.PropertyType = ((SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.tipTT)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.tipTT); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd2.PropertyName = "leafNumber"; pd2.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.leafNumber); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd3.PropertyName = "previousLeafNumber"; pd3.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.previousLeafNumber)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.previousLeafNumber); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLAIState); pd4.PropertyName = "newLeafHasAppeared"; pd4.PropertyType = ((SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLAIStateVarInfo.newLeafHasAppeared); _inputs0_0.Add(pd4); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityMaizeLAI.MaizeLeafState); pd5.PropertyName = "startExpTT"; pd5.PropertyType = ((SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.startExpTT)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityMaizeLAI.MaizeLeafStateVarInfo.startExpTT); _outputs0_0.Add(pd5); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public CalculateDiffusionExtinctionCoef() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 1; v1.Description = "1:Spherical leaf angle Distribution; 0 Ellipsoidal"; v1.Id = 0; v1.MaxValue = 1; v1.MinValue = 0; v1.Name = "useSphericalLeafDistrib"; v1.Size = 1; v1.Units = "-"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Integer"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 1; v2.Description = "Clumping Index"; v2.Id = 0; v2.MaxValue = 1; v2.MinValue = 0; v2.Name = "CI"; v2.Size = 1; v2.Units = "-"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd1.PropertyName = "layersGAI"; pd1.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.layersGAI)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.layersGAI); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd2.PropertyName = "ala"; pd2.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.ala)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.ala); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd3.PropertyName = "rhoLeaf"; pd3.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.rhoLeaf)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.rhoLeaf); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd4.PropertyName = "tauLeaf"; pd4.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.tauLeaf)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.tauLeaf); _inputs0_0.Add(pd4); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd5.PropertyName = "k_dif"; pd5.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.k_dif)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.k_dif); _outputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(INRA.SiriusQualityIrradiance.Interfaces.States); pd6.PropertyName = "k_difBlack"; pd6.PropertyType = ((INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.k_difBlack)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (INRA.SiriusQualityIrradiance.Interfaces.StatesVarInfo.k_difBlack); _outputs0_0.Add(pd6); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public static TabularRow Create(PropertyDescription desc) => new TabularRow(desc.Name, desc.JpName, desc.Unit);
public TempMax() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.0; v1.Description = "snow cover threshold for snow insulation "; v1.Id = 0; v1.MaxValue = 1000; v1.MinValue = 0.0; v1.Name = "prof"; v1.Size = 1; v1.Units = "cm"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 0.0; v2.Description = "minimum temperature when snow cover is higher than prof"; v2.Id = 0; v2.MaxValue = 5000.0; v2.MinValue = 0.0; v2.Name = "tminseuil"; v2.Size = 1; v2.Units = "degC"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0.0; v3.Description = "maximum temperature when snow cover is higher than prof"; v3.Id = 0; v3.MaxValue =; v3.MinValue =; v3.Name = "tmaxseuil"; v3.Size = 1; v3.Units = "degC"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd1.PropertyName = "Sdepth_cm"; pd1.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth_cm).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth_cm); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowAuxiliary); pd2.PropertyName = "tmax"; pd2.PropertyType = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.tmax).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowAuxiliaryVarInfo.tmax); _inputs0_0.Add(pd2); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd3.PropertyName = "tmaxrec"; pd3.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.tmaxrec).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.tmaxrec); _outputs0_0.Add(pd3); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public CalculateCanopyTemperature() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 2.454; v1.Description = "latent heat of vaporization of water"; v1.Id = 0; v1.MaxValue = 10; v1.MinValue = 0; v1.Name = "lambda"; v1.Size = 1; v1.Units = "?"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 1.225; v2.Description = "Density of air"; v2.Id = 0; v2.MaxValue = 10; v2.MinValue = 0; v2.Name = "rhoDensityAir"; v2.Size = 1; v2.Units = "?"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0.00101; v3.Description = "Specific heat capacity of dry air"; v3.Id = 0; v3.MaxValue = 1; v3.MinValue = 0; v3.Name = "specificHeatCapacityAir"; v3.Size = 1; v3.Units = "?"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.STATE; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd1.PropertyName = "minTair"; pd1.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.minTair)).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.minTair); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd2.PropertyName = "maxTair"; pd2.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.maxTair)).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.maxTair); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd3.PropertyName = "cropHeatFlux"; pd3.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.cropHeatFlux)).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.cropHeatFlux); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd4.PropertyName = "conductance"; pd4.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.conductance)).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.conductance); _inputs0_0.Add(pd4); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd5.PropertyName = "minCanopyTemperature"; pd5.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.minCanopyTemperature)).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.minCanopyTemperature); _outputs0_0.Add(pd5); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityEnergyBalance.EnergyBalanceState); pd6.PropertyName = "maxCanopyTemperature"; pd6.PropertyType = ((SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.maxCanopyTemperature)).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityEnergyBalance.EnergyBalanceStateVarInfo.maxCanopyTemperature); _outputs0_0.Add(pd6); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
public SnowDepth() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.0; v1.Description = "snow compaction parameter"; v1.Id = 0; v1.MaxValue =; v1.MinValue =; v1.Name = "E"; v1.Size = 1; v1.Units = "mm/mm/d"; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 100; v2.Description = "The density of the new snow fixed by the user"; v2.Id = 0; v2.MaxValue =; v2.MinValue =; v2.Name = "rho"; v2.Size = 1; v2.Units = "kg/m**3"; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd1.PropertyName = "Snowmelt"; pd1.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Snowmelt).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Snowmelt); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd2.PropertyName = "Sdepth"; pd2.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowRate); pd3.PropertyName = "Snowaccu"; pd3.PropertyType = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowRateVarInfo.Snowaccu); _inputs0_0.Add(pd3); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualitySnow.DomainClass.SnowState); pd4.PropertyName = "Sdepth"; pd4.PropertyType = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualitySnow.DomainClass.SnowStateVarInfo.Sdepth); _outputs0_0.Add(pd4); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
private void AcceptElement(object each) { MetaDescription meta = repo.DescriptionOf(each); visitor.BeginElement(meta.Fullname); visitor.Serial(GetSerialNumber(meta, each)); // XXX there can be more than one children property per element! PropertyDescription childrenProperty = ChildrenProperty(meta); if (childrenProperty == null || !childrenProperty.IsContainer) { foreach (PropertyDescription property in meta.AllAttributes().OrderBy(prop => prop.Name)) { if (property.IsDerived || property.IsContainer) { continue; } ICollection <object> values = property.ReadAll(each); if (property.Type == MetaDescription.BOOLEAN && (values.Count == 1) && !property.IsMultivalued) { var enumerator = values.GetEnumerator(); enumerator.MoveNext(); if (!(bool)enumerator.Current) { continue; } } if (property.Type.Fullname == "System.Int32" && (values.Count == 1)) { var enumerator = values.GetEnumerator(); enumerator.MoveNext(); if ((int)enumerator.Current == 0) { continue; } } if (values.Count > 0) { bool isPrimitive = property.Type.IsPrimitive(); visitor.BeginAttribute(property.Name); bool isRoot = property.Type.IsRoot(); bool isComposite = (property == childrenProperty); var enumerator = values.GetEnumerator(); while (enumerator.MoveNext()) { object value = enumerator.Current; if (value.GetType() == typeof(MetaDescription)) { MetaDescription m = (MetaDescription)value; if (m.IsPrimitive() || m.IsRoot()) { visitor.Reference(m.Name); continue; } } if (isPrimitive || (isRoot && (value.GetType() == typeof(String) || value.GetType() == typeof(bool) || Number.IsNumber(value)))) { visitor.Primitive(value); } else { if (isComposite) { this.AcceptElement(value); } else { int serial = GetSerialNumber(property, value); visitor.Reference(serial); } } } visitor.EndAttribute(property.Name); } } visitor.EndElement(meta.Fullname); } }
/// <inheritdoc/> public string Format(string value, PropertyDescription description) { var format = GetFormat(description); return(double.TryParse(value, out double d) ? String.Format(format, d) : value); }
/// <summary> /// 根据类型全名获得类型的结构 /// </summary> /// <param name="fullTypeName">类型全名</param> /// <returns>类型描述对象</returns> public TypeDescription GetTypeDescription(string fullTypeName) { Type type = Type.GetType(fullTypeName); TypeDescription t = null; if (type == null) { List <Assembly> list = AppDomain.CurrentDomain.GetAssemblies().ToList().FindAll(p => !p.FullName.StartsWith("System")); foreach (var a in list) { type = a.GetType(fullTypeName); if (type != null) { break; } } } if (type != null) { string dllfileName = type.Assembly.CodeBase; string xmlFileName = dllfileName.Remove(dllfileName.LastIndexOf("."), 4) + ".xml"; xmlFileName = xmlFileName.Replace("file:///", "").Replace("/", @"\"); List <XElement> elementList = null; if (File.Exists(xmlFileName)) { elementList = XElement.Load(xmlFileName).Descendants("member").ToList(); if (elementList != null) { elementList = elementList.FindAll(p => p.Attribute("name").Value.StartsWith("P:")); } } Type nullableType = Nullable.GetUnderlyingType(type); if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(List <>)) { type = type.GetGenericArguments()[0]; } else if (type.IsArray) { type = type.GetElementType(); } else if (nullableType != null) { type = nullableType; } t = new TypeDescription(); t.TypeInfo = new SOAFramework.Service.Core.Model.TypeInfo { FullTypeName = type.FullName, NameSpace = type.Namespace, TypeName = ServiceUtility.GetTypeName(type), IsClass = ServiceUtility.IsClassType(type), }; PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public); if (properties != null) { t.Properties = new List <PropertyDescription>(); foreach (PropertyInfo p in properties) { string remark = ""; if (elementList != null) { var propertyElement = elementList.Find(x => x.Attribute("name").Value.EndsWith("." + p.DeclaringType.Name + "." + p.Name)); if (propertyElement != null) { remark = propertyElement.Element("summary").Value.ToString(); } } PropertyDescription pd = new PropertyDescription { PropertyName = p.Name, PropertyTypeInfo = new SOAFramework.Service.Core.Model.TypeInfo { FullTypeName = p.PropertyType.FullName, NameSpace = p.PropertyType.Namespace, IsClass = ServiceUtility.IsClassType(p.PropertyType), TypeName = ServiceUtility.GetTypeName(p.PropertyType), }, Remark = remark, }; Type element = type.GetElementType(); if (element != null) { pd.PropertyTypeInfo.ElementFullTypeName = element.FullName; } t.Properties.Add(pd); } } } return(t); }
private void SetMtmRelationValues(ref EntityBase entity, DataRow row, RelationAttribute relAttr, PropertyDescription property) { DataView dv = new DataView(UnderlyngDataSet.Tables[relAttr.MamyToManyRelationTable]); string rowfilter = CreateFilterString(relAttr.MtmRelationTableParentColumn, entity.ID.ToString()); string rowfilter2 = string.Format(" and {0} = ", relAttr.MtmRelationTableChildColumn); List <object> ids = new List <object>(); foreach (EntityBase e in (IList)property.GetValue(entity)) { if (e.State == EntityState.New) { _ps.SaveInner(e); //DataRow r = dv.Table.NewRow(); ////r.ini //r[relAttr.MtmRelationTableParentColumn] = entity.ID; //r[relAttr.MtmRelationTableChildColumn] = e.ID; ////this is absolutely incorrect !!!!!!!!! //try //{ // r["id"] = Guid.NewGuid(); //} //catch //{ //} //dv.Table.Rows.Add(r); } if (e.State == EntityState.Deleted) { //dv.RowFilter = rowfilter + rowfilter2 + e.ID.ToString(); ////e.State = EntityState.Deleted; ////_ps.Save(e); //row.Delete(); ////row.AcceptChanges(); //continue; //the appropriate actions are performed later } if (e.State == EntityState.Changed) { _ps.SaveInner(e); } rowfilter2 = string.Format(" and {0}", CreateFilterString(relAttr.MtmRelationTableChildColumn, e.ID)); //.RowFilter = rowfilter + rowfilter2; if (dv.Table.Select(rowfilter + rowfilter2).Length == 0) { DataRow r = dv.Table.NewRow(); // TEMP !!!! if (r.Table.PrimaryKey[0].DataType == typeof(Guid)) { r[r.Table.PrimaryKey[0]] = Guid.NewGuid(); } // r[relAttr.MtmRelationTableParentColumn] = entity.ID; r[relAttr.MtmRelationTableChildColumn] = e.ID; dv.Table.Rows.Add(r); } ids.Add(e.ID); } DataView dMtm = _underlyngDataSet.Tables[relAttr.MamyToManyRelationTable].DefaultView; dMtm.RowFilter = ""; string filter = CreateFilterString(relAttr.MtmRelationTableParentColumn, entity.ID); foreach (DataRow dr in dMtm.Table.Select(filter)) { if (!ids.Contains(dr[relAttr.MtmRelationTableChildColumn])) { dr.Delete(); } } }
public ActionResult Edit(PropertyDescription propertydescription) { if (ModelState.IsValid) { db.Entry(propertydescription).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(propertydescription); }
public NetRadiation() { ModellingOptions mo0_0 = new ModellingOptions(); //Parameters List <VarInfo> _parameters0_0 = new List <VarInfo>(); VarInfo v1 = new VarInfo(); v1.DefaultValue = 0.23; v1.Description = "albedo Coefficient"; v1.Id = 0; v1.MaxValue = 1; v1.MinValue = 0; v1.Name = "albedoCoefficient"; v1.Size = 1; v1.Units = ""; v1.URL = ""; v1.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v1.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v1); VarInfo v2 = new VarInfo(); v2.DefaultValue = 4.903E-09; v2.Description = "stefan Boltzman constant"; v2.Id = 0; v2.MaxValue = 1; v2.MinValue = 0; v2.Name = "stefanBoltzman"; v2.Size = 1; v2.Units = ""; v2.URL = ""; v2.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v2.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v2); VarInfo v3 = new VarInfo(); v3.DefaultValue = 0; v3.Description = "elevation"; v3.Id = 0; v3.MaxValue = 10000; v3.MinValue = -500; v3.Name = "elevation"; v3.Size = 1; v3.Units = "m"; v3.URL = ""; v3.VarType = CRA.ModelLayer.Core.VarInfo.Type.PARAMETER; v3.ValueType = VarInfoValueTypes.GetInstanceForName("Double"); _parameters0_0.Add(v3); mo0_0.Parameters = _parameters0_0; //Inputs List <PropertyDescription> _inputs0_0 = new List <PropertyDescription>(); PropertyDescription pd1 = new PropertyDescription(); pd1.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd1.PropertyName = "minTair"; pd1.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.minTair).ValueType.TypeForCurrentValue; pd1.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.minTair); _inputs0_0.Add(pd1); PropertyDescription pd2 = new PropertyDescription(); pd2.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd2.PropertyName = "maxTair"; pd2.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.maxTair).ValueType.TypeForCurrentValue; pd2.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.maxTair); _inputs0_0.Add(pd2); PropertyDescription pd3 = new PropertyDescription(); pd3.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd3.PropertyName = "solarRadiation"; pd3.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.solarRadiation).ValueType.TypeForCurrentValue; pd3.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.solarRadiation); _inputs0_0.Add(pd3); PropertyDescription pd4 = new PropertyDescription(); pd4.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd4.PropertyName = "vaporPressure"; pd4.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.vaporPressure).ValueType.TypeForCurrentValue; pd4.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.vaporPressure); _inputs0_0.Add(pd4); PropertyDescription pd5 = new PropertyDescription(); pd5.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd5.PropertyName = "extraSolarRadiation"; pd5.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.extraSolarRadiation).ValueType.TypeForCurrentValue; pd5.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.extraSolarRadiation); _inputs0_0.Add(pd5); mo0_0.Inputs = _inputs0_0; //Outputs List <PropertyDescription> _outputs0_0 = new List <PropertyDescription>(); PropertyDescription pd6 = new PropertyDescription(); pd6.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd6.PropertyName = "netRadiation"; pd6.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.netRadiation).ValueType.TypeForCurrentValue; pd6.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.netRadiation); _outputs0_0.Add(pd6); mo0_0.Outputs = _outputs0_0; PropertyDescription pd7 = new PropertyDescription(); pd7.DomainClassType = typeof(SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliary); pd7.PropertyName = "netOutGoingLongWaveRadiation"; pd7.PropertyType = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.netOutGoingLongWaveRadiation).ValueType.TypeForCurrentValue; pd7.PropertyVarInfo = (SiriusQualityEnergyBalance.DomainClass.EnergyBalanceAuxiliaryVarInfo.netOutGoingLongWaveRadiation); _outputs0_0.Add(pd7); mo0_0.Outputs = _outputs0_0; //Associated strategies List <string> lAssStrat0_0 = new List <string>(); mo0_0.AssociatedStrategies = lAssStrat0_0; //Adding the modeling options to the modeling options manager _modellingOptionsManager = new ModellingOptionsManager(mo0_0); SetStaticParametersVarInfoDefinitions(); SetPublisherData(); }
protected bool Equals(PropertyDescription other) { return string.Equals(this.name, other.name) && this.nameHash == other.nameHash && this.offset == other.offset && this.size == other.size && this.propertyType.Equals(other.propertyType); }
public PropertyDescription CreateInstance() { instance = new PropertyDescription(access.GetName()); return(instance); }