Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs =================================================================== diff -u -r578 -r599 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs (.../DAMFailureMechanismeCalculator.cs) (revision 578) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs (.../DAMFailureMechanismeCalculator.cs) (revision 599) @@ -73,19 +73,19 @@ private int progressSofar; public DamFailureMechanismeCalculator(ProgramType programType, DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculationSpecification, - string mstabProgramPath, string slopeWProgramPath, string mapForSoilGeometries2D, ProbabilisticType probabilisticType) + string mstabProgramPath, string slopeWProgramPath, string mapForSoilGeometries2D) { this.programType = programType; this.damFailureMechanismeCalculationSpecification = damFailureMechanismeCalculationSpecification; this.mstabProgramPath = mstabProgramPath; this.slopeWProgramPath = slopeWProgramPath; - MapForSoilGeometries2D = mapForSoilGeometries2D; - ProbabilisticType = probabilisticType; + MapForSoilGeometries2D = mapForSoilGeometries2D; } public string CalculationBaseDirectory { get; set; } + public string MapForSoilGeometries2D { get; set; } - public ProbabilisticType ProbabilisticType { get; set; } + public NonWaterRetainingObject NonWaterRetainingObject { get; set; } public List ErrorMessages @@ -210,136 +210,8 @@ // } } + /// - /// Checks the and adapt betas water levels when needed. - /// - /// The betas. - /// The water levels. - /// The scenario. - /// The new surface line. - /// The piping calculator. - /// The soil profile probability. - /// -// private bool CheckAndAdaptBetasWaterLevelsWhenNeeded(double[] betas, double[] waterLevels, Scenario scenario, SurfaceLine2 newSurfaceLine, PipingCalculator pipingCalculator, SoilGeometryProbability soilProfileProbability) -// { -// int nrValidItems = 0; -// for (int i = 0; i < 3; i++) -// { -// // If beta >= 10, then in fact no uplift occured and probability of failure is in fact 0. Such a value would be invalid for the design point calculation. -// if (betas[i] < 10) -// { -// nrValidItems++; -// } -// } -// if ((nrValidItems == 0) || (nrValidItems == 3)) -// { -// return (nrValidItems == 3); -// } -// else -// { -// if (nrValidItems == 1) -// { -// // extra calculation(s) needed to determine a second valid beta (<10) to be able to perform a design point calculation. Search between toplevel -// // (beta[0]) and middle level a waterlevel at which a beta is valid and use that one (adapt the levels too of course). -// double? betaloc = null; -// bool lReady = false; -// double locLevel = (waterLevels[0] + waterLevels[1])*0.5; -// var waterLevelProbabilistic = new ProbabilisticStruct(0.0, 0.01, (int) DistributionType.LogNormal, false); -// waterLevelProbabilistic.Distribution = (int) DistributionType.LogNormal; -// waterLevelProbabilistic.StandardDeviation = 0.01; -// waterLevelProbabilistic.IsUsed = false; -// while (!lReady) -// { -// waterLevelProbabilistic.Mean = locLevel; -// betaloc = CalculatePipingReliabilityIndexForSurface(scenario, newSurfaceLine, pipingCalculator, soilProfileProbability, -// waterLevelProbabilistic); -// lReady = betaloc.Value < 10; -// if (lReady) -// { -// betas[1] = betaloc.Value; -// waterLevels[1] = locLevel; -// } -// else -// { -// locLevel = locLevel + (waterLevels[0] + locLevel)*0.5; -// lReady = Math.Abs(locLevel - waterLevels[0]) < 0.0001; -// } -// } -// -// // now set nrValidItems to 2 to get the required third valid beta by axtrapolation -// nrValidItems = 2; -// } -// if (nrValidItems == 2) -// { -// // use the 2 valid betas to extrapolate a valid third beta value. -// betas[2] = Routines2D.LinInpolY(waterLevels[0], betas[0], waterLevels[1], betas[1], waterLevels[2]); -// } -// return true; -// } -// } - -// private double? CalculatePipingFailureProbabilityAdvanced(PipingCalculator pipingCalculator, Scenario scenario, -// SoilGeometryProbability soilProfileProbability, SurfaceLine2 newSurfaceLine) -// { -// double[] waterLevels = scenario.DetermineProperWaterlevelsForProbabilisticAdvanced(); -// var betas = new double[3]; -// var waterLevelProbabilistic = new ProbabilisticStruct(0.0, 0.01, (int) DistributionType.LogNormal, false); -// for (int i = 0; i < 3; i++) -// { -// betas[i] = 1; -// waterLevelProbabilistic.Mean = waterLevels[i]; -// string calculationName = String.Format("Prob{0}_Loc({1})_Sce({2})_Pro({3})_wl({4})", -// PipingModelType.SellmeijerVnk.ToString(), scenario.Location.Name, scenario.LocationScenarioID, soilProfileProbability.SoilGeometryName, i); -// calculationName = Regex.Replace(calculationName, @"[\\\/:\*\?""'<>|.]", "_"); -// pipingCalculator.FilenameCalculation = pipingCalculator.PipingCalculationDirectory + calculationName; -// -// double? betaloc = CalculatePipingReliabilityIndexForSurface(scenario, newSurfaceLine, pipingCalculator, soilProfileProbability, waterLevelProbabilistic); -// if (betaloc != null) -// { -// betas[i] = betaloc.Value; -// } -// } - - // Note Bka: For now, set MHW to original max water level (= river level + WaterHeightDecimeringsHoogte) and set - // Decimate to the original WaterHeightDecimeringsHoogte. Han Best has to approve this! - // After consulting Best, the next decision is made. MHW should be the riverlevel. And if the maxwaterlevel is smaller than MHW,then a designpoint - // calculation is not longer required as the safety is determined by the maxwaterlevel. So just return the Beta[0] (= beta at maxwaterlevel) in - // that case. -// if (scenario.RiverLevel > scenario.MaxWaterLevel) -// { -// return Probabilistic.Probabilistic.NormalDistribution(-betas[0]); -// } -// else -// { -// if (CheckAndAdaptBetasWaterLevelsWhenNeeded(betas, waterLevels, scenario, newSurfaceLine, pipingCalculator, soilProfileProbability)) -// { -// var designPointWater = new DesignPointCalculation(); -// designPointWater.Betas = betas; -// designPointWater.Waterlevels = waterLevels; -// designPointWater.MHW = (double) (scenario.RiverLevel); -// designPointWater.Decimate = (double) scenario.WaterHeightDecimeringsHoogte; -// designPointWater.Exceed = DesignPointCalculation.ExceedingSet.twoThousend; -// designPointWater.IsMaxLevelUsed = false; -// designPointWater.MaxLevel = 0; -// if (designPointWater.CalculateTheWaterDesignpoint()) -// { -// return Probabilistic.Probabilistic.NormalDistribution(-designPointWater.Beta); -// } -// else -// { -// // result could not be determined. -// throw new DamFailureMechanismeCalculatorException("Water design point calculation failed"); -// } -// } -// else -// { -// // total situation is safe, so return 0. -// return 0; -// } -// } -// } - - /// /// /// /// @@ -396,47 +268,25 @@ // pipingProbabilisticParameters); // pipingCalculator.PipingCalculationDirectory = pipingCalculationDirectory; // double? safetyFactor = null; -// double? failureProbability = null; -// double? failureProbabilityAdvanced = null; // double? pipingExitPointX = null; // double? upliftFactor = null; // double? heaveFactor = null; // try // { -// switch (ProbabilisticType) +// +// safetyFactor = pipingCalculator.CalculatePipingFactor( +// scenario.Location, +// scenario.GetMostRecentSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName), +// soilProfileProbability.SoilProfile1D, +// scenario.RiverLevel); +// if (pipingCalculator.UpliftLocationAndResult != null) // { -// case ProbabilisticType.Deterministic: -// safetyFactor = pipingCalculator.CalculatePipingFactor( -// scenario.Location, -// scenario.GetMostRecentSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName), -// soilProfileProbability.SoilProfile1D, -// scenario.RiverLevel); -// if (pipingCalculator.UpliftLocationAndResult != null) -// { -// pipingExitPointX = pipingCalculator.UpliftLocationAndResult.X; -// upliftFactor = pipingCalculator.UpliftLocationAndResult.UpliftFactor; -// heaveFactor = pipingCalculator.HeaveFactor; -// } -// break; -// case ProbabilisticType.Probabilistic: -// waterLevelProbabilistic.Mean = scenario.RiverLevel; -// -// string calculationName = String.Format("Prob{0}_Loc({1})_Sce({2})_Pro({3})", -// pipingCalculationType.ToString(), scenario.Location.Name, scenario.LocationScenarioID, soilProfileProbability.SoilGeometryName); -// calculationName = Regex.Replace(calculationName, @"[\\\/:\*\?""'<>|.]", "_"); -// pipingCalculator.FilenameCalculation = pipingCalculator.PipingCalculationDirectory + calculationName; -// -// failureProbability = -// pipingCalculator.CalculatePipingFailureProbability( -// scenario.Location, -// scenario.GetMostRecentSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName), -// soilProfileProbability.SoilProfile1D, -// waterLevelProbabilistic); -// break; -// case ProbabilisticType.ProbabilisticFragility: -// failureProbabilityAdvanced = CalculatePipingFailureProbabilityAdvanced(pipingCalculator, scenario, soilProfileProbability, null); -// break; +// pipingExitPointX = pipingCalculator.UpliftLocationAndResult.X; +// upliftFactor = pipingCalculator.UpliftLocationAndResult.UpliftFactor; +// heaveFactor = pipingCalculator.HeaveFactor; // } +// break; +// // } // catch (Exception exception) // { @@ -445,17 +295,7 @@ // // if (pipingCalculationType == PipingModelType.SellmeijerVnk) // { -// scenario.SetSafetyFactorPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, safetyFactor); -// if (ProbabilisticType == ProbabilisticType.ProbabilisticFragility) -// { -// scenario.SetFailureProbabilityPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// failureProbabilityAdvanced); -// } -// else -// { -// scenario.SetFailureProbabilityPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// failureProbability); -// } +// scenario.SetSafetyFactorPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, safetyFactor); // } // pipingResults.CalculationName = pipingCalculator.FilenameCalculation; // pipingResults.CalculationSubDir = @"PipingCalculation\\"; @@ -989,200 +829,18 @@ // try // { // SurfaceLine2 newSurfaceLine = surfaceLine.FullDeepClone(); -// switch (ProbabilisticType) +// var newCandidate = DetermineNewSafeSurfaceLinePipingDeterministic(scenario, soilProfileProbability, pipingCalculator, newSurfaceLine, ref safetyFactor); +// if (!ReferenceEquals(newSurfaceLine, newCandidate)) // { -// case ProbabilisticType.Deterministic: -// { -// var newCandidate = DetermineNewSafeSurfaceLinePipingDeterministic(scenario, soilProfileProbability, pipingCalculator, newSurfaceLine, ref safetyFactor); -// if (!ReferenceEquals(newSurfaceLine, newCandidate)) -// { -// newSurfaceLine.Dispose(); -// newSurfaceLine = newCandidate; -// } -// -// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, newSurfaceLine); -// scenario.SetSafetyFactorPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, safetyFactor); -// PipingResults pipingResults = GetPipingResults(safetyFactor, pipingModelType, pipingCalculator); -// scenario.SetPipingResults(soilProfileProbability.SoilProfile1D, -// soilProfileProbability.StiFileName, pipingResults); -// break; -// } -// -// case ProbabilisticType.Probabilistic: -// case ProbabilisticType.ProbabilisticFragility: -// { -// //Todo Adapt the determination of the piping design to the way it should be (See Detrministic and functional design) -// double[] waterLevels = scenario.DetermineProperWaterlevelsForProbabilisticAdvanced(); -// double waterLevel = scenario.RiverLevel; -// -// // for test of deterministic as initialisation for probabilistic, use next line. -// // newSurfaceLine = GetNewSafeSurfaceLine(scenario, soilProfileProbability, pipingCalculator, newSurfaceLine, ref requiredSafetyFactor); -// -// bool upLiftOccured = false; -// if (ProbabilisticType == ProbabilisticType.ProbabilisticFragility) -// { -// waterLevel = waterLevels[1]; -// } -// // start by checking the uplift first (if so, a newShoulderHeight can be determined). If uplift is not an issue then -// // probability of failure = 0. If uplift is an issue, add a berm until uplift is no longer an issue. -// double? newShoulderHeight = pipingCalculator.CalculateDesignShoulderHeight(scenario.Location, newSurfaceLine, -// soilProfileProbability.SoilProfile1D, waterLevel); -// -// double currentShoulderHeight = 0; -// double currentShoulderWidth = 0; -// double newShoulderWidth = 0; -// double slopeFactor = 0; -// if (newShoulderHeight != null) -// { -// // Debug.Write(String.Format("New Shoulder Height {0:0.000}\n", newShoulderHeight)); -// -// // if a new shoulderheight could be found, uplift is an issue. The new found shoulderheight might however not be the correct one -// // as with this height we insert or adjust a berm. This new/adjusted berm has to be checked until uplift is no longer an issue. -// upLiftOccured = true; -// -// // Start by adding the new shoulder. Note that there might be an existing shoulder. -// var shoulderTopInside = newSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); -// var dikeToeAtPolder = newSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); -// if (newSurfaceLine.HasShoulderInside()) -// { -// // there was a shoulder which now has to be extended. -// currentShoulderWidth = shoulderTopInside.X - -// newSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).X; -// currentShoulderHeight = shoulderTopInside.Z - dikeToeAtPolder.Z; -// // shoulder must grow in length, it should be passed the uplift location -// newShoulderWidth = currentShoulderWidth + pipingCalculator.UpliftLocationAndResult.X - shoulderTopInside.X; -// // in height it should grow with the calculated amount. -// newShoulderHeight = newShoulderHeight.Value + currentShoulderHeight; -// } -// else -// { -// // there was no shoulder, so create one -// var dikeTopAtPolder = newSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder); -// slopeFactor = (dikeToeAtPolder.X - dikeTopAtPolder.X)/(dikeTopAtPolder.Z - dikeToeAtPolder.Z); -// newShoulderWidth = 0.5 + newShoulderHeight.Value*slopeFactor; -// } -// // Make sure new berm is not too small -// newShoulderHeight = Math.Max(newShoulderHeight.Value, CMinimumShoulderElevation); -// newShoulderWidth = Math.Max(newShoulderWidth, CMinimumShoulderWidth); -// currentShoulderWidth = newShoulderWidth; -// currentShoulderHeight = newShoulderHeight.Value; -// -// bool finished = false; -// double maxShoulderLevel = CalculateMaximumShoulderLevel(newSurfaceLine, 1.0); // no limit to height of shoulder -// while ((newShoulderHeight != null) && (!finished)) -// { -// var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(newSurfaceLine, scenario.Location); -// surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel; -// newSurfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(newShoulderWidth, newShoulderHeight.Value, true); -// newShoulderHeight = pipingCalculator.CalculateDesignShoulderHeight(scenario.Location, newSurfaceLine, -// soilProfileProbability.SoilProfile1D, waterLevel); -// finished = (pipingCalculator.UpliftLocationAndResult.X > shoulderTopInside.X); -// if (newShoulderHeight != null && (!finished)) -// { -// // make sure new height is at least cMinimumShoulderExtraElevation higher -// if (newShoulderHeight.Value < CMinimumShoulderExtraElevation) -// { -// newShoulderHeight = currentShoulderHeight + CMinimumShoulderExtraElevation; -// } -// else -// { -// newShoulderHeight = currentShoulderHeight + newShoulderHeight.Value; -// } -// // shoulder must grow in length, it should be passed the uplift location and at least the minimum grow value -// newShoulderWidth = currentShoulderWidth + CMinimumShoulderExtraWidth; -// currentShoulderWidth = currentShoulderWidth + pipingCalculator.UpliftLocationAndResult.X - -// shoulderTopInside.X; -// newShoulderWidth = Math.Max(currentShoulderWidth, newShoulderWidth); -// -// currentShoulderWidth = newShoulderWidth; -// currentShoulderHeight = newShoulderHeight.Value; -// } -// } -// } -// -// // if no shoulder needed (i.e. when no uplift occurs) then failure probability is always cDefaultMinReturnValue = 0.0 -// double? failureProbability = PipingCalculator.cDefaultMinReturnValue; -// if (upLiftOccured) -// { -// // Uplift occured, so calculate failureProbability -// if (ProbabilisticType == ProbabilisticType.Probabilistic) -// { -// var waterLevelProbabilistic = new ProbabilisticStruct(0.0, 0.01, (int) DistributionType.LogNormal, false); -// waterLevelProbabilistic.Mean = scenario.RiverLevel; -// failureProbability = pipingCalculator.CalculatePipingFailureProbability(scenario.Location, newSurfaceLine, -// soilProfileProbability.SoilProfile1D, waterLevelProbabilistic); -// } -// else -// { -// failureProbability = CalculatePipingFailureProbabilityAdvanced(pipingCalculator, scenario, soilProfileProbability, -// newSurfaceLine); -// } -// -// if (failureProbability != null) -// { -// int iterationIndex = 1; -// bool isRedesignRequired = (failureProbability.Value > scenario.ModelFactors.RequiredProbabilityOfFailurePiping); -// -// double maxShoulderLevel = CalculateMaximumShoulderLevel(newSurfaceLine, 1.0); // no limit to height of shoulder -// while (isRedesignRequired && newSurfaceLine != null) -// { -// // Debug.Write(String.Format("Iteration {0} failureProbability {1:0.0000000000}, currentShoulderWidth {2:0.000}, currentShoulderHeight {3:0.000}\n", iterationIndex, failureProbability, currentShoulderWidth, currentShoulderHeight)); -// iterationIndex++; -// currentShoulderWidth = currentShoulderWidth + 1; -// // Due to different calculation types, raise the shoulder too next to making it wider. -// currentShoulderHeight = currentShoulderHeight + CMinimumShoulderExtraElevation; -// var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(newSurfaceLine, scenario.Location); -// surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel; -// newSurfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(currentShoulderWidth, currentShoulderHeight, true); -// if (ProbabilisticType == ProbabilisticType.Probabilistic) -// { -// var waterLevelProbabilistic = new ProbabilisticStruct(0.0, 0.01, (int) DistributionType.LogNormal, false); -// waterLevelProbabilistic.Mean = scenario.RiverLevel; -// failureProbability = pipingCalculator.CalculatePipingFailureProbability( -// scenario.Location, newSurfaceLine, -// soilProfileProbability.SoilProfile1D, waterLevelProbabilistic); -// } -// else -// { -// failureProbability = CalculatePipingFailureProbabilityAdvanced(pipingCalculator, scenario, -// soilProfileProbability, newSurfaceLine); -// } -// -// if (failureProbability != null) -// { -// isRedesignRequired = (failureProbability.Value > scenario.ModelFactors.RequiredProbabilityOfFailurePiping); -// } -// else -// { -// isRedesignRequired = true; -// } -// if (iterationIndex >= PipingRedesingMaxIterations) -// { -// // #BKA: vraag voor Ray set the results in case of failure too to provide feedback. (of niet Tom???) Voorlopig even niet. Ray was net naar huis dus nog navragen. -// // scenario.SetFailureProbabilityPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// // failureProbability); -// // scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// // newSurfaceLine); -// throw new MaximumRedesignIterationsReachedException(); -// } -// } -// } -// } -// if (failureProbability != null) -// { -// scenario.SetFailureProbabilityPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// failureProbability); -// } -// else -// { -// scenario.SetFailureProbabilityPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, -// 999); -// } -// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, newSurfaceLine); -// break; -// } +// newSurfaceLine.Dispose(); +// newSurfaceLine = newCandidate; // } // +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, newSurfaceLine); +// scenario.SetSafetyFactorPiping(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, safetyFactor); +// PipingResults pipingResults = GetPipingResults(safetyFactor, pipingModelType, pipingCalculator); +// scenario.SetPipingResults(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, pipingResults); +// // scenario.SetResultMessage(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName, "Succes"); // } // catch (Exception exception) @@ -1449,8 +1107,6 @@ // Location location = scenario.Location; // double requiredSafetyFactor = scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope ?? // scenario.Location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value; -// double betaRequired = scenario.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope ?? -// scenario.Location.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope.Value; // const int maxRedesignIterations = 200; // int iterationIndex = 1; // string previousFilename; @@ -1468,7 +1124,6 @@ // // try // { -// double? beta; // bool isRedesignRequired; // double? exitPointXCoordinate; // scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine); @@ -1480,9 +1135,7 @@ // MStabResults? mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile1D, // soilProfileProbability.StiFileName); // double? safetyFactor = mStabResults.Value.zone1.safetyFactor; -// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile1D, -// soilProfileProbability.StiFileName); -// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor); // exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; // // if (!isRedesignRequired && surfaceLine != null) @@ -1551,9 +1204,7 @@ // mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile1D, // soilProfileProbability.StiFileName); // safetyFactor = mStabResults.Value.zone1.safetyFactor; -// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile1D, -// soilProfileProbability.StiFileName); -// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor); // exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; // } // } @@ -1624,8 +1275,6 @@ // Location location = scenario.Location; // double requiredSafetyFactor = scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope ?? // scenario.Location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value; -// double betaRequired = scenario.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope ?? -// scenario.Location.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope.Value; // const int maxRedesignIterations = 200; // int iterationIndex = 1; // string previousFilename; @@ -1643,7 +1292,6 @@ // // try // { -// double? beta; // bool isRedesignRequired; // double? exitPointXCoordinate; // scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine); @@ -1655,9 +1303,7 @@ // MStabResults? mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile1D, // soilProfileProbability.StiFileName); // double? safetyFactor = mStabResults.Value.zone1.safetyFactor; -// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile1D, -// soilProfileProbability.StiFileName); -// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor); // exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; // // if (!isRedesignRequired && surfaceLine != null) @@ -1718,9 +1364,7 @@ // soilProfileProbability.StiFileName); // safetyFactor = mStabResults.Value.zone1.safetyFactor; // exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; -// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile1D, -// soilProfileProbability.StiFileName); -// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor); // limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); // // coTangent += stepCoTangent; @@ -1761,8 +1405,7 @@ // iterationIndex, mstabDesignEmbankment); // mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName); // safetyFactor = mStabResults.Value.zone1.safetyFactor; -// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName); -// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor); // limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); // } // } @@ -1793,22 +1436,11 @@ /// Check if a stability redesign is required /// /// - /// - /// - /// + /// /// - private bool IsRedesignRequired(double? safetyFactor, double requiredSafetyFactor, double betaRequired, double? beta) + private bool IsRedesignRequired(double? safetyFactor, double requiredSafetyFactor) { - bool isRedesignRequired; - if (ProbabilisticType == ProbabilisticType.ProbabilisticFragility) - { - isRedesignRequired = beta > betaRequired; - } - else - { - isRedesignRequired = safetyFactor < requiredSafetyFactor; - } - return isRedesignRequired; + return safetyFactor < requiredSafetyFactor; } ///