RBDO error based on data-driven surrogate

PCE_RBDO.m (3.4 KB)
RBDO.m (2.0 KB)

Hi, I build a PCE and conduct RBDO based on PCE. I use PCE for the probabilistic constraint. Above PCE_RBDO.m is the built PCE. RBDO.m is code for RBDO. Below is the error.

Could you please give some advice? Is there any example for data-driven surrogate (without explicit expression) for RBDO?

error when running RBDO:

Try to use SCRIPT PCE_RBDO as a function

error: uq_eval_uq_default_model (line 62)
[varargout{1:num_of_out_args}] = model_handle(X);

error: uq_evalModel (line 121)
[varargout{1:nargout}] = current_model.eval(current_model,varargin{:});

error: uq_evalPfMC (line 69)
M_X = uq_evalModel( Options.Constraints.Model,Cq ) ;

error: uq_runReliability (line 52)
LocalAnalysis.Results = uq_evalPfMC(d, current_analysis) ;

error: uq_twolevel_evalConstraints (line 6)
myLocalAnalysis = uq_runReliability (d, current_analysis ) ;

error: uq_cmaesnonlconwrapper (line 7)
hc = uq_twolevel_evalConstraints( d, current_analysis ) ;

error: uq_runRBDOptimizer>@(X)uq_cmaesnonlconwrapper(X,current_analysis) (line 140)
nonlcon = @(X)uq_cmaesnonlconwrapper( X, current_analysis ) ;

error: uq_runRBDOptimizer>@(x)nonlcon(x) (line 147)
[Xstar,Fstar,exitflag,output] =
uq_c1p1cmaes(@(x)fun(x),x0,sigma0,lb,ub,@(x)nonlcon(x),optim_options) ;

error: uq_c1p1cmaes>@(x)nonlcon(x’) (line 202)
nonlconfcn = @(x) nonlcon(x’);

error: uq_c1p1cmaes (line 336)
g = nonlconfcn(x_current);

error: uq_runRBDOptimizer (line 147)
[Xstar,Fstar,exitflag,output] =
uq_c1p1cmaes(@(x)fun(x),x0,sigma0,lb,ub,@(x)nonlcon(x),optim_options) ;

error: uq_rbdo (line 52)
results = uq_runRBDOptimizer(current_analysis) ;

error: uq_analysis/run (line 84)
this.Results = eval([this.Type ‘(this)’]);

error: uq_runAnalysis (line 29)
[varargout{1:nargout}] = current_analysis.run(current_analysis, varargin{:});

error: uq_initialize_uq_rbdo (line 1675)
uq_runAnalysis(current_analysis);

error: uq_core_module/run_initialization_script (line 208)
initHandle(obj);

error: uq_core_analysis/add_module (line 96)
success = this.run_initialization_script(obj);

error: uq_createAnalysis (line 83)
eval(str);

error: RBDO (line 44)
myRBDO_MCC = uq_createAnalysis(MCCOpts);

Dear @AmosJoseph

I can’t run your code because the data is missing. However, after a quick look, I suspect you have the same problem as in this post, namely an invalid mFile: Errors in retrieving the m-file handle for a developed PCE metamodel - #7 by styfen.schaer

Best regards
Styfen

PCE-data.zip (27.0 KB)

Hi, above is the data. Please check. Could you help me find the error?

And there is another error:

% RBDOOpts.TargetPf = 0.05;
RBDOOpts.TargetBeta = 2;

Only failure probability or index can be used, but why?

Dear @AmosJoseph

Did you already test the solution I send you in my previous post and can you confirm that this is not the problem?

You can calculate RBDOOpts.TargetPf from RBDOOpts.TargetBeta and vice versa as it is also stated in the manual. Therefore, to prevent mistakes you must specify only one of them.

Best regards
Styfen

ModelOpts.mHandle = @(X) uq_evalModel(myPCE, X) - 4;

myModel = uq_createModel(ModelOpts);

RBDOOpts.LimitState.Model = myModel ;

I change the code like above, the problem seems to be solved.

I define the Design Variables and Environment Variables as below, but with error: “The input dimension is inconsistent with the data.” How should the input be defined to be different from that in PCE?

% Design variables
RBDOOpts.Input.DesVar(1).Name = ‘LR’;
RBDOOpts.Input.DesVar(1).Type = ‘Uniform’;
RBDOOpts.Input.DesVar(1).Moments = [3 20];

RBDOOpts.Input.DesVar(2).Name = ‘RT’;
RBDOOpts.Input.DesVar(2).Type = ‘Uniform’;
RBDOOpts.Input.DesVar(2).Moments = [20.1 30];

RBDOOpts.Input.DesVar(3).Name = ‘A1’;
RBDOOpts.Input.DesVar(3).Type = ‘Uniform’;
RBDOOpts.Input.DesVar(3).Moments = [0 90];

RBDOOpts.Input.DesVar(4).Name = ‘A2’;
RBDOOpts.Input.DesVar(4).Type = ‘Uniform’;
RBDOOpts.Input.DesVar(4).Moments = [0 90];

InputOpts.Marginals(1).Name = ‘E1’ ;
InputOpts.Marginals(1).Type = ‘Gaussian’;
InputOpts.Marginals(1).Moments = [102000, 10200];
% RBDOOpts.Input.EnvVar(5).Cov = 0.1;

Input = uq_createInput(InputOpts);

RBDOOpts.Input.EnvVar = Input;

PCE.m (1.0 KB)
RBDOnew.m (1.5 KB)

Dear @AmosJoseph

I suspect you are messing up your Matlab workspace. If you run the PCE.m script first and then RBDOnew.m without cleaning up the workspace, the creation of InputOpts in RBDOnew.m does not create a new struct but modifies the InputOpts from PCE.m instead. This struct defines already 5 marginals and you’re simply overwriting the first one, which then results in inconsistent dimensions.

So you would better save the myPCE variable from PCE.m, clear the workspace and then load it when running RBDOnew.m.

Best regards
Styfen

Hi, the problem has been solved! Many thanks for your help!

Accuracy of built PCE is not good. So I change to Kriging which is better for RBDO. Code is shown below:
kriging.m (907 Bytes)
RBDOkriging.m (1.7 KB)

However, running RBDO is slow without result.
Generally speaking, how long will the RBDO running take?

Then I try UQLab Examples ➜ RBDO ➜ Surrogate-assisted RBDO. Code is shown below, and also the Warning and error obtained very soon:
RBDOkrigingSurrogate.m (2.0 KB)

Warning: The limit state margin is too small or empty. The entire sample set is taken as candidate for
enrichment.

In uq_enrichED (line 130)
In uq_activeMetamodel (line 146)
In uq_initialize_uq_rbdo (line 1663)
In uq_core_module/run_initialization_script (line 208)
In uq_core_analysis/add_module (line 96)
In uq_createAnalysis (line 83)
In RBDOkrigingSurrogate (line 70)

No feasible solution found!

But how shall the built Kriging be used in Surrogate-assisted RBDO? Could you please provide some help?