// Copyright (C) Stichting Deltares 2017. All rights reserved. // // This file is part of Ringtoets. // // Ringtoets is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // All names, logos, and references to "Deltares" are registered trademarks of // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. using System; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Primitives; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.StabilityPointStructures.Data { /// /// This class holds the information of the result of the /// for a stability point structures assessment. /// public class StabilityPointStructuresFailureMechanismSectionResult : FailureMechanismSectionResult { private double tailorMadeAssessmentProbability; /// /// Initializes a new instance of . /// /// The to get the result from. /// Thrown when is null. public StabilityPointStructuresFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { SimpleAssessmentResult = SimpleAssessmentResultValidityOnlyType.None; DetailedAssessmentResult = DetailedAssessmentResultType.Probability; TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityCalculationResultType.None; tailorMadeAssessmentProbability = double.NaN; } /// /// Gets or sets the , which is chosen /// to be representative for the whole section. /// public StructuresCalculation Calculation { get; set; } /// /// Gets or sets the simple assessment result. /// public SimpleAssessmentResultValidityOnlyType SimpleAssessmentResult { get; set; } /// /// Gets or sets the detailed assessment result. /// public DetailedAssessmentResultType DetailedAssessmentResult { get; set; } /// /// Gets or sets the tailor made assessment result. /// public TailorMadeAssessmentProbabilityCalculationResultType TailorMadeAssessmentResult { get; set; } /// /// Gets or sets the value of the tailor made assessment of safety /// per failure mechanism section as a probability. /// /// Thrown when /// is not in range [0,1]. public double TailorMadeAssessmentProbability { get { return tailorMadeAssessmentProbability; } set { ProbabilityHelper.ValidateProbability(value, null, RingtoetsCommonDataResources.ArbitraryProbabilityFailureMechanismSectionResult_AssessmentProbability_Value_needs_to_be_in_Range_0_, true); tailorMadeAssessmentProbability = value; } } } }