Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs =================================================================== diff -u -r56beff6e761d1d6f07fcd566791a03baad5c7358 -r1fea24f00be5ae78cf5ceba066bae1056c0e5a2e --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs (.../StabilityPointStructuresCalculationConfigurationReader.cs) (revision 56beff6e761d1d6f07fcd566791a03baad5c7358) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs (.../StabilityPointStructuresCalculationConfigurationReader.cs) (revision 1fea24f00be5ae78cf5ceba066bae1056c0e5a2e) @@ -97,47 +97,47 @@ { return new StabilityPointStructuresCalculationConfiguration(calculationElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute).Value) { - AllowedLevelIncreaseStorage = GetStandardDeviationStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.AllowedLevelIncreaseStorageStochastName), - AreaFlowApertures = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.AreaFlowAperturesStochastName), - BankWidth = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.BankWidthStochastName), - CriticalOvertoppingDischarge = GetVariationCoefficientStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.CriticalOvertoppingDischargeStochastName), - ConstructiveStrengthLinearLoadModel = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.ConstructiveStrengthLinearLoadModelStochastName), - ConstructiveStrengthQuadraticLoadModel = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.ConstructiveStrengthQuadraticLoadModelStochastName), - DrainCoefficient = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.DrainCoefficientStochastName), + AllowedLevelIncreaseStorage = calculationElement.GetStandardDeviationStochastParameters(ConfigurationSchemaIdentifiers.AllowedLevelIncreaseStorageStochastName), + AreaFlowApertures = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.AreaFlowAperturesStochastName), + BankWidth = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.BankWidthStochastName), + CriticalOvertoppingDischarge = calculationElement.GetVariationCoefficientStochastParameters(ConfigurationSchemaIdentifiers.CriticalOvertoppingDischargeStochastName), + ConstructiveStrengthLinearLoadModel = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.ConstructiveStrengthLinearLoadModelStochastName), + ConstructiveStrengthQuadraticLoadModel = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.ConstructiveStrengthQuadraticLoadModelStochastName), + DrainCoefficient = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.DrainCoefficientStochastName), EvaluationLevel = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.EvaluationLevelElement), FactorStormDurationOpenStructure = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.FactorStormDurationOpenStructureElement), - FailureCollisionEnergy = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.FailureCollisionEnergyStochastName), + FailureCollisionEnergy = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.FailureCollisionEnergyStochastName), FailureProbabilityRepairClosure = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.FailureProbabilityRepairClosureElement), FailureProbabilityStructureWithErosion = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.FailureProbabilityStructureWithErosionElement), - FlowVelocityStructureClosable = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.FlowVelocityStructureClosableStochastName), - FlowWidthAtBottomProtection = GetStandardDeviationStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.FlowWidthAtBottomProtectionStochastName), + FlowVelocityStructureClosable = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.FlowVelocityStructureClosableStochastName), + FlowWidthAtBottomProtection = calculationElement.GetStandardDeviationStochastParameters(ConfigurationSchemaIdentifiers.FlowWidthAtBottomProtectionStochastName), ForeshoreProfileName = calculationElement.GetStringValueFromDescendantElement(ConfigurationSchemaIdentifiers.ForeshoreProfileNameElement), HydraulicBoundaryLocationName = calculationElement.GetStringValueFromDescendantElement(ConfigurationSchemaIdentifiers.HydraulicBoundaryLocationElement), InflowModelType = (ConfigurationStabilityPointStructuresInflowModelType?) calculationElement.GetConvertedValueFromDescendantStringElement( StabilityPointStructuresConfigurationSchemaIdentifiers.InflowModelTypeElement), - InsideWaterLevel = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.InsideWaterLevelStochastName), - InsideWaterLevelFailureConstruction = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.InsideWaterLevelFailureConstructionStochastName), - LevelCrestStructure = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.LevelCrestStructureStochastName), + InsideWaterLevel = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.InsideWaterLevelStochastName), + InsideWaterLevelFailureConstruction = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.InsideWaterLevelFailureConstructionStochastName), + LevelCrestStructure = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.LevelCrestStructureStochastName), LevellingCount = calculationElement.GetIntegerValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.LevellingCountElement), LoadSchematizationType = (ConfigurationStabilityPointStructuresLoadSchematizationType?) calculationElement.GetConvertedValueFromDescendantStringElement( StabilityPointStructuresConfigurationSchemaIdentifiers.LoadSchematizationTypeElement), ProbabilityCollisionSecondaryStructure = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.ProbabilityCollisionSecondaryStructureElement), - ModelFactorSuperCriticalFlow = GetStandardDeviationStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.ModelFactorSuperCriticalFlowStochastName), - ShipMass = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.ShipMassStochastName), - ShipVelocity = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.ShipVelocityStochastName), - StabilityLinearLoadModel = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.StabilityLinearLoadModelStochastName), - StabilityQuadraticLoadModel = GetVariationCoefficientStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.StabilityQuadraticLoadModelStochastName), + ModelFactorSuperCriticalFlow = calculationElement.GetStandardDeviationStochastParameters(ConfigurationSchemaIdentifiers.ModelFactorSuperCriticalFlowStochastName), + ShipMass = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.ShipMassStochastName), + ShipVelocity = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.ShipVelocityStochastName), + StabilityLinearLoadModel = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.StabilityLinearLoadModelStochastName), + StabilityQuadraticLoadModel = calculationElement.GetVariationCoefficientStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.StabilityQuadraticLoadModelStochastName), StructureName = calculationElement.GetStringValueFromDescendantElement(ConfigurationSchemaIdentifiers.StructureElement), - StorageStructureArea = GetVariationCoefficientStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.StorageStructureAreaStochastName), - StormDuration = GetVariationCoefficientStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.StormDurationStochastName), + StorageStructureArea = calculationElement.GetVariationCoefficientStochastParameters(ConfigurationSchemaIdentifiers.StorageStructureAreaStochastName), + StormDuration = calculationElement.GetVariationCoefficientStochastParameters(ConfigurationSchemaIdentifiers.StormDurationStochastName), StructureNormalOrientation = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.Orientation), - ThresholdHeightOpenWeir = GetStandardDeviationStochastParameters(calculationElement, StabilityPointStructuresConfigurationSchemaIdentifiers.ThresholdHeightOpenWeirStochastName), + ThresholdHeightOpenWeir = calculationElement.GetStandardDeviationStochastParameters(StabilityPointStructuresConfigurationSchemaIdentifiers.ThresholdHeightOpenWeirStochastName), VerticalDistance = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.VerticalDistanceElement), VolumicWeightWater = calculationElement.GetDoubleValueFromDescendantElement(StabilityPointStructuresConfigurationSchemaIdentifiers.VolumicWeightWaterElement), WaveReduction = GetWaveReductionParameters(calculationElement), - WidthFlowApertures = GetStandardDeviationStochastParameters(calculationElement, ConfigurationSchemaIdentifiers.WidthFlowAperturesStochastName) + WidthFlowApertures = calculationElement.GetStandardDeviationStochastParameters(ConfigurationSchemaIdentifiers.WidthFlowAperturesStochastName) }; } @@ -156,33 +156,5 @@ } return null; } - - private static MeanVariationCoefficientStochastConfiguration GetVariationCoefficientStochastParameters(XElement calculationElement, string stochastName) - { - XElement element = calculationElement.GetStochastElement(stochastName); - if (element != null) - { - return new MeanVariationCoefficientStochastConfiguration - { - Mean = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.MeanElement), - VariationCoefficient = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.VariationCoefficientElement) - }; - } - return null; - } - - private static MeanStandardDeviationStochastConfiguration GetStandardDeviationStochastParameters(XElement calculationElement, string stochastName) - { - XElement element = calculationElement.GetStochastElement(stochastName); - if (element != null) - { - return new MeanStandardDeviationStochastConfiguration - { - Mean = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.MeanElement), - StandardDeviation = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.StandardDeviationElement) - }; - } - return null; - } } } \ No newline at end of file