diff options
author | Nao Pross <np@0hm.ch> | 2023-05-13 14:12:56 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2023-05-13 14:14:03 +0200 |
commit | 0310d02ca046cb25a97c317281bc67a7c138606e (patch) | |
tree | b5786004efbddf917de55369d2c1ca70add5e426 | |
parent | FIX: rewrite compute_minRPI.m and debugging (diff) | |
download | mpc_pe-npross-fix28.tar.gz mpc_pe-npross-fix28.zip |
FIX: compute_minRPI.mnpross-fix28
-rw-r--r-- | templates/compute_minRPI.m | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/templates/compute_minRPI.m b/templates/compute_minRPI.m index 158cbad..3d9673a 100644 --- a/templates/compute_minRPI.m +++ b/templates/compute_minRPI.m @@ -16,17 +16,14 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params) 'b', params.constraints.DisturbanceRHS); Fi = @(i) Ak^i * W; - fprintf("Stable error dynamics? %d\n", all(eig(Ak) < 1)) - fprintf("Decreasing DRS? %d\n", Fi(3).volume() > Fi(4).volume()); - % Start algorithm omega = Polyhedron.emptySet(params.model.nx); n_iter = 0; while n_iter < 200 - Fn_iter = Fi(n_iter); - omega_next = omega + Fn_iter; - fprintf("n_iter=%d: volume=%d, fulldim=%d, bounded=%d\n", ... - n_iter, Fn_iter.volume(), omega_next.isFullDim(), omega_next.isBounded()) + omega_next = omega + Fi(n_iter); + + fprintf("n_iter=%d: Omega volume=%d, Fi volume=%d, fulldim=%d, bounded=%d\n", ... + n_iter, omega_next.volume(), Fi(n_iter).volume(), omega_next.isFullDim(), omega_next.isBounded()) % why does this happen? if ~ omega_next.isFullDim() || ~ omega_next.isBounded() @@ -39,7 +36,7 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params) break; end n_iter = n_iter+1; - omega = omega_next; + omega = omega_next.copy(); end H_tube = omega.A; |