/// <summary> /// Creates a new instance of <see cref="UpliftVanCalculatorResult"/>. /// </summary> /// <param name="slidingCurveResult">The sliding curve result.</param> /// <param name="calculationGridResult">The calculation grid result.</param> /// <param name="calculationMessages">The messages returned by the calculation.</param> /// <param name="properties">The container of the properties for the <see cref="UpliftVanCalculatorResult"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> internal UpliftVanCalculatorResult(UpliftVanSlidingCurveResult slidingCurveResult, UpliftVanCalculationGridResult calculationGridResult, IEnumerable <MacroStabilityInwardsKernelMessage> calculationMessages, ConstructionProperties properties) { if (slidingCurveResult == null) { throw new ArgumentNullException(nameof(slidingCurveResult)); } if (calculationGridResult == null) { throw new ArgumentNullException(nameof(calculationGridResult)); } if (calculationMessages == null) { throw new ArgumentNullException(nameof(calculationMessages)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } SlidingCurveResult = slidingCurveResult; CalculationGridResult = calculationGridResult; FactorOfStability = properties.FactorOfStability; ForbiddenZonesXEntryMin = properties.ForbiddenZonesXEntryMin; ForbiddenZonesXEntryMax = properties.ForbiddenZonesXEntryMax; CalculationMessages = calculationMessages; }
/// <summary> /// Creates a new instance of <see cref="MacroStabilityInwardsOutput"/>. /// </summary> /// <param name="slidingCurve">The sliding curve result.</param> /// <param name="slipPlane">The slip plane Uplift Van result.</param> /// <param name="properties">The container of the properties for the /// <see cref="MacroStabilityInwardsOutput"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter /// is <c>null</c>.</exception> public MacroStabilityInwardsOutput(MacroStabilityInwardsSlidingCurve slidingCurve, MacroStabilityInwardsSlipPlaneUpliftVan slipPlane, ConstructionProperties properties) { if (slidingCurve == null) { throw new ArgumentNullException(nameof(slidingCurve)); } if (slipPlane == null) { throw new ArgumentNullException(nameof(slipPlane)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } SlidingCurve = slidingCurve; SlipPlane = slipPlane; FactorOfStability = properties.FactorOfStability; ForbiddenZonesXEntryMin = properties.ForbiddenZonesXEntryMin; ForbiddenZonesXEntryMax = properties.ForbiddenZonesXEntryMax; }
/// <summary> /// Creates a new instance of <see cref="GrassCoverErosionInwardsFailureMechanismPropertiesBase"/>. /// </summary> /// <param name="data">The instance to show the properties of.</param> /// <param name="constructionProperties">The property values required to create an instance of /// <see cref="GrassCoverErosionInwardsFailureMechanismPropertiesBase"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> protected GrassCoverErosionInwardsFailureMechanismPropertiesBase(GrassCoverErosionInwardsFailureMechanism data, ConstructionProperties constructionProperties) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } Data = data; propertyIndexLookup = new Dictionary <string, int> { { nameof(Name), constructionProperties.NamePropertyIndex }, { nameof(Code), constructionProperties.CodePropertyIndex } }; }
/// <summary> /// Constructs a new <see cref="PipingCalculatorInput"/>, which contains values for the parameters used /// in the piping sub calculations. /// </summary> /// <param name="properties">The object containing the values for the properties /// of the new <see cref="PipingCalculatorInput"/>.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="properties"/> is <c>null</c>.</exception> public PipingCalculatorInput(ConstructionProperties properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } WaterVolumetricWeight = properties.WaterVolumetricWeight; SaturatedVolumicWeightOfCoverageLayer = properties.SaturatedVolumicWeightOfCoverageLayer; UpliftModelFactor = properties.UpliftModelFactor; AssessmentLevel = properties.AssessmentLevel; PiezometricHeadExit = properties.PiezometricHeadExit; DampingFactorExit = properties.DampingFactorExit; PhreaticLevelExit = properties.PhreaticLevelExit; CriticalHeaveGradient = properties.CriticalHeaveGradient; ThicknessCoverageLayer = properties.ThicknessCoverageLayer; EffectiveThicknessCoverageLayer = properties.EffectiveThicknessCoverageLayer; SellmeijerModelFactor = properties.SellmeijerModelFactor; SellmeijerReductionFactor = properties.SellmeijerReductionFactor; SeepageLength = properties.SeepageLength; SandParticlesVolumicWeight = properties.SandParticlesVolumicWeight; WhitesDragCoefficient = properties.WhitesDragCoefficient; Diameter70 = properties.Diameter70; DarcyPermeability = properties.DarcyPermeability; WaterKinematicViscosity = properties.WaterKinematicViscosity; Gravity = properties.Gravity; ThicknessAquiferLayer = properties.ThicknessAquiferLayer; MeanDiameter70 = properties.MeanDiameter70; BeddingAngle = properties.BeddingAngle; ExitPointXCoordinate = properties.ExitPointXCoordinate; SurfaceLine = properties.SurfaceLine; SoilProfile = properties.SoilProfile; }
/// <summary> /// Creates a new instance of <see cref="AssessmentSectionMergeData"/>. /// </summary> /// <param name="assessmentSection">The assessment section to merge.</param> /// <param name="properties">The container of the properties for the /// <see cref="AssessmentSectionMergeData"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public AssessmentSectionMergeData(AssessmentSection assessmentSection, ConstructionProperties properties) { if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } AssessmentSection = assessmentSection; MergePiping = properties.MergePiping; MergeGrassCoverErosionInwards = properties.MergeGrassCoverErosionInwards; MergeMacroStabilityInwards = properties.MergeMacroStabilityInwards; MergeMicrostability = properties.MergeMicrostability; MergeStabilityStoneCover = properties.MergeStabilityStoneCover; MergeWaveImpactAsphaltCover = properties.MergeWaveImpactAsphaltCover; MergeWaterPressureAsphaltCover = properties.MergeWaterPressureAsphaltCover; MergeGrassCoverErosionOutwards = properties.MergeGrassCoverErosionOutwards; MergeGrassCoverSlipOffOutwards = properties.MergeGrassCoverSlipOffOutwards; MergeGrassCoverSlipOffInwards = properties.MergeGrassCoverSlipOffInwards; MergeHeightStructures = properties.MergeHeightStructures; MergeClosingStructures = properties.MergeClosingStructures; MergePipingStructure = properties.MergePipingStructure; MergeStabilityPointStructures = properties.MergeStabilityPointStructures; MergeDuneErosion = properties.MergeDuneErosion; MergeSpecificFailureMechanisms = properties.MergeSpecificFailureMechanisms; }
/// <summary> /// Initializes a new instance of the <see cref="HeightStructure"/> class. /// </summary> /// <param name="constructionProperties">The construction properties.</param> /// <exception cref="ArgumentException">Thrown when <see cref="ConstructionProperties.Name"/> /// or <see cref="ConstructionProperties.Id"/> is <c>null</c>, empty or consists of whitespace.</exception> /// <exception cref="ArgumentNullException">Thrown when <see cref="ConstructionProperties.Location"/> is <c>null</c>.</exception> public HeightStructure(ConstructionProperties constructionProperties) : base(constructionProperties) { LevelCrestStructure = new NormalDistribution(2) { Mean = constructionProperties.LevelCrestStructure.Mean, StandardDeviation = constructionProperties.LevelCrestStructure.StandardDeviation }; FlowWidthAtBottomProtection = new LogNormalDistribution(2) { Mean = constructionProperties.FlowWidthAtBottomProtection.Mean, StandardDeviation = constructionProperties.FlowWidthAtBottomProtection.StandardDeviation }; CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.CriticalOvertoppingDischarge.Mean, CoefficientOfVariation = constructionProperties.CriticalOvertoppingDischarge.CoefficientOfVariation }; WidthFlowApertures = new NormalDistribution(2) { Mean = constructionProperties.WidthFlowApertures.Mean, StandardDeviation = constructionProperties.WidthFlowApertures.StandardDeviation }; FailureProbabilityStructureWithErosion = constructionProperties.FailureProbabilityStructureWithErosion; StorageStructureArea = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.StorageStructureArea.Mean, CoefficientOfVariation = constructionProperties.StorageStructureArea.CoefficientOfVariation }; AllowedLevelIncreaseStorage = new LogNormalDistribution(2) { Mean = constructionProperties.AllowedLevelIncreaseStorage.Mean, StandardDeviation = constructionProperties.AllowedLevelIncreaseStorage.StandardDeviation }; }
/// <summary> /// Creates a new instance of <see cref="NonAdoptableFailureMechanismSectionResult"/>. /// </summary> /// <param name="sectionResult">The <see cref="NonAdoptableFailureMechanismSectionResult"/> that is /// the source of this row.</param> /// <param name="failureMechanismSectionResultRowErrorProvider">The error provider to use for /// the failure mechanism section result row.</param> /// <param name="assessmentSection">The assessment section the section result belongs to.</param> /// <param name="constructionProperties">The property values required to create an instance of /// <see cref="NonAdoptableFailureMechanismSectionResultRow"/>.</param> /// <exception cref="ArgumentNullException">Throw when any parameter is <c>null</c>.</exception> public NonAdoptableFailureMechanismSectionResultRow(NonAdoptableFailureMechanismSectionResult sectionResult, IFailureMechanismSectionResultRowErrorProvider failureMechanismSectionResultRowErrorProvider, IAssessmentSection assessmentSection, ConstructionProperties constructionProperties) : base(sectionResult) { if (failureMechanismSectionResultRowErrorProvider == null) { throw new ArgumentNullException(nameof(failureMechanismSectionResultRowErrorProvider)); } if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } this.failureMechanismSectionResultRowErrorProvider = failureMechanismSectionResultRowErrorProvider; this.assessmentSection = assessmentSection; initialFailureMechanismResultTypeIndex = constructionProperties.InitialFailureMechanismResultTypeIndex; initialFailureMechanismResultSectionProbabilityIndex = constructionProperties.InitialFailureMechanismResultSectionProbabilityIndex; furtherAnalysisTypeIndex = constructionProperties.FurtherAnalysisTypeIndex; refinedSectionProbabilityIndex = constructionProperties.RefinedSectionProbabilityIndex; sectionProbabilityIndex = constructionProperties.SectionProbabilityIndex; assemblyGroupIndex = constructionProperties.AssemblyGroupIndex; CreateColumnStateDefinitions(); Update(); }
/// <summary> /// Creates a new instance of <see cref="SoilLayer"/>. /// </summary> /// <param name="outerRing">The outer ring of the soil layer.</param> /// <param name="nestedLayers">The nested layers of the soil layer.</param> /// <param name="properties">The object containing the values for /// the soil data properties of the new <see cref="SoilLayer"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any input parameter is <c>null</c>.</exception> public SoilLayer(IEnumerable <Point2D> outerRing, ConstructionProperties properties, IEnumerable <SoilLayer> nestedLayers) { if (outerRing == null) { throw new ArgumentNullException(nameof(outerRing)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (nestedLayers == null) { throw new ArgumentNullException(nameof(nestedLayers)); } OuterRing = outerRing; IsAquifer = properties.IsAquifer; UsePop = properties.UsePop; ShearStrengthModel = properties.ShearStrengthModel; MaterialName = properties.MaterialName; AbovePhreaticLevel = properties.AbovePhreaticLevel; BelowPhreaticLevel = properties.BelowPhreaticLevel; Cohesion = properties.Cohesion; FrictionAngle = properties.FrictionAngle; StrengthIncreaseExponent = properties.StrengthIncreaseExponent; ShearStrengthRatio = properties.ShearStrengthRatio; Pop = properties.Pop; Dilatancy = properties.Dilatancy; WaterPressureInterpolationModel = properties.WaterPressureInterpolationModel; NestedLayers = nestedLayers; }
/// <summary> /// Creates a new instance of <see cref="StabilityPointStructuresFailureMechanismPropertiesBase"/>. /// </summary> /// <param name="data">The instance to show the properties of.</param> /// <param name="constructionProperties">The property values required to create an instance of /// <see cref="StabilityPointStructuresFailureMechanismPropertiesBase"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> protected StabilityPointStructuresFailureMechanismPropertiesBase(StabilityPointStructuresFailureMechanism data, ConstructionProperties constructionProperties) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } Data = data; propertyIndexLookup = new Dictionary <string, int> { { nameof(Name), constructionProperties.NamePropertyIndex }, { nameof(Code), constructionProperties.CodePropertyIndex } }; }
/// <summary> /// Creates a new instance of the <see cref="ForeshoreProfile"/> class. /// </summary> /// <param name="worldCoordinate">The value for <see cref="WorldReferencePoint"/>.</param> /// <param name="geometry">The geometry of the foreshore.</param> /// <param name="breakWater">The break water definition (can be null).</param> /// <param name="properties">The property values required to create an instance of <see cref="ForeshoreProfile"/>.</param> /// <exception cref="ArgumentNullException">Thrown when either <paramref name="geometry"/>, /// <paramref name="worldCoordinate"/> or <paramref name="properties"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when: /// <list type="bullet"> /// <item>any element of <paramref name="geometry"/> is <c>null</c></item> /// <item><paramref name="properties.Id"/> is <c>null</c>, empty or whitespaces</item> /// </list> /// </exception> public ForeshoreProfile(Point2D worldCoordinate, IEnumerable <Point2D> geometry, BreakWater breakWater, ConstructionProperties properties) { if (worldCoordinate == null) { throw new ArgumentNullException(nameof(worldCoordinate)); } if (geometry == null) { throw new ArgumentNullException(nameof(geometry)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (string.IsNullOrWhiteSpace(properties.Id)) { throw new ArgumentException(@"Id is null, empty or consists of whitespace.", nameof(properties)); } SetGeometry(geometry); Orientation = new RoundedDouble(2, properties.Orientation); BreakWater = breakWater; Id = properties.Id; Name = string.IsNullOrWhiteSpace(properties.Name) ? properties.Id : properties.Name; WorldReferencePoint = worldCoordinate; X0 = properties.X0; }
/// <summary> /// Creates a new instance of <see cref="AdoptableWithProfileProbabilityFailureMechanismSectionResultRow"/>. /// </summary> /// <param name="sectionResult">The <see cref="AdoptableWithProfileProbabilityFailureMechanismSectionResult"/> that is /// the source of this row.</param> /// <param name="calculateProbabilityStrategy">The strategy used to calculate probabilities.</param> /// <param name="failureMechanismSectionResultRowErrorProvider">The error provider to use for /// the failure mechanism section result row.</param> /// <param name="performAssemblyFunc">Function to perform the assembly.</param> /// <param name="getApplyLengthEffectInSectionFunc">Function to get the apply length effect in section indicator.</param> /// <param name="constructionProperties">The property values required to create an instance of /// <see cref="AdoptableWithProfileProbabilityFailureMechanismSectionResultRow"/>.</param> /// <exception cref="ArgumentNullException">Throw when any parameter is <c>null</c>.</exception> public AdoptableWithProfileProbabilityFailureMechanismSectionResultRow(AdoptableWithProfileProbabilityFailureMechanismSectionResult sectionResult, IFailureMechanismSectionResultCalculateProbabilityStrategy calculateProbabilityStrategy, IFailureMechanismSectionResultRowWithCalculatedProbabilityErrorProvider failureMechanismSectionResultRowErrorProvider, Func <FailureMechanismSectionAssemblyResultWrapper> performAssemblyFunc, Func <bool> getApplyLengthEffectInSectionFunc, ConstructionProperties constructionProperties) : base(sectionResult) { if (calculateProbabilityStrategy == null) { throw new ArgumentNullException(nameof(calculateProbabilityStrategy)); } if (failureMechanismSectionResultRowErrorProvider == null) { throw new ArgumentNullException(nameof(failureMechanismSectionResultRowErrorProvider)); } if (performAssemblyFunc == null) { throw new ArgumentNullException(nameof(performAssemblyFunc)); } if (getApplyLengthEffectInSectionFunc == null) { throw new ArgumentNullException(nameof(getApplyLengthEffectInSectionFunc)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } this.calculateProbabilityStrategy = calculateProbabilityStrategy; this.failureMechanismSectionResultRowErrorProvider = failureMechanismSectionResultRowErrorProvider; this.performAssemblyFunc = performAssemblyFunc; this.getApplyLengthEffectInSectionFunc = getApplyLengthEffectInSectionFunc; initialFailureMechanismResultTypeIndex = constructionProperties.InitialFailureMechanismResultTypeIndex; initialFailureMechanismResultProfileProbabilityIndex = constructionProperties.InitialFailureMechanismResultProfileProbabilityIndex; initialFailureMechanismResultSectionProbabilityIndex = constructionProperties.InitialFailureMechanismResultSectionProbabilityIndex; furtherAnalysisTypeIndex = constructionProperties.FurtherAnalysisTypeIndex; probabilityRefinementTypeIndex = constructionProperties.ProbabilityRefinementTypeIndex; refinedProfileProbabilityIndex = constructionProperties.RefinedProfileProbabilityIndex; refinedSectionProbabilityIndex = constructionProperties.RefinedSectionProbabilityIndex; profileProbabilityIndex = constructionProperties.ProfileProbabilityIndex; sectionProbabilityIndex = constructionProperties.SectionProbabilityIndex; sectionNIndex = constructionProperties.SectionNIndex; assemblyGroupIndex = constructionProperties.AssemblyGroupIndex; CreateColumnStateDefinitions(); Update(); }
/// <summary> /// Initializes a new instance of the <see cref="ClosingStructure"/> class. /// </summary> /// <param name="constructionProperties">The construction properties.</param> /// <exception cref="ArgumentException">Thrown when <see cref="ConstructionProperties.Name"/> /// or <see cref="ConstructionProperties.Id"/> is <c>null</c>, empty or consists of whitespace.</exception> /// <exception cref="ArgumentNullException">Thrown when <see cref="ConstructionProperties.Location"/> is <c>null</c>.</exception> public ClosingStructure(ConstructionProperties constructionProperties) : base(constructionProperties) { StorageStructureArea = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.StorageStructureArea.Mean, CoefficientOfVariation = constructionProperties.StorageStructureArea.CoefficientOfVariation }; AllowedLevelIncreaseStorage = new LogNormalDistribution(2) { Mean = constructionProperties.AllowedLevelIncreaseStorage.Mean, StandardDeviation = constructionProperties.AllowedLevelIncreaseStorage.StandardDeviation }; WidthFlowApertures = new NormalDistribution(2) { Mean = constructionProperties.WidthFlowApertures.Mean, StandardDeviation = constructionProperties.WidthFlowApertures.StandardDeviation }; LevelCrestStructureNotClosing = new NormalDistribution(2) { Mean = constructionProperties.LevelCrestStructureNotClosing.Mean, StandardDeviation = constructionProperties.LevelCrestStructureNotClosing.StandardDeviation }; InsideWaterLevel = new NormalDistribution(2) { Mean = constructionProperties.InsideWaterLevel.Mean, StandardDeviation = constructionProperties.InsideWaterLevel.StandardDeviation }; ThresholdHeightOpenWeir = new NormalDistribution(2) { Mean = constructionProperties.ThresholdHeightOpenWeir.Mean, StandardDeviation = constructionProperties.ThresholdHeightOpenWeir.StandardDeviation }; AreaFlowApertures = new LogNormalDistribution(2) { Mean = constructionProperties.AreaFlowApertures.Mean, StandardDeviation = constructionProperties.AreaFlowApertures.StandardDeviation }; CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { Mean = constructionProperties.CriticalOvertoppingDischarge.Mean, CoefficientOfVariation = constructionProperties.CriticalOvertoppingDischarge.CoefficientOfVariation }; FlowWidthAtBottomProtection = new LogNormalDistribution(2) { Mean = constructionProperties.FlowWidthAtBottomProtection.Mean, StandardDeviation = constructionProperties.FlowWidthAtBottomProtection.StandardDeviation }; ProbabilityOpenStructureBeforeFlooding = constructionProperties.ProbabilityOpenStructureBeforeFlooding; FailureProbabilityOpenStructure = constructionProperties.FailureProbabilityOpenStructure; IdenticalApertures = constructionProperties.IdenticalApertures; FailureProbabilityReparation = constructionProperties.FailureProbabilityReparation; InflowModelType = constructionProperties.InflowModelType; }
/// <summary> /// Creates a new instance of <see cref="SemiProbabilisticPipingOutput"/>. /// </summary> /// <param name="constructionProperties">The container of the properties for the /// <see cref="SemiProbabilisticPipingOutput"/>.</param> /// <exception cref="ArgumentNullException">Thrown when the <paramref name="constructionProperties"/> /// is <c>null</c>.</exception> public SemiProbabilisticPipingOutput(ConstructionProperties constructionProperties) { if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } HeaveFactorOfSafety = constructionProperties.HeaveFactorOfSafety; UpliftFactorOfSafety = constructionProperties.UpliftFactorOfSafety; SellmeijerFactorOfSafety = constructionProperties.SellmeijerFactorOfSafety; UpliftEffectiveStress = new RoundedDouble(2, constructionProperties.UpliftEffectiveStress); HeaveGradient = new RoundedDouble(2, constructionProperties.HeaveGradient); SellmeijerCreepCoefficient = new RoundedDouble(1, constructionProperties.SellmeijerCreepCoefficient); SellmeijerCriticalFall = new RoundedDouble(2, constructionProperties.SellmeijerCriticalFall); SellmeijerReducedFall = new RoundedDouble(2, constructionProperties.SellmeijerReducedFall); }
/// <summary> /// Constructs a new <see cref="PipingCalculatorResult"/>. The result will hold all the values which were given. /// </summary> /// <param name="constructionProperties">The container of the properties for the /// <see cref="PipingCalculatorResult"/></param> /// <exception cref="ArgumentNullException">Thrown when the <paramref name="constructionProperties"/> /// is <c>null</c>.</exception> internal PipingCalculatorResult(ConstructionProperties constructionProperties) { if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } UpliftFactorOfSafety = constructionProperties.UpliftFactorOfSafety; HeaveFactorOfSafety = constructionProperties.HeaveFactorOfSafety; SellmeijerFactorOfSafety = constructionProperties.SellmeijerFactorOfSafety; UpliftEffectiveStress = constructionProperties.UpliftEffectiveStress; HeaveGradient = constructionProperties.HeaveGradient; SellmeijerCreepCoefficient = constructionProperties.SellmeijerCreepCoefficient; SellmeijerCriticalFall = constructionProperties.SellmeijerCriticalFall; SellmeijerReducedFall = constructionProperties.SellmeijerReducedFall; }
/// <summary> /// Creates a new instance of <see cref="WaternetCalculatorInput"/>. /// </summary> /// <param name="properties">The object containing the values for the properties /// of the new <see cref="WaternetCalculatorInput"/>.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="properties"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when one of the following properties is <c>null</c>: /// <list type="bullet"> /// <item><see cref="ConstructionProperties.SurfaceLine"/>;</item> /// <item><see cref="ConstructionProperties.SoilProfile"/>;</item> /// <item><see cref="ConstructionProperties.DrainageConstruction"/>;</item> /// <item><see cref="ConstructionProperties.PhreaticLineOffsets"/>.</item> /// </list> /// </exception> public WaternetCalculatorInput(ConstructionProperties properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (properties.SurfaceLine == null) { throw new ArgumentException("SurfaceLine must be set."); } if (properties.SoilProfile == null) { throw new ArgumentException("SoilProfile must be set."); } if (properties.DrainageConstruction == null) { throw new ArgumentException("DrainageConstruction must be set."); } if (properties.PhreaticLineOffsets == null) { throw new ArgumentException("PhreaticLineOffsets must be set."); } AssessmentLevel = properties.AssessmentLevel; SurfaceLine = properties.SurfaceLine; SoilProfile = properties.SoilProfile; DrainageConstruction = properties.DrainageConstruction; PhreaticLineOffsets = properties.PhreaticLineOffsets; WaterLevelRiverAverage = properties.WaterLevelRiverAverage; WaterLevelPolder = properties.WaterLevelPolder; MinimumLevelPhreaticLineAtDikeTopRiver = properties.MinimumLevelPhreaticLineAtDikeTopRiver; MinimumLevelPhreaticLineAtDikeTopPolder = properties.MinimumLevelPhreaticLineAtDikeTopPolder; LeakageLengthOutwardsPhreaticLine3 = properties.LeakageLengthOutwardsPhreaticLine3; LeakageLengthInwardsPhreaticLine3 = properties.LeakageLengthInwardsPhreaticLine3; LeakageLengthOutwardsPhreaticLine4 = properties.LeakageLengthOutwardsPhreaticLine4; LeakageLengthInwardsPhreaticLine4 = properties.LeakageLengthInwardsPhreaticLine4; PiezometricHeadPhreaticLine2Outwards = properties.PiezometricHeadPhreaticLine2Outwards; PiezometricHeadPhreaticLine2Inwards = properties.PiezometricHeadPhreaticLine2Inwards; PenetrationLength = properties.PenetrationLength; AdjustPhreaticLine3And4ForUplift = properties.AdjustPhreaticLine3And4ForUplift; DikeSoilScenario = properties.DikeSoilScenario; WaterVolumetricWeight = properties.WaterVolumetricWeight; }
/// <summary> /// Creates a new instance of <see cref="AdoptableFailureMechanismSectionResultRow"/>. /// </summary> /// <param name="sectionResult">The <see cref="AdoptableFailureMechanismSectionResult"/> that is /// the source of this row.</param> /// <param name="calculateInitialFailureMechanismResultProbabilityFunc">The <see cref="Func{TResult}"/> /// to calculate the initial mechanism result probability.</param> /// <param name="failureMechanismSectionResultRowErrorProvider">The error provider to use for /// the failure mechanism section result row.</param> /// <param name="performAssemblyFunc">Function to perform the assembly.</param> /// <param name="constructionProperties">The property values required to create an instance of /// <see cref="AdoptableFailureMechanismSectionResultRow"/>.</param> /// <exception cref="ArgumentNullException">Throw when any parameter is <c>null</c>.</exception> public AdoptableFailureMechanismSectionResultRow(AdoptableFailureMechanismSectionResult sectionResult, Func <double> calculateInitialFailureMechanismResultProbabilityFunc, IFailureMechanismSectionResultRowWithCalculatedProbabilityErrorProvider failureMechanismSectionResultRowErrorProvider, Func <FailureMechanismSectionAssemblyResultWrapper> performAssemblyFunc, ConstructionProperties constructionProperties) : base(sectionResult) { if (calculateInitialFailureMechanismResultProbabilityFunc == null) { throw new ArgumentNullException(nameof(calculateInitialFailureMechanismResultProbabilityFunc)); } if (failureMechanismSectionResultRowErrorProvider == null) { throw new ArgumentNullException(nameof(failureMechanismSectionResultRowErrorProvider)); } if (performAssemblyFunc == null) { throw new ArgumentNullException(nameof(performAssemblyFunc)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } this.calculateInitialFailureMechanismResultProbabilityFunc = calculateInitialFailureMechanismResultProbabilityFunc; this.failureMechanismSectionResultRowErrorProvider = failureMechanismSectionResultRowErrorProvider; this.performAssemblyFunc = performAssemblyFunc; initialFailureMechanismResultTypeIndex = constructionProperties.InitialFailureMechanismResultTypeIndex; initialFailureMechanismResultSectionProbabilityIndex = constructionProperties.InitialFailureMechanismResultSectionProbabilityIndex; furtherAnalysisTypeIndex = constructionProperties.FurtherAnalysisTypeIndex; refinedSectionProbabilityIndex = constructionProperties.RefinedSectionProbabilityIndex; sectionProbabilityIndex = constructionProperties.SectionProbabilityIndex; assemblyGroupIndex = constructionProperties.AssemblyGroupIndex; CreateColumnStateDefinitions(); Update(); }
/// <summary> /// Creates a new instance of the <see cref="DikeProfile"/> class. /// </summary> /// <param name="worldCoordinate">The value for <see cref="WorldReferencePoint"/>.</param> /// <param name="dikeGeometry">The geometry of the dike.</param> /// <param name="foreshoreGeometry">The geometry of the dike foreshore.</param> /// <param name="breakWater">The break water definition (can be null).</param> /// <param name="properties">The property values required to create an instance of <see cref="DikeProfile"/>.</param> /// <exception cref="ArgumentNullException">Thrown when either <paramref name="dikeGeometry"/>, /// <paramref name="foreshoreGeometry"/>, <paramref name="worldCoordinate"/> or /// <paramref name="properties"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when: /// <list type="bullet"> /// <item>any element of <paramref name="dikeGeometry"/> /// or <paramref name="foreshoreGeometry"/> is <c>null</c>.</item> /// <item><paramref name="properties.Id"/> is <c>null</c>, is empty /// or whitespaces.</item> /// </list> </exception> public DikeProfile(Point2D worldCoordinate, IEnumerable <RoughnessPoint> dikeGeometry, IEnumerable <Point2D> foreshoreGeometry, BreakWater breakWater, ConstructionProperties properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } ForeshoreProfile = new ForeshoreProfile(worldCoordinate, foreshoreGeometry, breakWater, new ForeshoreProfile.ConstructionProperties { Id = properties.Id, Name = properties.Name, Orientation = properties.Orientation, X0 = properties.X0 }); SetGeometry(dikeGeometry); DikeHeight = new RoundedDouble(2, properties.DikeHeight); }
/// <summary> /// Creates a new instance of <see cref="DuneLocation"/>. /// </summary> /// <param name="id">Id of the <see cref="DuneLocation"/>.</param> /// <param name="name">Name of the <see cref="DuneLocation"/>.</param> /// <param name="location">The coordinate of the <see cref="DuneLocation"/>.</param> /// <param name="properties">The container of the properties for the /// <see cref="DuneLocation"/></param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="name"/> /// or <paramref name="properties"/> is <c>null</c>.</exception> public DuneLocation(long id, string name, Point2D location, ConstructionProperties properties) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } Id = id; Name = name; Location = location; CoastalAreaId = properties.CoastalAreaId; Offset = new RoundedDouble(1, properties.Offset); Orientation = new RoundedDouble(1, properties.Orientation); D50 = new RoundedDouble(6, properties.D50); }
/// <summary> /// Creates a new instance of <see cref="StructureBase"/>. /// </summary> /// <param name="constructionProperties">The parameters required to construct a new /// instance of <see cref="StructureBase"/>.</param> /// <exception cref="ArgumentException">Thrown when <see cref="ConstructionProperties.Name"/> /// or <see cref="ConstructionProperties.Id"/> is <c>null</c>, empty or consists of whitespace.</exception> /// <exception cref="ArgumentNullException">Thrown when <see cref="ConstructionProperties.Location"/> is <c>null</c>.</exception> protected StructureBase(ConstructionProperties constructionProperties) { if (string.IsNullOrWhiteSpace(constructionProperties.Name)) { throw new ArgumentException(@"Name is null, empty or consists of whitespace.", nameof(constructionProperties)); } if (string.IsNullOrWhiteSpace(constructionProperties.Id)) { throw new ArgumentException(@"Id is null, empty or consists of whitespace.", nameof(constructionProperties)); } if (constructionProperties.Location == null) { throw new ArgumentNullException(nameof(constructionProperties), @"Location is null."); } Name = constructionProperties.Name; Id = constructionProperties.Id; Location = constructionProperties.Location; StructureNormalOrientation = constructionProperties.StructureNormalOrientation; }
/// <summary> /// Creates a new instance of <see cref="CombinedFailureMechanismSectionAssemblyResult"/>. /// </summary> /// <param name="sectionStart">The start of the section from the beginning of the reference line /// in meters.</param> /// <param name="sectionEnd">The end of the section from the beginning of the reference line /// in meters.</param> /// <param name="totalResult">The total result of the section.</param> /// <param name="commonSectionAssemblyMethod">The <see cref="AssemblyMethod"/> /// that is used to get the common sections.</param> /// <param name="failureMechanismResultsAssemblyMethod">The <see cref="AssemblyMethod"/> /// that is used to assemble the failure mechanism results.</param> /// <param name="combinedSectionResultAssemblyMethod">The <see cref="AssemblyMethod"/> /// that is used to assemble the combined section results.</param> /// <param name="properties">The container of the properties for the /// <see cref="CombinedFailureMechanismSectionAssemblyResult"/>.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="properties"/> /// is <c>null</c>.</exception> public CombinedFailureMechanismSectionAssemblyResult(double sectionStart, double sectionEnd, FailureMechanismSectionAssemblyGroup totalResult, AssemblyMethod commonSectionAssemblyMethod, AssemblyMethod failureMechanismResultsAssemblyMethod, AssemblyMethod combinedSectionResultAssemblyMethod, ConstructionProperties properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } SectionStart = sectionStart; SectionEnd = sectionEnd; Piping = properties.Piping; GrassCoverErosionInwards = properties.GrassCoverErosionInwards; MacroStabilityInwards = properties.MacroStabilityInwards; Microstability = properties.Microstability; StabilityStoneCover = properties.StabilityStoneCover; WaveImpactAsphaltCover = properties.WaveImpactAsphaltCover; WaterPressureAsphaltCover = properties.WaterPressureAsphaltCover; GrassCoverErosionOutwards = properties.GrassCoverErosionOutwards; GrassCoverSlipOffOutwards = properties.GrassCoverSlipOffOutwards; GrassCoverSlipOffInwards = properties.GrassCoverSlipOffInwards; HeightStructures = properties.HeightStructures; ClosingStructures = properties.ClosingStructures; PipingStructure = properties.PipingStructure; StabilityPointStructures = properties.StabilityPointStructures; DuneErosion = properties.DuneErosion; SpecificFailureMechanisms = properties.SpecificFailureMechanisms; TotalResult = totalResult; CommonSectionAssemblyMethod = commonSectionAssemblyMethod; FailureMechanismResultsAssemblyMethod = failureMechanismResultsAssemblyMethod; CombinedSectionResultAssemblyMethod = combinedSectionResultAssemblyMethod; }
public TestHeightStructuresFailureMechanismProperties(HeightStructuresFailureMechanism data, ConstructionProperties constructionProperties) : base(data, constructionProperties) { }
/// <summary> /// Creates a new instance of the <see cref="StructuresInputBaseProperties{TStructure, TStructureInput, TCalculation, TFailureMechanism}"/> class. /// </summary> /// <param name="data">The instance to show the properties of.</param> /// <param name="constructionProperties">The property values required to create an instance of <see cref="StructuresInputBaseProperties{TStructure, TStructureInput, TCalculation, TFailureMechanism}"/>.</param> /// <param name="propertyChangeHandler">The handler responsible for handling effects of a property change.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> protected StructuresInputBaseProperties( InputContextBase <TStructureInput, TCalculation, TFailureMechanism> data, ConstructionProperties constructionProperties, IObservablePropertyChangeHandler propertyChangeHandler) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } if (propertyChangeHandler == null) { throw new ArgumentNullException(nameof(propertyChangeHandler)); } PropertyChangeHandler = propertyChangeHandler; Data = data; propertyIndexLookup = new Dictionary <string, int> { { nameof(Structure), constructionProperties.StructurePropertyIndex }, { nameof(StructureLocation), constructionProperties.StructureLocationPropertyIndex }, { nameof(StructureNormalOrientation), constructionProperties.StructureNormalOrientationPropertyIndex }, { nameof(FlowWidthAtBottomProtection), constructionProperties.FlowWidthAtBottomProtectionPropertyIndex }, { nameof(WidthFlowApertures), constructionProperties.WidthFlowAperturesPropertyIndex }, { nameof(StorageStructureArea), constructionProperties.StorageStructureAreaPropertyIndex }, { nameof(AllowedLevelIncreaseStorage), constructionProperties.AllowedLevelIncreaseStoragePropertyIndex }, { nameof(CriticalOvertoppingDischarge), constructionProperties.CriticalOvertoppingDischargePropertyIndex }, { nameof(FailureProbabilityStructureWithErosion), constructionProperties.FailureProbabilityStructureWithErosionPropertyIndex }, { nameof(ForeshoreProfile), constructionProperties.ForeshoreProfilePropertyIndex }, { nameof(UseBreakWater), constructionProperties.UseBreakWaterPropertyIndex }, { nameof(UseForeshore), constructionProperties.UseForeshorePropertyIndex }, { nameof(SelectedHydraulicBoundaryLocation), constructionProperties.HydraulicBoundaryLocationPropertyIndex }, { nameof(StormDuration), constructionProperties.StormDurationPropertyIndex } }; }
public TestMacroStabilityInwardsFailureMechanismProperties(MacroStabilityInwardsFailureMechanism data, ConstructionProperties constructionProperties) : base(data, constructionProperties) { }
/// <summary> /// Creates a new instance of <see cref="UpliftVanSliceResult"/>. /// </summary> /// <param name="topLeftPoint">The top left point of the slice.</param> /// <param name="topRightPoint">The top right point of the slice.</param> /// <param name="bottomLeftPoint">The bottom left point of the slice.</param> /// <param name="bottomRightPoint">The bottom right point of the slice.</param> /// <param name="properties">The object containing the values for the properties /// of the new <see cref="UpliftVanSliceResult"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> internal UpliftVanSliceResult(Point2D topLeftPoint, Point2D topRightPoint, Point2D bottomLeftPoint, Point2D bottomRightPoint, ConstructionProperties properties) { if (topLeftPoint == null) { throw new ArgumentNullException(nameof(topLeftPoint)); } if (topRightPoint == null) { throw new ArgumentNullException(nameof(topRightPoint)); } if (bottomLeftPoint == null) { throw new ArgumentNullException(nameof(bottomLeftPoint)); } if (bottomRightPoint == null) { throw new ArgumentNullException(nameof(bottomRightPoint)); } if (properties == null) { throw new ArgumentNullException(nameof(properties)); } TopLeftPoint = topLeftPoint; TopRightPoint = topRightPoint; BottomLeftPoint = bottomLeftPoint; BottomRightPoint = bottomRightPoint; Cohesion = properties.Cohesion; FrictionAngle = properties.FrictionAngle; CriticalPressure = properties.CriticalPressure; OverConsolidationRatio = properties.OverConsolidationRatio; Pop = properties.Pop; DegreeOfConsolidationPorePressureSoil = properties.DegreeOfConsolidationPorePressureSoil; DegreeOfConsolidationPorePressureLoad = properties.DegreeOfConsolidationPorePressureLoad; Dilatancy = properties.Dilatancy; ExternalLoad = properties.ExternalLoad; HydrostaticPorePressure = properties.HydrostaticPorePressure; LeftForce = properties.LeftForce; LeftForceAngle = properties.LeftForceAngle; LeftForceY = properties.LeftForceY; RightForce = properties.RightForce; RightForceAngle = properties.RightForceAngle; RightForceY = properties.RightForceY; LoadStress = properties.LoadStress; NormalStress = properties.NormalStress; PorePressure = properties.PorePressure; HorizontalPorePressure = properties.HorizontalPorePressure; VerticalPorePressure = properties.VerticalPorePressure; PiezometricPorePressure = properties.PiezometricPorePressure; EffectiveStress = properties.EffectiveStress; ExcessPorePressure = properties.ExcessPorePressure; ShearStress = properties.ShearStress; SoilStress = properties.SoilStress; TotalPorePressure = properties.TotalPorePressure; TotalStress = properties.TotalStress; Weight = properties.Weight; }
public OtherTestStructureBase(ConstructionProperties constructionProperties) : base(constructionProperties) { }
public TestGrassCoverErosionOutwardsFailureMechanismProperties(GrassCoverErosionOutwardsFailureMechanism data, ConstructionProperties constructionProperties) : base(data, constructionProperties) { }
/// <summary> /// Creates a new instance of <see cref="DuneLocationCalculationOutput"/>. /// </summary> /// <param name="calculationConvergence">The convergence status of the calculation.</param> /// <param name="constructionProperties">The container for the properties for the <see cref="DuneLocationCalculationOutput"/>.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="constructionProperties"/> is <c>null</c>.</exception> /// <exception cref="ArgumentOutOfRangeException">Thrown when <see cref="ConstructionProperties.TargetProbability"/> /// or <see cref="ConstructionProperties.CalculatedProbability"/> falls outside the [0.0, 1.0] range.</exception> public DuneLocationCalculationOutput(CalculationConvergence calculationConvergence, ConstructionProperties constructionProperties) { if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } WaterLevel = new RoundedDouble(2, constructionProperties.WaterLevel); WaveHeight = new RoundedDouble(2, constructionProperties.WaveHeight); WavePeriod = new RoundedDouble(2, constructionProperties.WavePeriod); ProbabilityHelper.ValidateProbability(constructionProperties.TargetProbability, nameof(TargetProbability), true); ProbabilityHelper.ValidateProbability(constructionProperties.CalculatedProbability, nameof(CalculatedProbability), true); TargetProbability = constructionProperties.TargetProbability; TargetReliability = new RoundedDouble(5, constructionProperties.TargetReliability); CalculatedProbability = constructionProperties.CalculatedProbability; CalculatedReliability = new RoundedDouble(5, constructionProperties.CalculatedReliability); CalculationConvergence = calculationConvergence; }
public SimpleStructuresInputProperties(SimpleInputContext context, ConstructionProperties constructionProperties, IObservablePropertyChangeHandler handler) : base(context, constructionProperties, handler) { }
public TestWaveImpactAsphaltCoverFailureMechanismProperties(WaveImpactAsphaltCoverFailureMechanism data, ConstructionProperties constructionProperties) : base(data, constructionProperties) { }
public TestDuneErosionFailureMechanismPropertiesBase(DuneErosionFailureMechanism data, ConstructionProperties constructionProperties) : base(data, constructionProperties) { }