⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bound.m

📁 数学优化工具箱
💻 M
字号:
function cube=bound(cube,opts);% perform the bounding operation for the bandb algorithm% assume that opts already contains most of the hardwork for sedumi% doneif cube.refined ==0;    cube = bandb_refine_bounds(cube,opts);    if cube.feasible ==0;      return;    end;    cube.refined=1;end;uopts=bandb_update(cube.H,opts);[x,y,info]=sedumi(uopts.A,uopts.b,uopts.c,uopts.K,uopts.pars);if info.numerr > 1;    % error to begin with    cube.feasible=0;    fprintf('Error encountered (numerical problems): %d\n',info.numerr);    uopts.ybounds    info    return;endif info.dinf == 0;    % program is feasible    cube.feasible = 1;    [cube.lb,cube.v,cube.obj,cube.lbr,cube.vr,cube.objr,cube.den]=bandb_eval(y,opts);    cube.point = y;        if (cube.lb > (cube.v+1e-6))        fprintf('envelope violated %f %f %f \n', cube.lb,cube.v,cube.obj );	fprintf('envelope violated %f %f %f \n\n', cube.lb-cube.v,cube.v-cube.obj );	cube.feasible = 0;    endend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -