Use the calculated failure probability in the cost function (RBDO)

Hi everyone,
I use “Quantile Monte Carlo (QMC) with IP” to solve my RBDO problem.
I want to include the calculated probability of failure (Pf) at each optimization step in the cost function. In other words, the Pf value be a part of the cost function. How can this be done with UQLab commands?
I defined “myRBDO_QIP.Results.History.Constraints” as a separate variable, but that doesn’t work. Do you have a suggestion?

Here is my cost function:

function Y = uq_Ex02_RubBreakwat_cost(X)
% Definition of Val: Volume of Main Armor Layer

Val = 0.5*X(:,1).*(((X(:,1)+X(:,2)+X(:,3))./sin(X(:,9)))+...

% Definition of Vul: Volume of Underlayer

Vfl = 0.5*X(:,2).*(((X(:,2)+X(:,3))./sin(X(:,9)))+...
    ((X(:,3))./sin(X(:,9)))) + X(:,5).*X(:,6) + X(:,2).*...

% Definition of Vcl: Volume of Core Layer

Vcl = 0.5*X(:,3).*(2*X(:,7)+X(:,3).*cot(X(:,9))+X(:,3).*cot(X(:,8)))+...

Pf = myRBDO_QIP.Results.History.Constraints.Pf;
% Penalty Function for Controling Overtopping Failure
failurep1 = Pf(:,1);
if failurep1 > 0.001
    Penalty1 = 1000000 * (failurep1 - 0.001); 
    Penalty1 = 0;

% Penalty Function for Controling Failure due to Armor Instability
failurep2 = Pf(:,2); 
if failurep2 > 0.001
    Penalty2 = 1000000 * (failurep2 - 0.001);
    Penalty2 = 0;

% Penalty Function for Controling Toe Erosion Failure
failurep3 = Pf(:,3); 
if failurep3 > 0.001
    Penalty3 = 100000 * (failurep3 - 0.001);
    Penalty3 = 0;

% Calculation of Construction Cost
Y = 822*Val + 166*Vfl + 131*Vcl + Penalty1 + Penalty2 + Penalty3;


Thanks for your consideration

Hi @Soheil_Radfar,

Unfortunately the RBDO module was not designed to solve the case you’re presenting. You would have to make quite a few modifications in the module to get to use the Pf in the cost function.

If your computational model is not too expensive (i.e. you are not trying to use a surrogate model), I would suggest directly computing the failure probability within the cost function. You may have a look at the function uq_evalPfMC.m for an idea of how you could compute a failure probability corresponding to a given design solution using Monte Carlo simulation.
If you are using a gradient-based solver, remember to reinitialize the random number generator seed at each iteration.

Let me know if you need further clarifications or if you would really like to go down the road of modifying the RBDO module, then I may give you clues.


Thanks @moustapha

My computational model is not expensive and I am using Quantile Monte Carlo. I understood your proposed solution and tried to implement it, but I have not yet been able to compute the failure probability corresponding to each optimization step (given design solution).