Index: Riskeer/Piping/src/Riskeer.Piping.Data/GeneralPipingInput.cs =================================================================== diff -u -r4b7e26c020c56044c2001a1b5425ab61af4b312a -r8a5a2af1c372dc43f80d28175359d3cb547b4b86 --- Riskeer/Piping/src/Riskeer.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 4b7e26c020c56044c2001a1b5425ab61af4b312a) +++ Riskeer/Piping/src/Riskeer.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 8a5a2af1c372dc43f80d28175359d3cb547b4b86) @@ -39,15 +39,15 @@ /// public GeneralPipingInput() { - UpliftModelFactor = new LogNormalDistribution + UpliftModelFactor = new LogNormalDistribution(2) { Mean = (RoundedDouble) 1.0, StandardDeviation = (RoundedDouble) 0.1 }; - sellmeijerModelFactor = new LogNormalDistribution + SellmeijerModelFactor = new LogNormalDistribution(2) { - Mean = (RoundedDouble)1.0, - StandardDeviation = (RoundedDouble)0.12 + Mean = (RoundedDouble) 1.0, + StandardDeviation = (RoundedDouble) 0.12 }; waterVolumetricWeight = new RoundedDouble(waterVolumicWeightNumberOfDecimalPlaces, 9.81); CriticalHeaveGradient = 0.3; @@ -73,9 +73,6 @@ private static readonly Range waterVolumetricWeightValidityRange = new Range(new RoundedDouble(waterVolumicWeightNumberOfDecimalPlaces), new RoundedDouble(waterVolumicWeightNumberOfDecimalPlaces, 20.0)); - private LogNormalDistribution upliftModelFactor; - private readonly LogNormalDistribution sellmeijerModelFactor; - /// /// Gets the volumetric weight of water. /// [kN/m³] @@ -107,36 +104,14 @@ #region Model factors /// - /// Gets or sets the calculation value used to account for uncertainty in the model for uplift. + /// Gets the calculation value used to account for uncertainty in the model for uplift. /// - public LogNormalDistribution UpliftModelFactor - { - get - { - return upliftModelFactor; - } - set - { - upliftModelFactor.Mean = value.Mean; - upliftModelFactor.StandardDeviation = value.StandardDeviation; - } - } + public LogNormalDistribution UpliftModelFactor { get; } /// - /// Gets or sets the calculation value used to account for uncertainty in the model for Sellmeijer. + /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer. /// - public LogNormalDistribution SellmeijerModelFactor - { - get - { - return sellmeijerModelFactor; - } - set - { - sellmeijerModelFactor.Mean = value.Mean; - sellmeijerModelFactor.StandardDeviation = value.StandardDeviation; - } - } + public LogNormalDistribution SellmeijerModelFactor { get; } #endregion Index: Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs =================================================================== diff -u -r4b7e26c020c56044c2001a1b5425ab61af4b312a -r8a5a2af1c372dc43f80d28175359d3cb547b4b86 --- Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 4b7e26c020c56044c2001a1b5425ab61af4b312a) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 8a5a2af1c372dc43f80d28175359d3cb547b4b86) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Gui.Attributes; @@ -406,6 +407,7 @@ [DynamicVisible] [PropertyOrder(upLiftModelFactorPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_UpliftModelFactor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_UpliftModelFactor_Description))] @@ -419,6 +421,7 @@ [DynamicVisible] [PropertyOrder(sellMeijerModelFactorPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerModelFactor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerModelFactor_Description))] Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r8a5a2af1c372dc43f80d28175359d3cb547b4b86 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 8a5a2af1c372dc43f80d28175359d3cb547b4b86) @@ -141,9 +141,11 @@ Assert.AreEqual(isRelevant, properties.IsRelevant); GeneralPipingInput generalInput = failureMechanism.GeneralInput; - Assert.AreEqual(generalInput.UpliftModelFactor, properties.UpliftModelFactor); + Assert.AreEqual(generalInput.UpliftModelFactor.Mean, properties.UpliftModelFactor.Mean); + Assert.AreEqual(generalInput.UpliftModelFactor.StandardDeviation, properties.UpliftModelFactor.StandardDeviation); - Assert.AreEqual(generalInput.SellmeijerModelFactor, properties.SellmeijerModelFactor); + Assert.AreEqual(generalInput.SellmeijerModelFactor.Mean, properties.SellmeijerModelFactor.Mean); + Assert.AreEqual(generalInput.SellmeijerModelFactor.StandardDeviation, properties.SellmeijerModelFactor.StandardDeviation); Assert.AreEqual(generalInput.WaterVolumetricWeight, properties.WaterVolumetricWeight); @@ -240,13 +242,15 @@ "Volumiek gewicht van water."); PropertyDescriptor upliftModelFactorProperty = dynamicProperties[upLiftModelFactorPropertyIndex]; + Assert.IsInstanceOf(upliftModelFactorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(upliftModelFactorProperty, modelFactorCategory, "Modelfactor opbarsten [-]", "Rekenwaarde om de onzekerheid in het model van opbarsten in rekening te brengen.", true); PropertyDescriptor sellmeijerModelFactorProperty = dynamicProperties[sellMeijerModelFactorPropertyIndex]; + Assert.IsInstanceOf(sellmeijerModelFactorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sellmeijerModelFactorProperty, modelFactorCategory, "Modelfactor piping toegepast op het model van Sellmeijer [-]",