📄 mpt_remove_equalities.m
字号:
function Matrices = mpt_remove_equalities(Matrices,remove);
m = size(Matrices.G,1);
nu = Matrices.nu;
nx = Matrices.nx;
Matrices.G(remove,:) = [];
Matrices.E(remove,:) = [];
Matrices.W(remove,:) = [];
% But add variable bounds (these where used to remove the rows)
Matrices.G = [Matrices.G;eye(nu);-eye(nu);zeros(2*nx,nu)];
Matrices.E = [Matrices.E;zeros(2*nu,nx);-eye(nx);eye(nx)];
Matrices.W = [Matrices.W;Matrices.ub(1:nu);-Matrices.lb(1:nu);Matrices.ub(nu+1:end);-Matrices.lb(nu+1:end)];
infbounds = find(isinf(Matrices.W) & (Matrices.W>0));
Matrices.G(infbounds,:) = [];
Matrices.E(infbounds,:) = [];
Matrices.W(infbounds,:) = [];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -