mpt_detect_and_improve_bounds.m

来自「matlab波形优化算法经常要用到的matlab toolbox工具箱:yalm」· M 代码 · 共 18 行

M
18
字号
function [lb,ub,redundant] = detect_and_improve_bounds(Matrices,lb,ub,binary_var_index,options);

A = [ Matrices.G -Matrices.E];
b = [ Matrices.W ];

[global_lower,global_upper,bound_rows] = find_variable_bounds(A,b,[Matrices.Aeq Matrices.Beq],Matrices.beq);
global_lower(binary_var_index) = max(global_lower(binary_var_index),0);
global_upper(binary_var_index) = min(global_upper(binary_var_index),1);

if ~isempty(lb)
    global_lower = max([global_lower lb],[],2);
end
if ~isempty(ub)
    global_upper = min([global_upper ub],[],2);
end

[lb,ub,redundant,psstruct,infeasible] = tightenbounds(A,b,global_lower,global_upper,[],binary_var_index);

⌨️ 快捷键说明

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