Line | |
---|
1 | function Matrices = mpt_remove_equalities(Matrices,remove); |
---|
2 | m = size(Matrices.G,1); |
---|
3 | nu = Matrices.nu; |
---|
4 | nx = Matrices.nx; |
---|
5 | |
---|
6 | Matrices.G(remove,:) = []; |
---|
7 | Matrices.E(remove,:) = []; |
---|
8 | Matrices.W(remove,:) = []; |
---|
9 | |
---|
10 | % But add variable bounds (these where used to remove the rows) |
---|
11 | Matrices.G = [Matrices.G;eye(nu);-eye(nu);zeros(2*nx,nu)]; |
---|
12 | Matrices.E = [Matrices.E;zeros(2*nu,nx);-eye(nx);eye(nx)]; |
---|
13 | Matrices.W = [Matrices.W;Matrices.ub(1:nu);-Matrices.lb(1:nu);Matrices.ub(nu+1:end);-Matrices.lb(nu+1:end)]; |
---|
14 | infbounds = find(isinf(Matrices.W) & (Matrices.W>0)); |
---|
15 | Matrices.G(infbounds,:) = []; |
---|
16 | Matrices.E(infbounds,:) = []; |
---|
17 | Matrices.W(infbounds,:) = []; |
---|
Note: See
TracBrowser
for help on using the repository browser.