From 0310d02ca046cb25a97c317281bc67a7c138606e Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 13 May 2023 14:12:56 +0200 Subject: FIX: compute_minRPI.m --- templates/compute_minRPI.m | 13 +++++-------- 1 file 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; -- cgit v1.2.1