input2 = ot.Description(2) input2[0] = 'x' input2[1] = 'y' formula2 = ot.Description(1) formula2[0] = 'y^2-x' model = ot.SymbolicFunction(input2, formula2) model.setName('sum') input3 = ot.RandomVector(ot.Normal(2)) input3.setName('input') output3 = ot.CompositeRandomVector(model, input3) output3.setName('output') event = ot.ThresholdEvent(output3, ot.Greater(), 1.0) event.setName('failureEvent') designPoint = ot.Point(2, 0.0) designPoint[0] = 1.0 formResult = ot.FORMResult(ot.Point(2, 1.0), event, False) formResult.setName('formResult') formResult.getImportanceFactors() formResult.getEventProbabilitySensitivity() myStudy.add('formResult', formResult) # Create a SORMResult sormResult = ot.SORMResult([1.0] * 2, event, False) sormResult.setName('sormResult') sormResult.getEventProbabilityBreitung() sormResult.getEventProbabilityHohenbichler() sormResult.getEventProbabilityTvedt() sormResult.getGeneralisedReliabilityIndexBreitung() sormResult.getGeneralisedReliabilityIndexHohenbichler() sormResult.getGeneralisedReliabilityIndexTvedt() myStudy.add('sormResult', sormResult)
input2[1] = "y" output2 = ot.Description(1) output2[0] = "d" formula2 = ot.Description(1) formula2[0] = "y^2-x" model = ot.NumericalMathFunction(input2, output2, formula2) model.setName("sum") input3 = ot.RandomVector(ot.Normal(2)) input3.setName("input") output3 = ot.RandomVector(model, input3) output3.setName("output") event = ot.Event(output3, ot.Greater(), 1.0) event.setName("failureEvent") designPoint = ot.NumericalPoint(2, 0.0) designPoint[0] = 1.0 formResult = ot.FORMResult(ot.NumericalPoint(2, 1.0), event, False) formResult.setName("formResult") formResult.getImportanceFactors() formResult.getEventProbabilitySensitivity() myStudy.add("formResult", formResult) # Create a SORMResult sormResult = ot.SORMResult([1.0] * 2, event, False) sormResult.setName("sormResult") sormResult.getEventProbabilityBreitung() sormResult.getEventProbabilityHohenBichler() sormResult.getEventProbabilityTvedt() sormResult.getGeneralisedReliabilityIndexBreitung() sormResult.getGeneralisedReliabilityIndexHohenBichler() sormResult.getGeneralisedReliabilityIndexTvedt() myStudy.add("sormResult", sormResult)