Examples / Reliability-based design optimization / dbl
This file is a complete demo of the capability of the dbl function from the CODES toolbox.
Contents
Documentation
The documentation for the dbl function can be found here.
Set rng
Set random number generator seed:
rng(0)
Simple example
Consider the following problem from Aoues and Chateauneuf:
obj=@(z,theta)sum(z.^2,2); g=@(X,z)0.2*z(:,1).*z(:,2).*X(:,2).^2-X(:,1); T=@(X)bsxfun(@rdivide,bsxfun(@minus,X,[5 3]),0.3*[5 3]); Tinv=@(U)bsxfun(@plus,bsxfun(@times,U,0.3*[5 3]),[5 3]); z_start=[2 2]; Pf_T=0.01;beta_T=-norminv(Pf_T);
Plot the limit state
load([fileparts(which('CODES.install')) '/+demo/Test_rbdo_dbl_ex1.mat']) obj_map=reshape(obj([D1(:) D2(:)]),size(D1)); figure('Position',[200 200 500 500]) Colors=get(gca,'ColorOrder'); contour(D1,D2,obj_map) hold on contour(D1,D2,beta_map,[beta_T beta_T],'Color',Colors(2,:)) caxis([min(obj_map(:)) max(obj_map(:))])
Error using load Unable to read MAT-file C:\Users\Christoph\Dropbox\Beta_Test\+CODES\+demo\Test_rbdo_dbl_ex1.mat. File might be corrupt. Error in Test_rbdo_dbl (line 33) load([fileparts(which('CODES.install')) '/+demo/Test_rbdo_dbl_ex1.mat'])
Solve the RBDO problem using RIA and PMA
res_ria=CODES.rbdo.dbl(obj,g,Pf_T,z_start,[],2,... 'Tinv',Tinv,'ra','RIA','z_lb',[0 0],'z_ub',[15 15]); res_pma=CODES.rbdo.dbl(obj,g,Pf_T,z_start,[],2,... 'Tinv',Tinv,'T',T,'ra','PMA','z_lb',[0 0],'z_ub',[15 15]); CODES.common.disp_matrix([res_ria.LS_count res_ria.optimum;... res_pma.LS_count res_pma.optimum],... {'RIA','PMA'},... {'# func. call','X*_1','X*_2'})
Plot the optimum
plot(res_pma.optimum(1),res_pma.optimum(2),'s','MarkerFaceColor',Colors(1,:),... 'MarkerEdgeColor',Colors(1,:));
References
- Aoues and Chateauneuf (2004): Aoues, Y., & Chateauneuf, A. (2010). Benchmark study of numerical methods for reliability-based design optimization. Structural and Multidisciplinary Optimization, 41(2), 277–294. DOI
Copyright © 2015 Computational Optimal Design of Engineering Systems (CODES) Laboratory. University of Arizona.
![]() |
Computational Optimal Design of Engineering Systems |
![]() |