├── Benchmark_Test.m ├── README.md ├── RHCADMM.m ├── Sparse_MPC_two_tank.m ├── Tank_System.m ├── Tracking_Sparse.m ├── Two_tank_MPC.m ├── ali.mat ├── buildmiqp.m ├── input.eps ├── input.fig ├── isPSD.m ├── linesearch.m ├── phase_diagram.eps ├── random_hypergraph.m ├── states.eps ├── states.fig └── xupdate.m /Benchmark_Test.m: -------------------------------------------------------------------------------- 1 | %% Benchmark Test for the distributed QP problem of the following form 2 | 3 | clc, clear, close all 4 | 5 | %% Structure of the hypergraph 6 | 7 | N = 6; % Number of Nodes 8 | 9 | m = 5; % Number of Fusion Centers 10 | 11 | % Case I: N = 6, m = 5 12 | eps{1} = [1 4]; 13 | 14 | eps{2} = [1 3]; 15 | 16 | eps{3} = [2 3]; 17 | 18 | eps{4} = [2 5]; 19 | 20 | eps{5} = [5 6]; 21 | 22 | 23 | %% Generate problem suitable Positive Definite Matrices Q_{i}s and vectors c_{i}s and constraint matrices A and B 24 | 25 | n = 500; % Dimension of x_{i} 26 | mm = 5; 27 | for i = 1 : N 28 | 29 | H = rand(n); 30 | 31 | H = 0.5*(H + H'); 32 | 33 | [V, ~] = eig(H); 34 | 35 | Q{i}= V*diag(1+rand(n,1))*V'; 36 | c{i} = 1*randn(n,1); 37 | M{i} = eye(mm,n); 38 | 39 | end 40 | b = 1* ones(mm,1); 41 | % Case one 42 | A = [-eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 43 | zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm); 44 | -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 45 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 46 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 47 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 48 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 49 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 50 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 51 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm)]; 52 | B = [ eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 53 | eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 54 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 55 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 56 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 57 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 58 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 59 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 60 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm); 61 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm)]; 62 | 63 | 64 | maxiter = 30; 65 | 66 | tol = 1e-3; 67 | 68 | options.MaxIter = maxiter; 69 | 70 | options.tolerance = tol; 71 | 72 | options.hypergraph = eps; 73 | 74 | options.Display = 'on'; 75 | 76 | %% The Relaxed Hybrid Consensus ADMM (RHCADMM) solver solves the problem 77 | 78 | load ali Q c 79 | alpha = 0.9; 80 | [x,~,~,~,lambda] = quadprog(blkdiag(Q{1},Q{2},Q{3},Q{4},Q{5},Q{6}),[c{1}',c{2}',c{3}',c{4}',c{5}',c{6}'],[M{1},M{2},M{3},M{4},M{5},M{6}],b,[],[],0.1 * ones(N*n,1)); 81 | 82 | 83 | tic 84 | [xopt ,Data,theta] = RHCADMM(Q,c,M,b,A,B,alpha,N,m,options); 85 | toc 86 | disp(['alpha = ' num2str(alpha) ' maxiter = ' num2str(Data.Maxiter)]) 87 | 88 | 89 | 90 | 91 | 92 | subplot(3,1,1) 93 | plot(1:Data.Maxiter, Data.PrimalResedual) 94 | hold on 95 | plot(1:Data.Maxiter, Data.DualResedual) 96 | hold on 97 | ylabel('Resedual') 98 | xlabel('iterations') 99 | legend('Primal Resedual', 'Dual Resedual') 100 | 101 | subplot(3,1,2) 102 | plot(1:Data.Maxiter, Data.Cost) 103 | hold on 104 | 105 | ylabel('Optiaml Value') 106 | xlabel('iterations') 107 | 108 | subplot(3,1,3) 109 | plot(1:Data.Maxiter,Data.steplength) 110 | hold on 111 | 112 | ylabel('\rho') 113 | xlabel('iterations') 114 | % end 115 | % theta 116 | % % fval1 117 | % % fval -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RHADMM-Algorithm 2 | This repository contains the codes and supplementary materials of "Relaxed hybrid consensus ADMM for distributed convex optimisation with coupling constraints" paper. 3 | -------------------------------------------------------------------------------- /RHCADMM.m: -------------------------------------------------------------------------------- 1 | function [xopt,fval, Data , theta ] = RHCADMM(Q,c,Aeq,beq,Aineq,bineq,M,b,A,B,alpha,N,m,state,options) 2 | 3 | nx = size(Q{1} , 1); % dimension of primal decision variable 4 | n = size(M{1} , 1); % dimension of the dual variable lambda(consensus problem)\\ 5 | 6 | 7 | 8 | T = size(A,1)/n; % number of constraints (block-wise) 9 | 10 | %% Simulation Parameters 11 | 12 | 13 | MaxIter = options.MaxIter; 14 | 15 | tol = options.tolerance; 16 | 17 | eps = options.hypergraph; 18 | 19 | if strcmpi(options.Display,'OFF') 20 | 21 | Quiet = 0; 22 | 23 | elseif strcmpi(options.Display,'ON') 24 | Quiet = 1; 25 | end 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | %% Fix Penalty parameter selection 34 | 35 | rho = 1; % without adaptive penalty 36 | 37 | 38 | 39 | 40 | %% Offline computational parts 41 | E = B' * B; 42 | %% OFF-line Part of Computations 43 | inv_E = E^-1; 44 | 45 | H = B * inv_E * B'; 46 | 47 | z = 1*ones(T * n , 1); 48 | % x = zeros(N * n , 1); 49 | y = 1*ones(n * m , 1); 50 | Ed = diag(B' * B); % Computing e_{j} 51 | 52 | Dd = diag(A' * A); % Computing d_{j} 53 | 54 | e = zeros(1,m); 55 | d = zeros(1,N); 56 | 57 | for j = 1: m 58 | e(j) = Ed((j-1) * n + 1); 59 | end 60 | 61 | for i = 1: N 62 | d(i) = Dd((i-1) * n + 1); 63 | end 64 | if Quiet 65 | % clc 66 | % disp(['iter = ' num2str(k) ' Pri_Res = ' num2str(r) ' Dual_Res = ' num2str(s) ' Objective = ' num2str(f)]) 67 | fprintf('%3s\t\t%4.6s\t\t%4.6s\t\t%4.6s\n','Iter','P_Res','D_RES',' Obj'); 68 | end 69 | 70 | %% ON-line Part of Computations (in Parallel) 71 | 72 | for k = 1: MaxIter 73 | 74 | Data.steplength(k) = rho; 75 | 76 | [x , z , theta, fval] = xupdate(Q,c,Aeq,beq,Aineq,bineq,M,b,rho,alpha,z,A,B,eps,n,N,d,m,H,inv_E,state ); % xupdate function computes the x-updates and z-updates parts 77 | yold = y; 78 | y = ((1/rho)*max(E^-1*B' * z,0)); % Computing y 79 | s = norm(rho * A' * B * (y - yold)); 80 | r = norm (A * x(:) + B * y); 81 | if alpha ~= 0.5 % Computing Resedual of the equality constraint 82 | rho = linesearch(rho,x,yold,z,A,B,inv_E); 83 | end 84 | f = 0; 85 | for i = 1:N 86 | f = f + 0.5 * theta(:,i)' * Q{i} * theta(:,i) + c{i} * theta(:,i); % Computing Optimal value 87 | end 88 | %% Saving Results 89 | 90 | Data.PrimalResedual(k) = r; 91 | Data.DualResedual(k) = s; 92 | Data.Maxiter = k; 93 | Data.Cost(k) = sum(fval); 94 | 95 | 96 | %% Display the results 97 | 98 | if Quiet 99 | % clc 100 | % disp(['iter = ' num2str(k) ' Pri_Res = ' num2str(r) ' Dual_Res = ' num2str(s) ' Objective = ' num2str(f)]) 101 | fprintf('%3d\t\t%4.6f\t\t%3.3f\t\t%3.3f\n', k, ... 102 | r,s, ... 103 | fval); 104 | end 105 | %% Stopping ceriterion 106 | if r <= tol && s <= tol 107 | Data.Maxiter = k; 108 | xopt = x(:,1); 109 | fval = f; 110 | Data.finalrho = rho; 111 | % disp('The optimization problem has been solved') 112 | break 113 | elseif k == MaxIter 114 | Data.Maxiter = k; 115 | xopt = x(1:n); 116 | fval = f; 117 | disp('The algorithm is terminated due to the number of iterations') 118 | break 119 | 120 | end 121 | end 122 | 123 | end 124 | 125 | -------------------------------------------------------------------------------- /Sparse_MPC_two_tank.m: -------------------------------------------------------------------------------- 1 | clc, clear, close all 2 | 3 | %% time structure 4 | 5 | t0 = 0; tf = 300; dt = 5; 6 | time = t0: dt: tf - dt; Nt = numel(time); 7 | 8 | %% System parameters 9 | Aa = 0.06; 10 | a1 = 6.7371e-4; 11 | a3 = 4.0423e-4; 12 | gama = 0.4; 13 | g = 9.81; 14 | h1_0 = 0.68; 15 | h3_0 = 0.65; 16 | q_0 = 2; 17 | 18 | tao_1 = (Aa / a1) * (sqrt(2*h1_0/g)); 19 | tao_3 = (Aa / a3) * (sqrt(2*h3_0/g)); 20 | 21 | %% System Structure 22 | N = 6; 23 | m = 5; 24 | 25 | for i = 1:N 26 | A{i} = [-1/tao_1 1/tao_3;0 -1/tao_3]; B{i} = [gama/Aa (1-gama)/Aa]'; 27 | 28 | [A{i}, B{i}] = c2d(A{i},B{i},dt); 29 | end 30 | 31 | nx = size(B{1},1); % number of state 32 | 33 | nu = size(B{1},2); % number of input 34 | %% MPC Parameters 35 | N1 = 5; % predection horizon 36 | 37 | for i = 1: N % cost of MPC 38 | 39 | Q{i} = 20 * [1 0; 0 1]; 40 | 41 | P{i} = Q{i}; 42 | 43 | R{i} = 0.5 * eye(nu); 44 | end 45 | %% Local Constraints 46 | 47 | ubx = [1.36 1.30]'; 48 | lbx = [-1.36 -1.30]'; 49 | Aineqx = [eye(nx);-eye(nx)]; 50 | bineqx = [ubx; -lbx]; 51 | ubu = 4; 52 | lbu = -4; 53 | Ainequ = [eye(nu);-eye(nu)]; 54 | binequ = [ubu; -lbu]; 55 | 56 | %% DMPC Matrices 57 | for i = 1: N 58 | [H,G,Ibar,Qbar,DD,dd] = buildmiqp(N1,Q{i},P{i},R{i},A{i},B{i},Aineqx,bineqx,Ainequ,binequ); 59 | % PROBlEM of QP 60 | QQ{i} = H; % HESIAN MATRIX 61 | Aeq{i} = G; 62 | beq{i} = Ibar; 63 | QQbar{i} = Qbar; 64 | Aineq{i} = DD; 65 | bineq{i} = dd; 66 | end 67 | 68 | %% Coupling Constraint 69 | 70 | Atilda = zeros((N1+1)*nx,N1* nu); 71 | Btilda = eye(N1*nu); 72 | for i = 1: N 73 | M{i} = [Atilda' Btilda]; 74 | end 75 | 76 | b = 12 * ones(size(Atilda',1),1); % vector of Coupling Constraint 77 | mm = size(Atilda',1); %size x=n 78 | % opt = optimoptions('quadprog','Display','off'); 79 | %% Graph Structure and Fusion Centers 80 | 81 | A1 = [-eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 82 | zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm); 83 | -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 84 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 85 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 86 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 87 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 88 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 89 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 90 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm)]; 91 | B1 = [ eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 92 | eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 93 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 94 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 95 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 96 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 97 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 98 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 99 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm); 100 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm)]; 101 | alpha = 0.9; 102 | 103 | eps{1} = [1 4]; 104 | 105 | eps{2} = [1 3]; 106 | 107 | eps{3} = [2 3]; 108 | 109 | eps{4} = [2 5]; 110 | 111 | eps{5} = [5 6]; 112 | 113 | %% RHCADMM Solver options 114 | maxiter = 1000; 115 | 116 | tol = 1e-2; 117 | 118 | options.MaxIter = maxiter; 119 | 120 | options.tolerance = tol; 121 | 122 | options.hypergraph = eps; 123 | 124 | options.Display = 'off'; 125 | %% Initial Conditions of ststes system 126 | 127 | for i = 1:N 128 | x(:,i) =[unifrnd(lbx(1),ubx(1),1,1) unifrnd(lbx(2),ubx(2),1,1)]'; 129 | % x(:,i) = [0.32 1.26]'; 130 | end 131 | %% Start Simulation 132 | 133 | ref = [2 0]'; 134 | 135 | ref = 0.8* (time <= 3) + 0.3 * (time <= 6 & time >= 3.1)+(-0.8*(time >= 6.1)) ; 136 | 137 | ref = ref * 0; 138 | 139 | % h = waitbar(0,'Simulation Progress'); 140 | 141 | %%% simulation of MPC 142 | k = 0; 143 | for t = t0 : dt: tf - dt 144 | 145 | k = k + 1; 146 | r1 = []; 147 | for i = 1: N1 + 1 148 | 149 | r = [ref(k)*1 0]'; 150 | 151 | r1 = [r;r1]; 152 | end 153 | 154 | % STOREGE of ststes 155 | X1(:,k) = x(:,1); 156 | X2(:,k) = x(:,2); 157 | X3(:,k) = x(:,3); 158 | X4(:,k) = x(:,4); 159 | X5(:,k) = x(:,5); 160 | X6(:,k) = x(:,6); 161 | 162 | for i = 1: N 163 | f = [-2 * r1' * QQbar{i} zeros(1, N1 * nu)]; 164 | c{i} = f; % c of objective function of dual probem 165 | end 166 | 167 | % tic 168 | [xopt, fval, Data , theta ] = RHCADMM(QQ,c,Aeq,beq,Aineq,bineq,M,b,A1,B1,alpha,N,m,x,options); 169 | % toc 170 | objective = 0; 171 | for i = 1:N 172 | objective = objective + 0.5 * theta(:,i)' * QQ{i} * theta(:,i) + c{i} * theta(:,i); % Computing Optimal value 173 | end 174 | for i = 1: N 175 | 176 | u(:,i) = theta((N1+1)*nx + 1,i); 177 | end 178 | 179 | 180 | for i = 1: N 181 | x(:,i) = A{i} * x(:,i) + B{i} * u(:,i); 182 | 183 | end 184 | % M{1}*theta(:,1)+M{2}*theta(:,2)+M{3}*theta(:,3)+M{4}*theta(:,4)+M{5}*theta(:,5)+M{6}*theta(:,6) 185 | 186 | clc 187 | disp(['simulation progress = ' num2str((t+ dt) * 100 / tf) '%']) 188 | % waitbar(t / tf) 189 | %% Saving Data 190 | 191 | U1 (k)= u(:,1); 192 | U2 (k)= u(:,2); 193 | U3 (k)= u(:,3); 194 | U4 (k)= u(:,4); 195 | U5 (k)= u(:,5); 196 | U6 (k)= u(:,6); 197 | U7(k) = sum(u); 198 | Objective_MPC(k) = objective; 199 | 200 | end 201 | 202 | 203 | % close(h) 204 | figure 205 | subplot(2,1,1) 206 | plot(time,X1(1,:) + 0.68,'g --','linewidth',1) 207 | hold on 208 | plot(time,X2(1,:)+ 0.68,'r ','linewidth',1) 209 | hold on 210 | plot(time,X3(1,:)+ 0.68,'k -.','linewidth',1) 211 | hold on 212 | plot(time,X4(1,:)+ 0.68,'c','linewidth',1) 213 | hold on 214 | plot(time,0.68 * ones(Nt,1),'b--','linewidth',0.5) 215 | xlabel('time [sec]') 216 | ylabel('h_1 [m]') 217 | % plot(time,X5(1,:)+ 1) 218 | % hold on 219 | % plot(time,X6(1,:)+ 1) 220 | % hold on 221 | % plot(time,ones(Nt,1)*0) 222 | % hold on 223 | % plot(time,ref) 224 | % plot(time,ref) 225 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 226 | subplot(2,1,2) 227 | plot(time,X1(2,:) + 0.65,'g --','linewidth',1) 228 | hold on 229 | plot(time,X2(2,:) + 0.65,'r','linewidth',1) 230 | hold on 231 | plot(time,X3(2,:)+ 0.65,'k -.','linewidth',1) 232 | hold on 233 | plot(time,X4(2,:)+ 0.65,'c','linewidth',1) 234 | hold on 235 | plot(time,0.65 * ones(Nt,1),'linewidth',1) 236 | xlabel('time [sec]') 237 | ylabel('h_3 [m]') 238 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 239 | % plot(time,X5(2,:)+ 0.64) 240 | % hold on 241 | % plot(time,X6(2,:)+ 0.64) 242 | % hold on 243 | % plot(time,ones(Nt,1)*lbx(1),time,ones(Nt,1)*ubx(1)) 244 | % plot(time,ref) 245 | 246 | 247 | figure 248 | subplot(2,1,1) 249 | plot(time,U1 + 2,'--','linewidth',1) 250 | hold on 251 | plot(time,U2+ 2,'-*','linewidth',1) 252 | hold on 253 | plot(time,U3+ 2,'-.','linewidth',1) 254 | hold on 255 | plot(time,U4+ 2,'-o','linewidth',1) 256 | hold on 257 | 258 | % stairs(time,U5+ 0.3) 259 | % hold on 260 | % stairs(time,U6+ 0.3) 261 | % hold on 262 | % plot(time,ones(Nt,1)*0.6,'-','linewidth',1) 263 | legend('tank 1', 'tank 2','tank 3', 'tank 4') 264 | xlabel('time [sec]') 265 | ylabel('q(t)') 266 | subplot(2,1,2) 267 | plot(time,U7 + N * 2,'--','linewidth',1) 268 | hold on 269 | plot(time,20 * ones(1,Nt),'--','linewidth',1) 270 | hold on 271 | legend('$\sum_{i = 1}^{N} q^i$','total input flow') 272 | xlabel('time [sec]') 273 | ylabel('Coupling Constraint') 274 | -------------------------------------------------------------------------------- /Tank_System.m: -------------------------------------------------------------------------------- 1 | %% tank system 2 | 3 | clc, clear, close all 4 | 5 | %% time structure 6 | 7 | t0 = 0; tf = 20; dt = 0.1; 8 | time = t0: dt: tf - dt; Nt = numel(time); 9 | 10 | 11 | %% System Structure 12 | 13 | A = [0.875 0.1250; 0.1250 0.8047]; B = [0.3 3]'; 14 | 15 | 16 | x = [4 3]'; 17 | 18 | k = 0; 19 | for t = t0: dt: tf - dt 20 | k = k + 1; 21 | x = A * x; 22 | 23 | X(:,k) = x; 24 | end 25 | 26 | plot(time,X) -------------------------------------------------------------------------------- /Tracking_Sparse.m: -------------------------------------------------------------------------------- 1 | clc, clear, close all 2 | 3 | %% time structure 4 | 5 | t0 = 0; tf = 5; dt = 0.1; 6 | time = t0: dt: tf - dt; Nt = numel(time); 7 | 8 | 9 | %% System Structure 10 | N = 6; 11 | m = 5; 12 | % A{1} = [0 1;-8 -3]; B{1} = [0 1]'; 13 | % A{2} = [0 1;-1 -2]; B{2} = [0 1]'; 14 | % A{3} = [0 1;-1 -1]; B{3} = [0 1]'; 15 | % A{4} = [0 1;-1 -5]; B{4} = [0 1]'; 16 | % A{5} = [0 1;-1 -7]; B{5} = [0 1]'; 17 | % A{6} = [0 1;-1 -8]; B{6} = [0 1]'; 18 | for i = 1:N 19 | % A{i} = [0 1;-1 -2]; B{i} = [0 1]'; 20 | % 21 | % [A{i}, B{i}] = c2d(A{i},B{i},dt); 22 | A{i} = [0.875 0.1250; 0.1250 0.8047]; B{i} = [0.3 3]'; 23 | end 24 | 25 | 26 | nx = size(B{1},1); 27 | 28 | nu = size(B{1},2); 29 | %% MPC Parameters 30 | N1 = 5; 31 | 32 | for i = 1: N 33 | 34 | Q{i} = 20 * rand *[1 0; 0 1]; 35 | 36 | P{i} = Q{i}; 37 | 38 | R{i} = 5 * rand * eye(nu); 39 | end 40 | %% Local Constraints 41 | 42 | ubx = [1 0.64]'; 43 | lbx = - ubx; 44 | Aineqx = [eye(nx);-eye(nx)]; 45 | bineqx = [ubx; -lbx]; 46 | ubu = 0.3; 47 | lbu = - ubu; 48 | Ainequ = [eye(nu);-eye(nu)]; 49 | binequ = [ubu; -lbu]; 50 | 51 | %% DMPC Matrices 52 | for i = 1: N 53 | 54 | [H,G,Ibar,Qbar,DD,dd] = buildmiqp(N1,Q{i},P{i},R{i},A{i},B{i},Aineqx,bineqx,Ainequ,binequ); 55 | 56 | QQ{i} = H; 57 | Aeq{i} = G; 58 | beq{i} = Ibar; 59 | QQbar{i} = Qbar; 60 | Aineq{i} = DD; 61 | bineq{i} = dd; 62 | end 63 | 64 | 65 | 66 | 67 | 68 | 69 | %% Coupling Constraint 70 | 71 | 72 | 73 | Atilda = zeros((N1+1)*nx,N1* nu); 74 | Btilda = eye(N1*nu); 75 | for i = 1: N 76 | 77 | M{i} = [Atilda' Btilda]; 78 | end 79 | 80 | b = 0.8* ones(size(Atilda',1),1); 81 | mm = size(Atilda',1); 82 | % opt = optimoptions('quadprog','Display','off'); 83 | %% Graph Structure and Fusion Centers 84 | 85 | A1 = [-eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 86 | zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm); 87 | -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 88 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 89 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 90 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 91 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 92 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 93 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 94 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm)]; 95 | B1 = [ eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 96 | eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 97 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 98 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 99 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 100 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 101 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 102 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 103 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm); 104 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm)]; 105 | alpha = 0.9; 106 | 107 | eps{1} = [1 4]; 108 | 109 | eps{2} = [1 3]; 110 | 111 | eps{3} = [2 3]; 112 | 113 | eps{4} = [2 5]; 114 | 115 | eps{5} = [5 6]; 116 | 117 | %% RHCADMM Solver options 118 | maxiter = 1000; 119 | 120 | tol = 1e-2; 121 | 122 | options.MaxIter = maxiter; 123 | 124 | options.tolerance = tol; 125 | 126 | options.hypergraph = eps; 127 | 128 | options.Display = 'off'; 129 | %% Initial Conditions 130 | 131 | for i = 1:N 132 | x(:,i) =[unifrnd(lbx(1),ubx(1),1,1) unifrnd(lbx(2),ubx(2),1,1)]'; 133 | end 134 | %% Start Simulation 135 | 136 | 137 | ref = [2 0]'; 138 | 139 | ref = 0.8* (time <= 3) + 0.3 * (time <= 6 & time >= 3.1)+(-0.8*(time >= 6.1)) ; 140 | 141 | ref = ref * 0; 142 | 143 | % h = waitbar(0,'Simulation Progress'); 144 | 145 | k = 0; 146 | for t = t0 : dt: tf - dt 147 | 148 | k = k + 1; 149 | r1 = []; 150 | for i = 1: N1 + 1 151 | 152 | r = [ref(k)*1 0]'; 153 | 154 | r1 = [r;r1]; 155 | end 156 | 157 | X1(:,k) = x(:,1); 158 | X2(:,k) = x(:,2); 159 | X3(:,k) = x(:,3); 160 | X4(:,k) = x(:,4); 161 | X5(:,k) = x(:,5); 162 | X6(:,k) = x(:,6); 163 | 164 | for i = 1: N 165 | f = [-2 * r1' * QQbar{i} zeros(1, N1 * nu)]; 166 | c{i} = f; 167 | end 168 | 169 | % tic 170 | [xopt, fval, Data , theta ] = RHCADMM(QQ,c,Aeq,beq,Aineq,bineq,M,b,A1,B1,alpha,N,m,x,options); 171 | % toc 172 | objective = 0; 173 | for i = 1:N 174 | objective = objective + 0.5 * theta(:,i)' * QQ{i} * theta(:,i) + c{i} * theta(:,i); % Computing Optimal value 175 | end 176 | for i = 1: N 177 | 178 | u(:,i) = theta((N1+1)*nx + 1,i); 179 | end 180 | 181 | 182 | for i = 1: N 183 | x(:,i) = A{i} * x(:,i) + B{i} * u(:,i); 184 | 185 | end 186 | % M{1}*theta(:,1)+M{2}*theta(:,2)+M{3}*theta(:,3)+M{4}*theta(:,4)+M{5}*theta(:,5)+M{6}*theta(:,6) 187 | 188 | clc 189 | disp(['simulation progress = ' num2str((t+ dt) * 100 / tf) '%']) 190 | % waitbar(t / tf) 191 | %% Saving Data 192 | 193 | U1 (k)= u(:,1); 194 | U2 (k)= u(:,2); 195 | U3 (k)= u(:,3); 196 | U4 (k)= u(:,4); 197 | U5 (k)= u(:,5); 198 | U6 (k)= u(:,6); 199 | U7(k) = sum(u); 200 | Objective_MPC(k) = objective; 201 | 202 | end 203 | 204 | 205 | % close(h) 206 | figure 207 | subplot(2,1,1) 208 | plot(time,X1(1,:) + 1,'--','linewidth',1) 209 | hold on 210 | plot(time,X2(1,:)+ 1,'-*','linewidth',1) 211 | hold on 212 | plot(time,X3(1,:)+ 1,'-.','linewidth',1) 213 | hold on 214 | plot(time,X4(1,:)+ 1,'-o','linewidth',1) 215 | hold on 216 | plot(time,ones(Nt,1),'linewidth',1) 217 | xlabel('time [sec]') 218 | ylabel('h_1 [m]') 219 | % plot(time,X5(1,:)+ 1) 220 | % hold on 221 | % plot(time,X6(1,:)+ 1) 222 | % hold on 223 | % plot(time,ones(Nt,1)*0) 224 | % hold on 225 | % plot(time,ref) 226 | % plot(time,ref) 227 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 228 | subplot(2,1,2) 229 | plot(time,X1(2,:) + 0.64,'--','linewidth',1) 230 | hold on 231 | plot(time,X2(2,:) + 0.64,'-*','linewidth',1) 232 | hold on 233 | plot(time,X3(2,:)+ 0.64,'-.','linewidth',1) 234 | hold on 235 | plot(time,X4(2,:)+ 0.64,'-o','linewidth',1) 236 | hold on 237 | plot(time,0.64 * ones(Nt,1),'linewidth',1) 238 | xlabel('time [sec]') 239 | ylabel('h_2 [m]') 240 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 241 | % plot(time,X5(2,:)+ 0.64) 242 | % hold on 243 | % plot(time,X6(2,:)+ 0.64) 244 | % hold on 245 | % plot(time,ones(Nt,1)*lbx(1),time,ones(Nt,1)*ubx(1)) 246 | % plot(time,ref) 247 | figure 248 | subplot(2,1,1) 249 | plot(time,U1 + 0.3,'--','linewidth',1) 250 | hold on 251 | plot(time,U2+ 0.3,'-*','linewidth',1) 252 | hold on 253 | plot(time,U3+ 0.3,'-.','linewidth',1) 254 | hold on 255 | plot(time,U4+ 0.3,'-o','linewidth',1) 256 | hold on 257 | 258 | % stairs(time,U5+ 0.3) 259 | % hold on 260 | % stairs(time,U6+ 0.3) 261 | % hold on 262 | % plot(time,ones(Nt,1)*0.6,'-','linewidth',1) 263 | legend('tank 1', 'tank 2','tank 3', 'tank 4') 264 | xlabel('time [sec]') 265 | ylabel('q(t)') 266 | subplot(2,1,2) 267 | plot(time,U7 + N * 0.3,'--','linewidth',1) 268 | hold on 269 | plot(time,2*ones(1,Nt),'--','linewidth',1) 270 | hold on 271 | legend('$\sum_{i = 1}^{N} q^i$','total input flow') 272 | xlabel('time [sec]') 273 | ylabel('Coupling Constraint') 274 | -------------------------------------------------------------------------------- /Two_tank_MPC.m: -------------------------------------------------------------------------------- 1 | clc, clear, close all 2 | 3 | %% time structure 4 | 5 | t0 = 0; tf = 500; dt = 5; 6 | time = t0: dt: tf - dt; Nt = numel(time); 7 | 8 | %% System parameters 9 | Aa = 0.06; 10 | a1 = 6.7371e-4; 11 | a3 = 4.0423e-4; 12 | gama = 0.4; 13 | g = 9.8; 14 | h1_0 = 0.68; 15 | h3_0 = 0.65; 16 | q_0 = 2; 17 | tao_1 = (Aa / a1) * (sqrt(2*h1_0/g)); 18 | tao_3 = (Aa / a3) * (sqrt(2*h3_0/g)); 19 | 20 | %% System Structure 21 | N = 6; 22 | m = 5; 23 | 24 | for i = 1:N 25 | A{i} = [-1/tao_1 1/tao_3;0 -1/tao_3]; B{i} = [gama/Aa (1-gama)/Aa]'; 26 | 27 | [A{i}, B{i}] = c2d(A{i},B{i},dt); 28 | end 29 | 30 | 31 | nx = size(B{1},1); % number of state 32 | 33 | nu = size(B{1},2); % number of input 34 | %% MPC Parameters 35 | KK = 0; 36 | % predection horizon 37 | 38 | alpha = 0.9; 39 | for N1 = 5 40 | KK = KK + 1; 41 | for i = 1: N % cost of MPC 42 | 43 | Q{i} = 20 * [1 0; 0 0.001]; 44 | 45 | P{i} = Q{i}; 46 | 47 | R{i} = 1 * eye(nu); 48 | end 49 | %% Local Constraints 50 | 51 | ubx = [1.36 1.30]'; 52 | lbx = -ubx; 53 | Aineqx = [eye(nx);-eye(nx)]; 54 | bineqx = [ubx; -lbx]; 55 | ubu = 4; 56 | lbu = -ubu; 57 | Ainequ = [eye(nu);-eye(nu)]; 58 | binequ = [ubu; -lbu]; 59 | 60 | %% DMPC Matrices 61 | for i = 1: N 62 | [H,G,Ibar,Qbar,DD,dd] = buildmiqp(N1,Q{i},P{i},R{i},A{i},B{i},Aineqx,bineqx,Ainequ,binequ); 63 | % PROBlEM of QP 64 | QQ{i} = H; % HESIAN MATRIX 65 | Aeq{i} = G; 66 | beq{i} = Ibar; 67 | QQbar{i} = Qbar; 68 | Aineq{i} = DD; 69 | bineq{i} = dd; 70 | end 71 | 72 | 73 | %% Coupling Constraint 74 | 75 | 76 | Atilda = zeros((N1+1)*nx,N1* nu); 77 | Btilda = eye(N1*nu); 78 | for i = 1: N 79 | M{i} = [Atilda' Btilda]; 80 | end 81 | 82 | b = 0.5 * ones(size(Atilda',1),1); % vector of Coupling Constraint 83 | mm = size(Atilda',1); %size x=n 84 | % opt = optimoptions('quadprog','Display','off'); 85 | %% Graph Structure and Fusion Centers 86 | 87 | A1 = [-eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 88 | zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm); 89 | -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 90 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 91 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 92 | zeros(mm) zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm); 93 | zeros(mm) -eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 94 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 95 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm) zeros(mm); 96 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm) -eye(mm)]; 97 | B1 = [ eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 98 | eye(mm) zeros(mm) zeros(mm) zeros(mm) zeros(mm); 99 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 100 | zeros(mm) eye(mm) zeros(mm) zeros(mm) zeros(mm); 101 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 102 | zeros(mm) zeros(mm) eye(mm) zeros(mm) zeros(mm); 103 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 104 | zeros(mm) zeros(mm) zeros(mm) eye(mm) zeros(mm); 105 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm); 106 | zeros(mm) zeros(mm) zeros(mm) zeros(mm) eye(mm)]; 107 | 108 | 109 | eps{1} = [1 4]; 110 | 111 | eps{2} = [1 3]; 112 | 113 | eps{3} = [2 3]; 114 | 115 | eps{4} = [2 5]; 116 | 117 | eps{5} = [5 6]; 118 | 119 | %% RHCADMM Solver options 120 | maxiter = 1000; 121 | 122 | tol = 1e-2; 123 | 124 | options.MaxIter = maxiter; 125 | 126 | options.tolerance = tol; 127 | 128 | options.hypergraph = eps; 129 | 130 | options.Display = 'off'; 131 | %% Initial Conditions of ststes system 132 | 133 | % for i = 1:N 134 | x(:,1) = [1 0.26]'; 135 | x(:,2) = [0.7 0.18]'; 136 | x(:,3) = [0 0]'; 137 | x(:,4) = [0.1 0.26]'; 138 | x(:,5) = [0.32 0.26]'; 139 | x(:,6) = [0.32 0.26]'; 140 | % x(:,i) =[unifrnd(lbx(1),ubx(1),1,1) unifrnd(lbx(2),ubx(2),1,1)]'; 141 | % end 142 | %% Start Simulation 143 | 144 | 145 | ref = [2 0]'; 146 | 147 | ref = 0.6 * (time <= 180) + 1.2 * (time <= 320 & time >= 180.1) + (0.4 *(time >= 320.1)) ; 148 | 149 | % ref = ref * 0; 150 | 151 | % h = waitbar(0,'Simulation Progress'); 152 | 153 | %%% simulation of MPC 154 | k = 0; 155 | for t = t0 : dt: tf - dt 156 | 157 | k = k + 1; 158 | r1 = []; 159 | for i = 1: N1 + 1 160 | 161 | r = [ref(k)*1 0]'; 162 | 163 | r1 = [r;r1]; 164 | end 165 | 166 | % STOREGE of ststes 167 | X1(:,k) = x(:,1); 168 | X2(:,k) = x(:,2); 169 | X3(:,k) = x(:,3); 170 | X4(:,k) = x(:,4); 171 | X5(:,k) = x(:,5); 172 | X6(:,k) = x(:,6); 173 | 174 | for i = 1: N 175 | f = [-2 * r1' * QQbar{i} zeros(1, N1 * nu)]; 176 | c{i} = f; % c of objective function of dual probem 177 | end 178 | % clc 179 | tic 180 | [xopt, fval, Data , theta ] = RHCADMM(QQ,c,Aeq,beq,Aineq,bineq,M,b,A1,B1,alpha,N,m,x,options); 181 | GG(k) = toc; 182 | % GG(k) 183 | MM(k) = Data.Maxiter; 184 | % MM 185 | objective = 0; 186 | for i = 1:N 187 | objective = objective + 0.5 * theta(:,i)' * QQ{i} * theta(:,i) ; % Computing Optimal value 188 | end 189 | for i = 1: N 190 | 191 | u(:,i) = theta((N1+1)*nx + 1,i); 192 | end 193 | 194 | 195 | for i = 1: N 196 | x(:,i) = A{i} * x(:,i) + B{i} * u(:,i); 197 | 198 | end 199 | % M{1}*theta(:,1)+M{2}*theta(:,2)+M{3}*theta(:,3)+M{4}*theta(:,4)+M{5}*theta(:,5)+M{6}*theta(:,6) 200 | RHO(k) = Data.finalrho; 201 | clc 202 | disp(['simulation progress = ' num2str((t+ dt) * 100 / tf) '%']) 203 | % waitbar(t / tf) 204 | %% Saving Data 205 | 206 | U1 (k)= u(:,1); 207 | U2 (k)= u(:,2); 208 | U3 (k)= u(:,3); 209 | U4 (k)= u(:,4); 210 | U5 (k)= u(:,5); 211 | U6 (k)= u(:,6); 212 | U7(k) = sum(u); 213 | U8 (k) = U1 (k) + U2 (k) + U3 (k) + U4 (k); 214 | Objective_MPC(k) = objective; 215 | TIME(k) = toc; 216 | PP(k) = Data.Maxiter; 217 | end 218 | 219 | worstcase = max(GG); 220 | worstiter= max(MM); 221 | 222 | disp(['Horizon = ' num2str(N1) ' $\alpha$ = ' num2str(alpha) ' worst time = ' num2str(worstcase) ' worst iter = ' num2str(worstiter)]) 223 | end 224 | 225 | 226 | N = 5:5:40; 227 | 228 | alpha1 = 1000 * [0.511 0.520 0.533 0.583 0.700 0.876 1.037 1.183]; 229 | 230 | alpha2 = 1000 * [0.414 0.442 0.457 0.513 0.622 0.748 0.879 1.028]; 231 | 232 | alpha3 = 1000 * [0.335 0.382 0.421 0.502 0.596 0.726 0.821 1.080]; 233 | 234 | alpha4 = 1000 * [0.307 0.368 0.390 0.510 0.518 0.642 0.740 0.872]; 235 | 236 | alpha5 = 1000 * [0.286 0.328 0.353 0.394 0.464 0.566 0.659 0.853]; 237 | 238 | 239 | figure 240 | 241 | plot(N, alpha1,N, alpha2,'-.*',N, alpha3, '->',N, alpha4,'-*',N, alpha5,'-o','linewidth',1.25) 242 | 243 | legend('HADMM \alpha = 0.5','RH-ADMM \alpha = 0.6','RH-ADMM \alpha = 0.7','RH-ADMM \alpha = 0.8','RH-ADMM \alpha = 0.9') 244 | 245 | xlabel('Prediction Horizon (T)') 246 | 247 | ylabel('Worst execution time (ms)') 248 | % 249 | 250 | 251 | 252 | figure 253 | subplot(2,1,1) 254 | plot(time,X1(1,:) ,'r --','linewidth',1.25) 255 | hold on 256 | plot(time,X2(1,:),'g :','linewidth',1.75) 257 | hold on 258 | plot(time,X3(1,:),'m -.','linewidth',1.25) 259 | hold on 260 | plot(time,X4(1,:),'c --','linewidth',1.25) 261 | % hold on 262 | % plot(time,X5(1,:),'m -.','linewidth',1.25) 263 | % hold on 264 | % plot(time,X6(1,:),'c --','linewidth',1.25) 265 | hold on 266 | plot(time,ref,'b --','linewidth',1.25) 267 | % plot(time,0.68 * ones(Nt,1),'linewidth',1) 268 | xlabel('time [sec]') 269 | ylabel('h_1 [m]') 270 | % plot(time,X5(1,:)+ 1) 271 | % hold on 272 | % plot(time,X6(1,:)+ 1) 273 | % hold on 274 | % plot(time,ones(Nt,1)*0) 275 | % hold on 276 | % plot(time,ref) 277 | % plot(time,ref) 278 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 279 | subplot(2,1,2) 280 | plot(time,X1(2,:) ,'r --','linewidth',1.25) 281 | hold on 282 | plot(time,X2(2,:),'g :','linewidth',1.75) 283 | hold on 284 | plot(time,X3(2,:),'m -.','linewidth',1.25) 285 | hold on 286 | plot(time,X4(2,:),'c --','linewidth',1.25) 287 | hold on 288 | % plot(time,X5(2,:),'m -.','linewidth',1.25) 289 | % hold on 290 | % plot(time,X6(2,:),'c --','linewidth',1.25) 291 | hold on 292 | plot(time,ref,'b--','linewidth',1.25) 293 | % plot(time,0.65 * ones(Nt,1),'linewidth',1) 294 | xlabel('time [sec]') 295 | ylabel('h_3 [m]') 296 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 297 | % plot(time,X5(2,:)+ 0.64) 298 | % hold on 299 | % plot(time,X6(2,:)+ 0.64) 300 | % hold on 301 | % plot(time,ones(Nt,1)*lbx(1),time,ones(Nt,1)*ubx(1)) 302 | % plot(time,ref) 303 | 304 | 305 | figure 306 | subplot(2,1,1) 307 | plot(time,U1 + 2,'r --','linewidth',1.25) 308 | hold on 309 | plot(time,U2+ 2,'g :','linewidth',1.75) 310 | hold on 311 | plot(time,U3+ 2,'m -.','linewidth',1.25) 312 | hold on 313 | plot(time,U4+ 2,'c --','linewidth',1.25) 314 | hold on 315 | 316 | % stairs(time,U5+ 0.3) 317 | % hold on 318 | % stairs(time,U6+ 0.3) 319 | % hold on 320 | % plot(time,ones(Nt,1)*0.6,'-','linewidth',1) 321 | legend('tank 1', 'tank 2','tank 3', 'tank 4') 322 | xlabel('time [sec]') 323 | ylabel('q(t)') 324 | subplot(2,1,2) 325 | plot(time,U8 + 4 * 2,'r --','linewidth',1.25) % N = 4 ----> Nnmber of conected tank 326 | hold on 327 | plot(time,8.5*ones(1,Nt),'g .-','linewidth',1.25) 328 | hold on 329 | legend('$\sum_{i = 1}^{N} q^i$','total input flow') 330 | xlabel('time [sec]') 331 | ylabel('Coupling Constraint') 332 | 333 | figure 334 | plot(X1(1,:),X1(2,:),'b -.') 335 | hold on 336 | plot(X2(1,:),X2(2,:),'g --') 337 | hold on 338 | plot(X3(1,:),X3(2,:),'r -.') 339 | hold on 340 | plot(X4(1,:),X4(2,:),'c --') 341 | hold on 342 | plot(ref,ref,'m :','linewidth',1.5) 343 | hold on 344 | plot(X1(1,1),X1(2,1),'b *') 345 | hold on 346 | plot(X1(1,100),X1(2,100),'b o','markersize',11,'markerfacecolor','b') 347 | hold on 348 | plot(X2(1,1),X2(2,1),'g *') 349 | hold on 350 | plot(X2(1,100),X2(2,100),'g o','markersize',9,'markerfacecolor','g') 351 | hold on 352 | plot(X3(1,1),X3(2,1),'r *') 353 | hold on 354 | plot(X3(1,100),X3(2,100),'r o','markersize',7,'markerfacecolor','r') 355 | hold on 356 | plot(X4(1,1),X4(2,1),'c *') 357 | hold on 358 | plot(X4(1,100),X4(2,100),'c o','markersize',5,'markerfacecolor','c') 359 | hold on 360 | % plot(0.6,0.6,'m *') 361 | % hold on 362 | plot(0.4,0.4,'m o','markersize',3,'markerfacecolor','m') 363 | % hold on 364 | % plot(1.2,1.2,'m s','markersize',5,'markerfacecolor','m') 365 | xlabel('x_1') 366 | ylabel('x_2') 367 | legend('tank 1', 'tank 2','tank 3', 'tank 4', 'Ref') 368 | -------------------------------------------------------------------------------- /ali.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alirezalm/RHADMM-Algorithm/58328d8ca010bcf7e864ecac72377e95aa56b19a/ali.mat -------------------------------------------------------------------------------- /buildmiqp.m: -------------------------------------------------------------------------------- 1 | function [H,G,Ibar,Qbar,DD,dd] = buildmiqp(N,Q,P,R,A,B,Aineqx,bineqx,Ainequ,binequ) 2 | nx = size(A,1); nw = size(B,2); nix = size(Aineqx,1); niu = size(Ainequ,1); 3 | for i = 1 : N 4 | Qbar1(nx*i-nx+1:nx*i ,nx*i-nx+1:nx*i ) = Q ; 5 | end 6 | 7 | for i = 1 : N 8 | Qbar1(nx*i-nx+1:nx*i ,nx*i-nx+1:nx*i ) = Q ; 9 | end 10 | 11 | Qbar = blkdiag(Qbar1,P); 12 | 13 | 14 | for i = 1 : N 15 | Rbar(nw*i-nw+1:nw*i ,nw*i-nw+1:nw*i ) = R ; 16 | end 17 | 18 | H = 2 * blkdiag(Qbar,Rbar); 19 | 20 | 21 | for i = 1 : N 22 | Abar(nx*i-nx+1:nx*i ,nx*i-nx+1:nx*i ) = A ; 23 | end 24 | Abar = [zeros(nx,N*nx);Abar]; 25 | Abar = [Abar zeros((N+1)*nx,nx)]; 26 | 27 | for i = 1 : N 28 | Bbar(nx*i-nx+1:nx*i ,nw*i-nw+1:nw*i ) = B ; 29 | end 30 | Bbar = [zeros(nx,N*nw); Bbar]; 31 | 32 | Ibar = eye(nx); 33 | Ibar = [Ibar;zeros((N)* nx , nx)]; 34 | 35 | 36 | 37 | G = [eye(size(Abar,1))-Abar -Bbar]; 38 | 39 | 40 | for i = 1 : N + 1 41 | DDx(nix*i-nix+1:nix*i ,nx*i-nx+1:nx*i ) = Aineqx ; 42 | end 43 | 44 | for i = 1 : N + 1 45 | ddx(nix*i-nix+1:nix*i ,: ) = bineqx ; 46 | end 47 | 48 | for i = 1 : N 49 | DDu(niu*i-niu+1:niu*i ,nw*i-nw+1:nw*i ) = Ainequ ; 50 | end 51 | 52 | for i = 1 : N 53 | ddu(niu*i-niu+1:niu*i ,: ) = binequ ; 54 | end 55 | 56 | DD = blkdiag(DDx,DDu); 57 | dd = [ddx;ddu]; 58 | 59 | end 60 | 61 | -------------------------------------------------------------------------------- /input.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alirezalm/RHADMM-Algorithm/58328d8ca010bcf7e864ecac72377e95aa56b19a/input.fig -------------------------------------------------------------------------------- /isPSD.m: -------------------------------------------------------------------------------- 1 | function tf = isPSD(Q) 2 | 3 | if issymmetric(Q) 4 | 5 | lambda = eig(Q); 6 | 7 | if lambda >= 0 8 | 9 | tf = true; 10 | else 11 | tf = false; 12 | end 13 | else 14 | 15 | 16 | % warning('The Hessian matrix is not symmetric. Resetting Q = 0.5 * (Q + Q)') 17 | 18 | Q = 0.5 * (Q + Q'); 19 | lambda = eig(Q); 20 | if lambda >= 0 21 | 22 | tf = true; 23 | else 24 | tf = false; 25 | end 26 | end 27 | 28 | -------------------------------------------------------------------------------- /linesearch.m: -------------------------------------------------------------------------------- 1 | function rho = linesearch(rho,x,y,z,A,B,inv_E) 2 | 3 | tau = 3; 4 | miu = 10; 5 | yold = y; 6 | y = (1/rho) * max(inv_E*B' * z,0); % Computing y 7 | 8 | 9 | 10 | r = A * x(:) + B * y; 11 | 12 | S = rho * A' * B * (y - yold); 13 | 14 | % if norm(S) ~= 0 15 | if norm(r) > miu * norm(S) 16 | rho = rho*(1 + tau); 17 | 18 | elseif norm(S)> miu * norm(r) 19 | 20 | rho = rho/(1 + tau); 21 | 22 | end 23 | % end 24 | 25 | 26 | end 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /phase_diagram.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: (MATLAB, The Mathworks, Inc. Version 8.4.0.150421 \(R2014b\). Operating System: Windows 8) 3 | %%Title: (C:/Users/Alireza/OneDrive/ADMM Codes/DMPC_RHCADMM/phase_diagram.eps) 4 | %%CreationDate: 2018-12-01T12:50:30 5 | %%Pages: (atend) 6 | %%BoundingBox: 0 0 503 417 7 | %%LanguageLevel: 2 8 | %%EndComments 9 | %%BeginProlog 10 | %%BeginResource: procset (Apache XML Graphics Std ProcSet) 1.2 0 11 | %%Version: 1.2 0 12 | %%Copyright: (Copyright 2001-2003,2010 The Apache Software Foundation. License terms: http://www.apache.org/licenses/LICENSE-2.0) 13 | /bd{bind def}bind def 14 | /ld{load def}bd 15 | /GR/grestore ld 16 | /M/moveto ld 17 | /LJ/setlinejoin ld 18 | /C/curveto ld 19 | /f/fill ld 20 | /LW/setlinewidth ld 21 | /GC/setgray ld 22 | /t/show ld 23 | /N/newpath ld 24 | /CT/concat ld 25 | /cp/closepath ld 26 | /S/stroke ld 27 | /L/lineto ld 28 | /CC/setcmykcolor ld 29 | /A/ashow ld 30 | /GS/gsave ld 31 | /RC/setrgbcolor ld 32 | /RM/rmoveto ld 33 | /ML/setmiterlimit ld 34 | /re {4 2 roll M 35 | 1 index 0 rlineto 36 | 0 exch rlineto 37 | neg 0 rlineto 38 | cp } bd 39 | /_ctm matrix def 40 | /_tm matrix def 41 | /BT { _ctm currentmatrix pop matrix _tm copy pop 0 0 moveto } bd 42 | /ET { _ctm setmatrix } bd 43 | /iTm { _ctm setmatrix _tm concat } bd 44 | /Tm { _tm astore pop iTm 0 0 moveto } bd 45 | /ux 0.0 def 46 | /uy 0.0 def 47 | /F { 48 | /Tp exch def 49 | /Tf exch def 50 | Tf findfont Tp scalefont setfont 51 | /cf Tf def /cs Tp def 52 | } bd 53 | /ULS {currentpoint /uy exch def /ux exch def} bd 54 | /ULE { 55 | /Tcx currentpoint pop def 56 | gsave 57 | newpath 58 | cf findfont cs scalefont dup 59 | /FontMatrix get 0 get /Ts exch def /FontInfo get dup 60 | /UnderlinePosition get Ts mul /To exch def 61 | /UnderlineThickness get Ts mul /Tt exch def 62 | ux uy To add moveto Tcx uy To add lineto 63 | Tt setlinewidth stroke 64 | grestore 65 | } bd 66 | /OLE { 67 | /Tcx currentpoint pop def 68 | gsave 69 | newpath 70 | cf findfont cs scalefont dup 71 | /FontMatrix get 0 get /Ts exch def /FontInfo get dup 72 | /UnderlinePosition get Ts mul /To exch def 73 | /UnderlineThickness get Ts mul /Tt exch def 74 | ux uy To add cs add moveto Tcx uy To add cs add lineto 75 | Tt setlinewidth stroke 76 | grestore 77 | } bd 78 | /SOE { 79 | /Tcx currentpoint pop def 80 | gsave 81 | newpath 82 | cf findfont cs scalefont dup 83 | /FontMatrix get 0 get /Ts exch def /FontInfo get dup 84 | /UnderlinePosition get Ts mul /To exch def 85 | /UnderlineThickness get Ts mul /Tt exch def 86 | ux uy To add cs 10 mul 26 idiv add moveto Tcx uy To add cs 10 mul 26 idiv add lineto 87 | Tt setlinewidth stroke 88 | grestore 89 | } bd 90 | /QT { 91 | /Y22 exch store 92 | /X22 exch store 93 | /Y21 exch store 94 | /X21 exch store 95 | currentpoint 96 | /Y21 load 2 mul add 3 div exch 97 | /X21 load 2 mul add 3 div exch 98 | /X21 load 2 mul /X22 load add 3 div 99 | /Y21 load 2 mul /Y22 load add 3 div 100 | /X22 load /Y22 load curveto 101 | } bd 102 | /SSPD { 103 | dup length /d exch dict def 104 | { 105 | /v exch def 106 | /k exch def 107 | currentpagedevice k known { 108 | /cpdv currentpagedevice k get def 109 | v cpdv ne { 110 | /upd false def 111 | /nullv v type /nulltype eq def 112 | /nullcpdv cpdv type /nulltype eq def 113 | nullv nullcpdv or 114 | { 115 | /upd true def 116 | } { 117 | /sametype v type cpdv type eq def 118 | sametype { 119 | v type /arraytype eq { 120 | /vlen v length def 121 | /cpdvlen cpdv length def 122 | vlen cpdvlen eq { 123 | 0 1 vlen 1 sub { 124 | /i exch def 125 | /obj v i get def 126 | /cpdobj cpdv i get def 127 | obj cpdobj ne { 128 | /upd true def 129 | exit 130 | } if 131 | } for 132 | } { 133 | /upd true def 134 | } ifelse 135 | } { 136 | v type /dicttype eq { 137 | v { 138 | /dv exch def 139 | /dk exch def 140 | /cpddv cpdv dk get def 141 | dv cpddv ne { 142 | /upd true def 143 | exit 144 | } if 145 | } forall 146 | } { 147 | /upd true def 148 | } ifelse 149 | } ifelse 150 | } if 151 | } ifelse 152 | upd true eq { 153 | d k v put 154 | } if 155 | } if 156 | } if 157 | } forall 158 | d length 0 gt { 159 | d setpagedevice 160 | } if 161 | } bd 162 | %%EndResource 163 | %%BeginResource: procset (Apache XML Graphics EPS ProcSet) 1.0 0 164 | %%Version: 1.0 0 165 | %%Copyright: (Copyright 2002-2003 The Apache Software Foundation. License terms: http://www.apache.org/licenses/LICENSE-2.0) 166 | /BeginEPSF { %def 167 | /b4_Inc_state save def % Save state for cleanup 168 | /dict_count countdictstack def % Count objects on dict stack 169 | /op_count count 1 sub def % Count objects on operand stack 170 | userdict begin % Push userdict on dict stack 171 | /showpage { } def % Redefine showpage, { } = null proc 172 | 0 setgray 0 setlinecap % Prepare graphics state 173 | 1 setlinewidth 0 setlinejoin 174 | 10 setmiterlimit [ ] 0 setdash newpath 175 | /languagelevel where % If level not equal to 1 then 176 | {pop languagelevel % set strokeadjust and 177 | 1 ne % overprint to their defaults. 178 | {false setstrokeadjust false setoverprint 179 | } if 180 | } if 181 | } bd 182 | /EndEPSF { %def 183 | count op_count sub {pop} repeat % Clean up stacks 184 | countdictstack dict_count sub {end} repeat 185 | b4_Inc_state restore 186 | } bd 187 | %%EndResource 188 | %FOPBeginFontDict 189 | %%IncludeResource: font Courier-Bold 190 | %%IncludeResource: font Helvetica 191 | %%IncludeResource: font Courier-BoldOblique 192 | %%IncludeResource: font Courier-Oblique 193 | %%IncludeResource: font Times-Roman 194 | %%IncludeResource: font Helvetica-BoldOblique 195 | %%IncludeResource: font Helvetica-Bold 196 | %%IncludeResource: font Helvetica-Oblique 197 | %%IncludeResource: font Times-BoldItalic 198 | %%IncludeResource: font Courier 199 | %%IncludeResource: font Times-Italic 200 | %%IncludeResource: font Times-Bold 201 | %%IncludeResource: font Symbol 202 | %%IncludeResource: font ZapfDingbats 203 | %FOPEndFontDict 204 | %%BeginResource: encoding WinAnsiEncoding 205 | /WinAnsiEncoding [ 206 | /.notdef /.notdef /.notdef /.notdef /.notdef 207 | /.notdef /.notdef /.notdef /.notdef /.notdef 208 | /.notdef /.notdef /.notdef /.notdef /.notdef 209 | /.notdef /.notdef /.notdef /.notdef /.notdef 210 | /.notdef /.notdef /.notdef /.notdef /.notdef 211 | /.notdef /.notdef /.notdef /.notdef /.notdef 212 | /.notdef /.notdef /space /exclam /quotedbl 213 | /numbersign /dollar /percent /ampersand /quotesingle 214 | /parenleft /parenright /asterisk /plus /comma 215 | /hyphen /period /slash /zero /one 216 | /two /three /four /five /six 217 | /seven /eight /nine /colon /semicolon 218 | /less /equal /greater /question /at 219 | /A /B /C /D /E 220 | /F /G /H /I /J 221 | /K /L /M /N /O 222 | /P /Q /R /S /T 223 | /U /V /W /X /Y 224 | /Z /bracketleft /backslash /bracketright /asciicircum 225 | /underscore /quoteleft /a /b /c 226 | /d /e /f /g /h 227 | /i /j /k /l /m 228 | /n /o /p /q /r 229 | /s /t /u /v /w 230 | /x /y /z /braceleft /bar 231 | /braceright /asciitilde /bullet /Euro /bullet 232 | /quotesinglbase /florin /quotedblbase /ellipsis /dagger 233 | /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft 234 | /OE /bullet /Zcaron /bullet /bullet 235 | /quoteleft /quoteright /quotedblleft /quotedblright /bullet 236 | /endash /emdash /asciitilde /trademark /scaron 237 | /guilsinglright /oe /bullet /zcaron /Ydieresis 238 | /space /exclamdown /cent /sterling /currency 239 | /yen /brokenbar /section /dieresis /copyright 240 | /ordfeminine /guillemotleft /logicalnot /sfthyphen /registered 241 | /macron /degree /plusminus /twosuperior /threesuperior 242 | /acute /mu /paragraph /middot /cedilla 243 | /onesuperior /ordmasculine /guillemotright /onequarter /onehalf 244 | /threequarters /questiondown /Agrave /Aacute /Acircumflex 245 | /Atilde /Adieresis /Aring /AE /Ccedilla 246 | /Egrave /Eacute /Ecircumflex /Edieresis /Igrave 247 | /Iacute /Icircumflex /Idieresis /Eth /Ntilde 248 | /Ograve /Oacute /Ocircumflex /Otilde /Odieresis 249 | /multiply /Oslash /Ugrave /Uacute /Ucircumflex 250 | /Udieresis /Yacute /Thorn /germandbls /agrave 251 | /aacute /acircumflex /atilde /adieresis /aring 252 | /ae /ccedilla /egrave /eacute /ecircumflex 253 | /edieresis /igrave /iacute /icircumflex /idieresis 254 | /eth /ntilde /ograve /oacute /ocircumflex 255 | /otilde /odieresis /divide /oslash /ugrave 256 | /uacute /ucircumflex /udieresis /yacute /thorn 257 | /ydieresis 258 | ] def 259 | %%EndResource 260 | %FOPBeginFontReencode 261 | /Courier-Bold findfont 262 | dup length dict begin 263 | {1 index /FID ne {def} {pop pop} ifelse} forall 264 | /Encoding WinAnsiEncoding def 265 | currentdict 266 | end 267 | /Courier-Bold exch definefont pop 268 | /Helvetica findfont 269 | dup length dict begin 270 | {1 index /FID ne {def} {pop pop} ifelse} forall 271 | /Encoding WinAnsiEncoding def 272 | currentdict 273 | end 274 | /Helvetica exch definefont pop 275 | /Courier-BoldOblique findfont 276 | dup length dict begin 277 | {1 index /FID ne {def} {pop pop} ifelse} forall 278 | /Encoding WinAnsiEncoding def 279 | currentdict 280 | end 281 | /Courier-BoldOblique exch definefont pop 282 | /Courier-Oblique findfont 283 | dup length dict begin 284 | {1 index /FID ne {def} {pop pop} ifelse} forall 285 | /Encoding WinAnsiEncoding def 286 | currentdict 287 | end 288 | /Courier-Oblique exch definefont pop 289 | /Times-Roman findfont 290 | dup length dict begin 291 | {1 index /FID ne {def} {pop pop} ifelse} forall 292 | /Encoding WinAnsiEncoding def 293 | currentdict 294 | end 295 | /Times-Roman exch definefont pop 296 | /Helvetica-BoldOblique findfont 297 | dup length dict begin 298 | {1 index /FID ne {def} {pop pop} ifelse} forall 299 | /Encoding WinAnsiEncoding def 300 | currentdict 301 | end 302 | /Helvetica-BoldOblique exch definefont pop 303 | /Helvetica-Bold findfont 304 | dup length dict begin 305 | {1 index /FID ne {def} {pop pop} ifelse} forall 306 | /Encoding WinAnsiEncoding def 307 | currentdict 308 | end 309 | /Helvetica-Bold exch definefont pop 310 | /Helvetica-Oblique findfont 311 | dup length dict begin 312 | {1 index /FID ne {def} {pop pop} ifelse} forall 313 | /Encoding WinAnsiEncoding def 314 | currentdict 315 | end 316 | /Helvetica-Oblique exch definefont pop 317 | /Times-BoldItalic findfont 318 | dup length dict begin 319 | {1 index /FID ne {def} {pop pop} ifelse} forall 320 | /Encoding WinAnsiEncoding def 321 | currentdict 322 | end 323 | /Times-BoldItalic exch definefont pop 324 | /Courier findfont 325 | dup length dict begin 326 | {1 index /FID ne {def} {pop pop} ifelse} forall 327 | /Encoding WinAnsiEncoding def 328 | currentdict 329 | end 330 | /Courier exch definefont pop 331 | /Times-Italic findfont 332 | dup length dict begin 333 | {1 index /FID ne {def} {pop pop} ifelse} forall 334 | /Encoding WinAnsiEncoding def 335 | currentdict 336 | end 337 | /Times-Italic exch definefont pop 338 | /Times-Bold findfont 339 | dup length dict begin 340 | {1 index /FID ne {def} {pop pop} ifelse} forall 341 | /Encoding WinAnsiEncoding def 342 | currentdict 343 | end 344 | /Times-Bold exch definefont pop 345 | %FOPEndFontReencode 346 | %%EndProlog 347 | %%Page: 1 1 348 | %%PageBoundingBox: 0 0 503 417 349 | %%BeginPageSetup 350 | [1 0 0 -1 0 417] CT 351 | %%EndPageSetup 352 | GS 353 | [0.75 0 0 0.75 0 0] CT 354 | 1 GC 355 | N 356 | 0 0 671 556 re 357 | f 358 | GR 359 | GS 360 | [0.75 0 0 0.75 0 0] CT 361 | 1 GC 362 | N 363 | 0 0 671 556 re 364 | f 365 | GR 366 | GS 367 | [0.75 0 0 0.75 0 0] CT 368 | 1 GC 369 | N 370 | 87 495 M 371 | 607 495 L 372 | 607 42 L 373 | 87 42 L 374 | cp 375 | f 376 | GR 377 | GS 378 | [0.75 0 0 0.75 254.25 399] CT 379 | 0.149 GC 380 | /Helvetica 15 F 381 | GS 382 | [1 0 0 1 0 0] CT 383 | 0 0 moveto 384 | 1 -1 scale 385 | (x) t 386 | GR 387 | GR 388 | GS 389 | [0.75 0 0 0.75 260.25 404.25] CT 390 | 0.149 GC 391 | /Helvetica 11 F 392 | GS 393 | [1 0 0 1 0 0] CT 394 | 0 0 moveto 395 | 1 -1 scale 396 | (1) t 397 | GR 398 | GR 399 | GS 400 | [0.75 0 0 0.75 0 0] CT 401 | 0.149 GC 402 | 2 setlinecap 403 | 10.0 ML 404 | N 405 | 87 495 M 406 | 607 495 L 407 | S 408 | GR 409 | GS 410 | [0.75 0 0 0.75 0 0] CT 411 | 0.149 GC 412 | 2 setlinecap 413 | 10.0 ML 414 | N 415 | 87 42 M 416 | 607 42 L 417 | S 418 | GR 419 | GS 420 | [0.75 0 0 0.75 0 0] CT 421 | 0.149 GC 422 | 2 setlinecap 423 | 10.0 ML 424 | N 425 | 87 495 M 426 | 87 489.8 L 427 | S 428 | GR 429 | GS 430 | [0.75 0 0 0.75 0 0] CT 431 | 0.149 GC 432 | 2 setlinecap 433 | 10.0 ML 434 | N 435 | 87 42 M 436 | 87 47.2 L 437 | S 438 | GR 439 | GS 440 | [0.75 0 0 0.75 0 0] CT 441 | 0.149 GC 442 | 2 setlinecap 443 | 10.0 ML 444 | N 445 | 173.667 495 M 446 | 173.667 489.8 L 447 | S 448 | GR 449 | GS 450 | [0.75 0 0 0.75 0 0] CT 451 | 0.149 GC 452 | 2 setlinecap 453 | 10.0 ML 454 | N 455 | 173.667 42 M 456 | 173.667 47.2 L 457 | S 458 | GR 459 | GS 460 | [0.75 0 0 0.75 0 0] CT 461 | 0.149 GC 462 | 2 setlinecap 463 | 10.0 ML 464 | N 465 | 260.333 495 M 466 | 260.333 489.8 L 467 | S 468 | GR 469 | GS 470 | [0.75 0 0 0.75 0 0] CT 471 | 0.149 GC 472 | 2 setlinecap 473 | 10.0 ML 474 | N 475 | 260.333 42 M 476 | 260.333 47.2 L 477 | S 478 | GR 479 | GS 480 | [0.75 0 0 0.75 0 0] CT 481 | 0.149 GC 482 | 2 setlinecap 483 | 10.0 ML 484 | N 485 | 347 495 M 486 | 347 489.8 L 487 | S 488 | GR 489 | GS 490 | [0.75 0 0 0.75 0 0] CT 491 | 0.149 GC 492 | 2 setlinecap 493 | 10.0 ML 494 | N 495 | 347 42 M 496 | 347 47.2 L 497 | S 498 | GR 499 | GS 500 | [0.75 0 0 0.75 0 0] CT 501 | 0.149 GC 502 | 2 setlinecap 503 | 10.0 ML 504 | N 505 | 433.667 495 M 506 | 433.667 489.8 L 507 | S 508 | GR 509 | GS 510 | [0.75 0 0 0.75 0 0] CT 511 | 0.149 GC 512 | 2 setlinecap 513 | 10.0 ML 514 | N 515 | 433.667 42 M 516 | 433.667 47.2 L 517 | S 518 | GR 519 | GS 520 | [0.75 0 0 0.75 0 0] CT 521 | 0.149 GC 522 | 2 setlinecap 523 | 10.0 ML 524 | N 525 | 520.333 495 M 526 | 520.333 489.8 L 527 | S 528 | GR 529 | GS 530 | [0.75 0 0 0.75 0 0] CT 531 | 0.149 GC 532 | 2 setlinecap 533 | 10.0 ML 534 | N 535 | 520.333 42 M 536 | 520.333 47.2 L 537 | S 538 | GR 539 | GS 540 | [0.75 0 0 0.75 0 0] CT 541 | 0.149 GC 542 | 2 setlinecap 543 | 10.0 ML 544 | N 545 | 607 495 M 546 | 607 489.8 L 547 | S 548 | GR 549 | GS 550 | [0.75 0 0 0.75 0 0] CT 551 | 0.149 GC 552 | 2 setlinecap 553 | 10.0 ML 554 | N 555 | 607 42 M 556 | 607 47.2 L 557 | S 558 | GR 559 | GS 560 | [0.75 0 0 0.75 65.25 375.24998] CT 561 | 0.149 GC 562 | /Helvetica 13 F 563 | GS 564 | [1 0 0 1 0 0] CT 565 | -3.615 13.07 moveto 566 | 1 -1 scale 567 | (0) t 568 | GR 569 | GR 570 | GS 571 | [0.75 0 0 0.75 130.25 375.24998] CT 572 | 0.149 GC 573 | /Helvetica 13 F 574 | GS 575 | [1 0 0 1 0 0] CT 576 | -9.036 13.07 moveto 577 | 1 -1 scale 578 | (0.2) t 579 | GR 580 | GR 581 | GS 582 | [0.75 0 0 0.75 195.25001 375.24998] CT 583 | 0.149 GC 584 | /Helvetica 13 F 585 | GS 586 | [1 0 0 1 0 0] CT 587 | -9.036 13.07 moveto 588 | 1 -1 scale 589 | (0.4) t 590 | GR 591 | GR 592 | GS 593 | [0.75 0 0 0.75 260.25 375.24998] CT 594 | 0.149 GC 595 | /Helvetica 13 F 596 | GS 597 | [1 0 0 1 0 0] CT 598 | -9.036 13.07 moveto 599 | 1 -1 scale 600 | (0.6) t 601 | GR 602 | GR 603 | GS 604 | [0.75 0 0 0.75 325.25002 375.24998] CT 605 | 0.149 GC 606 | /Helvetica 13 F 607 | GS 608 | [1 0 0 1 0 0] CT 609 | -9.036 13.07 moveto 610 | 1 -1 scale 611 | (0.8) t 612 | GR 613 | GR 614 | GS 615 | [0.75 0 0 0.75 390.24998 375.24998] CT 616 | 0.149 GC 617 | /Helvetica 13 F 618 | GS 619 | [1 0 0 1 0 0] CT 620 | -3.615 13.07 moveto 621 | 1 -1 scale 622 | (1) t 623 | GR 624 | GR 625 | GS 626 | [0.75 0 0 0.75 455.25 375.24998] CT 627 | 0.149 GC 628 | /Helvetica 13 F 629 | GS 630 | [1 0 0 1 0 0] CT 631 | -9.036 13.07 moveto 632 | 1 -1 scale 633 | (1.2) t 634 | GR 635 | GR 636 | GS 637 | [0 -0.75 0.75 0 34.5 207] CT 638 | 0.149 GC 639 | /Helvetica 15 F 640 | GS 641 | [1 0 0 1 0 0] CT 642 | 0 0 moveto 643 | 1 -1 scale 644 | (x) t 645 | GR 646 | GR 647 | GS 648 | [0 -0.75 0.75 0 39.75 201] CT 649 | 0.149 GC 650 | /Helvetica 11 F 651 | GS 652 | [1 0 0 1 0 0] CT 653 | 0 0 moveto 654 | 1 -1 scale 655 | (2) t 656 | GR 657 | GR 658 | GS 659 | [0.75 0 0 0.75 0 0] CT 660 | 0.149 GC 661 | 2 setlinecap 662 | 10.0 ML 663 | N 664 | 87 495 M 665 | 87 42 L 666 | S 667 | GR 668 | GS 669 | [0.75 0 0 0.75 0 0] CT 670 | 0.149 GC 671 | 2 setlinecap 672 | 10.0 ML 673 | N 674 | 607 495 M 675 | 607 42 L 676 | S 677 | GR 678 | GS 679 | [0.75 0 0 0.75 0 0] CT 680 | 0.149 GC 681 | 2 setlinecap 682 | 10.0 ML 683 | N 684 | 87 495 M 685 | 92.2 495 L 686 | S 687 | GR 688 | GS 689 | [0.75 0 0 0.75 0 0] CT 690 | 0.149 GC 691 | 2 setlinecap 692 | 10.0 ML 693 | N 694 | 607 495 M 695 | 601.8 495 L 696 | S 697 | GR 698 | GS 699 | [0.75 0 0 0.75 0 0] CT 700 | 0.149 GC 701 | 2 setlinecap 702 | 10.0 ML 703 | N 704 | 87 404.4 M 705 | 92.2 404.4 L 706 | S 707 | GR 708 | GS 709 | [0.75 0 0 0.75 0 0] CT 710 | 0.149 GC 711 | 2 setlinecap 712 | 10.0 ML 713 | N 714 | 607 404.4 M 715 | 601.8 404.4 L 716 | S 717 | GR 718 | GS 719 | [0.75 0 0 0.75 0 0] CT 720 | 0.149 GC 721 | 2 setlinecap 722 | 10.0 ML 723 | N 724 | 87 313.8 M 725 | 92.2 313.8 L 726 | S 727 | GR 728 | GS 729 | [0.75 0 0 0.75 0 0] CT 730 | 0.149 GC 731 | 2 setlinecap 732 | 10.0 ML 733 | N 734 | 607 313.8 M 735 | 601.8 313.8 L 736 | S 737 | GR 738 | GS 739 | [0.75 0 0 0.75 0 0] CT 740 | 0.149 GC 741 | 2 setlinecap 742 | 10.0 ML 743 | N 744 | 87 223.2 M 745 | 92.2 223.2 L 746 | S 747 | GR 748 | GS 749 | [0.75 0 0 0.75 0 0] CT 750 | 0.149 GC 751 | 2 setlinecap 752 | 10.0 ML 753 | N 754 | 607 223.2 M 755 | 601.8 223.2 L 756 | S 757 | GR 758 | GS 759 | [0.75 0 0 0.75 0 0] CT 760 | 0.149 GC 761 | 2 setlinecap 762 | 10.0 ML 763 | N 764 | 87 132.6 M 765 | 92.2 132.6 L 766 | S 767 | GR 768 | GS 769 | [0.75 0 0 0.75 0 0] CT 770 | 0.149 GC 771 | 2 setlinecap 772 | 10.0 ML 773 | N 774 | 607 132.6 M 775 | 601.8 132.6 L 776 | S 777 | GR 778 | GS 779 | [0.75 0 0 0.75 0 0] CT 780 | 0.149 GC 781 | 2 setlinecap 782 | 10.0 ML 783 | N 784 | 87 42 M 785 | 92.2 42 L 786 | S 787 | GR 788 | GS 789 | [0.75 0 0 0.75 0 0] CT 790 | 0.149 GC 791 | 2 setlinecap 792 | 10.0 ML 793 | N 794 | 607 42 M 795 | 601.8 42 L 796 | S 797 | GR 798 | GS 799 | [0.75 0 0 0.75 61.25 371.25] CT 800 | 0.149 GC 801 | /Helvetica 13 F 802 | GS 803 | [1 0 0 1 0 0] CT 804 | -11.559 5.394 moveto 805 | 1 -1 scale 806 | (-1) t 807 | GR 808 | GR 809 | GS 810 | [0.75 0 0 0.75 61.25 303.3] CT 811 | 0.149 GC 812 | /Helvetica 13 F 813 | GS 814 | [1 0 0 1 0 0] CT 815 | -22.401 5.394 moveto 816 | 1 -1 scale 817 | (-0.5) t 818 | GR 819 | GR 820 | GS 821 | [0.75 0 0 0.75 61.25 235.34999] CT 822 | 0.149 GC 823 | /Helvetica 13 F 824 | GS 825 | [1 0 0 1 0 0] CT 826 | -7.23 5.394 moveto 827 | 1 -1 scale 828 | (0) t 829 | GR 830 | GR 831 | GS 832 | [0.75 0 0 0.75 61.25 167.4] CT 833 | 0.149 GC 834 | /Helvetica 13 F 835 | GS 836 | [1 0 0 1 0 0] CT 837 | -18.072 5.394 moveto 838 | 1 -1 scale 839 | (0.5) t 840 | GR 841 | GR 842 | GS 843 | [0.75 0 0 0.75 61.25 99.45] CT 844 | 0.149 GC 845 | /Helvetica 13 F 846 | GS 847 | [1 0 0 1 0 0] CT 848 | -7.23 5.394 moveto 849 | 1 -1 scale 850 | (1) t 851 | GR 852 | GR 853 | GS 854 | [0.75 0 0 0.75 61.25 31.5] CT 855 | 0.149 GC 856 | /Helvetica 13 F 857 | GS 858 | [1 0 0 1 0 0] CT 859 | -18.072 5.394 moveto 860 | 1 -1 scale 861 | (1.5) t 862 | GR 863 | GR 864 | GS 865 | [0.75 0 0 0.75 0 0] CT 866 | 0 0 1 RC 867 | [8 3 2 3] 0 setdash 868 | 2 LJ 869 | N 870 | 383.16 429.18 M 871 | 347.3 401.976 L 872 | 347.178 361.846 L 873 | 347.082 330.001 L 874 | 347.006 304.731 L 875 | 346.946 284.68 L 876 | 346.898 268.769 L 877 | 346.86 256.143 L 878 | 346.83 246.124 L 879 | 346.806 238.174 L 880 | 346.787 231.866 L 881 | 346.772 226.86 L 882 | 346.76 222.888 L 883 | 346.751 219.736 L 884 | 346.743 217.235 L 885 | 346.737 215.25 L 886 | 346.733 213.675 L 887 | 346.729 212.425 L 888 | 346.726 211.434 L 889 | 346.724 210.647 L 890 | 346.722 210.023 L 891 | 346.72 209.527 L 892 | 346.719 209.134 L 893 | 346.718 208.822 L 894 | 346.717 208.574 L 895 | 346.717 208.378 L 896 | 346.716 208.222 L 897 | 346.716 208.098 L 898 | 346.716 208 L 899 | 346.715 207.922 L 900 | 346.715 207.861 L 901 | 346.715 207.812 L 902 | 346.715 207.773 L 903 | 346.715 207.742 L 904 | 346.715 207.717 L 905 | 346.715 207.698 L 906 | 346.715 207.682 L 907 | 346.715 207.67 L 908 | 561.074 78.24 L 909 | 575.36 78.24 L 910 | 587.648 78.24 L 911 | 598.217 78.24 L 912 | 606.36 78.812 L 913 | 606.375 83.485 L 914 | 606.386 87.194 L 915 | 606.395 90.137 L 916 | 606.402 92.472 L 917 | 606.408 94.325 L 918 | 606.412 95.795 L 919 | 606.416 96.962 L 920 | 606.418 97.888 L 921 | 606.42 98.623 L 922 | 606.422 99.206 L 923 | 606.424 99.668 L 924 | 606.425 100.035 L 925 | 606.426 100.327 L 926 | 606.426 100.558 L 927 | 606.427 100.741 L 928 | 606.427 100.887 L 929 | 606.428 101.002 L 930 | 606.428 101.094 L 931 | 606.428 101.167 L 932 | 606.428 101.224 L 933 | 606.428 101.27 L 934 | 606.429 101.306 L 935 | 606.429 101.335 L 936 | 260.361 310.298 L 937 | 260.303 296.413 L 938 | 260.27 285.387 L 939 | 260.244 276.638 L 940 | 260.223 269.695 L 941 | 260.207 264.186 L 942 | 260.193 259.815 L 943 | 260.183 256.346 L 944 | 260.175 253.593 L 945 | 260.168 251.409 L 946 | 260.163 249.676 L 947 | 260.159 248.301 L 948 | 260.156 247.209 L 949 | 260.153 246.343 L 950 | 260.151 245.656 L 951 | 260.149 245.111 L 952 | 260.148 244.678 L 953 | 260.147 244.335 L 954 | 260.146 244.062 L 955 | 260.145 243.846 L 956 | 260.145 243.675 L 957 | 260.145 243.538 L 958 | 260.144 243.43 L 959 | 260.144 243.345 L 960 | 260.144 243.277 L 961 | 260.144 243.223 L 962 | 260.143 243.18 L 963 | 260.143 243.146 L 964 | 260.143 243.119 L 965 | 260.143 243.098 L 966 | 260.143 243.081 L 967 | 260.143 243.067 L 968 | 260.143 243.056 L 969 | 260.143 243.048 L 970 | S 971 | GR 972 | GS 973 | [0.75 0 0 0.75 0 0] CT 974 | 0 1 0 RC 975 | [10 6] 0 setdash 976 | 2 LJ 977 | N 978 | 94.021 220.011 M 979 | 346.339 86.458 L 980 | 346.425 111.471 L 981 | 346.485 131.325 L 982 | 346.533 147.08 L 983 | 346.57 159.581 L 984 | 346.6 169.501 L 985 | 346.624 177.373 L 986 | 346.642 183.619 L 987 | 346.657 188.576 L 988 | 346.669 192.509 L 989 | 346.678 195.63 L 990 | 346.686 198.106 L 991 | 346.692 200.071 L 992 | 346.696 201.631 L 993 | 346.7 202.868 L 994 | 346.703 203.85 L 995 | 346.705 204.629 L 996 | 346.707 205.247 L 997 | 346.709 205.738 L 998 | 346.71 206.127 L 999 | 346.711 206.436 L 1000 | 346.712 206.681 L 1001 | 346.712 206.876 L 1002 | 346.713 207.03 L 1003 | 346.713 207.152 L 1004 | 346.713 207.25 L 1005 | 346.714 207.327 L 1006 | 346.714 207.388 L 1007 | 346.714 207.436 L 1008 | 346.714 207.475 L 1009 | 346.714 207.506 L 1010 | 346.714 207.53 L 1011 | 346.714 207.549 L 1012 | 346.714 207.564 L 1013 | 346.714 207.576 L 1014 | 346.714 207.586 L 1015 | 346.714 207.594 L 1016 | 560.973 78.24 L 1017 | 575.274 78.24 L 1018 | 587.574 78.24 L 1019 | 598.153 78.24 L 1020 | 606.36 78.779 L 1021 | 606.375 83.459 L 1022 | 606.386 87.173 L 1023 | 606.395 90.12 L 1024 | 606.402 92.459 L 1025 | 606.408 94.315 L 1026 | 606.412 95.787 L 1027 | 606.415 96.956 L 1028 | 606.418 97.883 L 1029 | 606.42 98.619 L 1030 | 606.422 99.202 L 1031 | 606.424 99.666 L 1032 | 606.425 100.033 L 1033 | 606.426 100.325 L 1034 | 606.426 100.557 L 1035 | 606.427 100.74 L 1036 | 606.427 100.886 L 1037 | 606.428 101.002 L 1038 | 606.428 101.093 L 1039 | 606.428 101.166 L 1040 | 606.428 101.224 L 1041 | 606.428 101.27 L 1042 | 606.429 101.306 L 1043 | 606.429 101.335 L 1044 | 260.361 310.298 L 1045 | 260.303 296.413 L 1046 | 260.27 285.387 L 1047 | 260.244 276.638 L 1048 | 260.223 269.695 L 1049 | 260.207 264.186 L 1050 | 260.193 259.815 L 1051 | 260.183 256.346 L 1052 | 260.175 253.593 L 1053 | 260.168 251.409 L 1054 | 260.163 249.676 L 1055 | 260.159 248.301 L 1056 | 260.156 247.209 L 1057 | 260.153 246.343 L 1058 | 260.151 245.656 L 1059 | 260.149 245.111 L 1060 | 260.148 244.678 L 1061 | 260.147 244.335 L 1062 | 260.146 244.062 L 1063 | 260.145 243.846 L 1064 | 260.145 243.675 L 1065 | 260.145 243.538 L 1066 | 260.144 243.43 L 1067 | 260.144 243.345 L 1068 | 260.144 243.277 L 1069 | 260.144 243.223 L 1070 | 260.143 243.18 L 1071 | 260.143 243.146 L 1072 | 260.143 243.119 L 1073 | 260.143 243.098 L 1074 | 260.143 243.081 L 1075 | 260.143 243.067 L 1076 | 260.143 243.056 L 1077 | 260.143 243.048 L 1078 | S 1079 | GR 1080 | GS 1081 | [0.75 0 0 0.75 0 0] CT 1082 | 1 0 0 RC 1083 | [8 3 2 3] 0 setdash 1084 | 2 LJ 1085 | N 1086 | 547.745 97.419 M 1087 | 346.774 224.544 L 1088 | 346.755 221.055 L 1089 | 346.747 218.281 L 1090 | 346.74 216.081 L 1091 | 346.735 214.334 L 1092 | 346.73 212.948 L 1093 | 346.727 211.849 L 1094 | 346.725 210.976 L 1095 | 346.722 210.284 L 1096 | 346.721 209.734 L 1097 | 346.72 209.298 L 1098 | 346.718 208.953 L 1099 | 346.718 208.678 L 1100 | 346.717 208.46 L 1101 | 346.716 208.287 L 1102 | 346.716 208.15 L 1103 | 346.716 208.041 L 1104 | 346.715 207.955 L 1105 | 346.715 207.886 L 1106 | 346.715 207.832 L 1107 | 346.715 207.789 L 1108 | 346.715 207.755 L 1109 | 346.715 207.727 L 1110 | 346.715 207.706 L 1111 | 346.715 207.689 L 1112 | 346.715 207.675 L 1113 | 346.715 207.664 L 1114 | 346.715 207.656 L 1115 | 346.715 207.649 L 1116 | 346.715 207.644 L 1117 | 346.715 207.639 L 1118 | 346.715 207.636 L 1119 | 346.715 207.633 L 1120 | 346.715 207.631 L 1121 | 346.715 207.63 L 1122 | 346.715 207.628 L 1123 | 346.715 207.627 L 1124 | 561.017 78.24 L 1125 | 575.312 78.24 L 1126 | 587.606 78.24 L 1127 | 598.181 78.24 L 1128 | 606.36 78.793 L 1129 | 606.375 83.47 L 1130 | 606.386 87.182 L 1131 | 606.395 90.127 L 1132 | 606.402 92.465 L 1133 | 606.408 94.319 L 1134 | 606.412 95.791 L 1135 | 606.415 96.959 L 1136 | 606.418 97.885 L 1137 | 606.42 98.62 L 1138 | 606.422 99.204 L 1139 | 606.424 99.667 L 1140 | 606.425 100.034 L 1141 | 606.426 100.326 L 1142 | 606.426 100.557 L 1143 | 606.427 100.741 L 1144 | 606.427 100.886 L 1145 | 606.428 101.002 L 1146 | 606.428 101.094 L 1147 | 606.428 101.166 L 1148 | 606.428 101.224 L 1149 | 606.428 101.27 L 1150 | 606.429 101.306 L 1151 | 606.429 101.335 L 1152 | 260.361 310.298 L 1153 | 260.303 296.413 L 1154 | 260.27 285.387 L 1155 | 260.244 276.638 L 1156 | 260.223 269.695 L 1157 | 260.207 264.186 L 1158 | 260.193 259.815 L 1159 | 260.183 256.346 L 1160 | 260.175 253.593 L 1161 | 260.168 251.409 L 1162 | 260.163 249.676 L 1163 | 260.159 248.301 L 1164 | 260.156 247.209 L 1165 | 260.153 246.343 L 1166 | 260.151 245.656 L 1167 | 260.149 245.111 L 1168 | 260.148 244.678 L 1169 | 260.147 244.335 L 1170 | 260.146 244.062 L 1171 | 260.145 243.846 L 1172 | 260.145 243.675 L 1173 | 260.145 243.538 L 1174 | 260.144 243.43 L 1175 | 260.144 243.345 L 1176 | 260.144 243.277 L 1177 | 260.144 243.223 L 1178 | 260.143 243.18 L 1179 | 260.143 243.146 L 1180 | 260.143 243.119 L 1181 | 260.143 243.098 L 1182 | 260.143 243.081 L 1183 | 260.143 243.067 L 1184 | 260.143 243.056 L 1185 | 260.143 243.048 L 1186 | S 1187 | GR 1188 | GS 1189 | [0.75 0 0 0.75 0 0] CT 1190 | 0 1 1 RC 1191 | [10 6] 0 setdash 1192 | 2 LJ 1193 | N 1194 | 142.651 484.051 M 1195 | 347.045 320.772 L 1196 | 346.984 297.403 L 1197 | 346.929 278.865 L 1198 | 346.884 264.154 L 1199 | 346.849 252.481 L 1200 | 346.821 243.219 L 1201 | 346.799 235.869 L 1202 | 346.782 230.036 L 1203 | 346.768 225.408 L 1204 | 346.757 221.736 L 1205 | 346.748 218.822 L 1206 | 346.741 216.509 L 1207 | 346.736 214.674 L 1208 | 346.731 213.218 L 1209 | 346.728 212.063 L 1210 | 346.725 211.146 L 1211 | 346.723 210.419 L 1212 | 346.721 209.841 L 1213 | 346.72 209.383 L 1214 | 346.719 209.02 L 1215 | 346.718 208.731 L 1216 | 346.717 208.503 L 1217 | 346.717 208.321 L 1218 | 346.716 208.177 L 1219 | 346.716 208.063 L 1220 | 346.716 207.972 L 1221 | 346.715 207.9 L 1222 | 346.715 207.843 L 1223 | 346.715 207.797 L 1224 | 346.715 207.761 L 1225 | 346.715 207.733 L 1226 | 346.715 207.71 L 1227 | 346.715 207.692 L 1228 | 346.715 207.678 L 1229 | 346.715 207.667 L 1230 | 346.715 207.658 L 1231 | 346.715 207.65 L 1232 | 561.048 78.24 L 1233 | 575.338 78.24 L 1234 | 587.629 78.24 L 1235 | 598.2 78.24 L 1236 | 606.36 78.803 L 1237 | 606.375 83.478 L 1238 | 606.386 87.188 L 1239 | 606.395 90.132 L 1240 | 606.402 92.469 L 1241 | 606.408 94.322 L 1242 | 606.412 95.793 L 1243 | 606.416 96.961 L 1244 | 606.418 97.887 L 1245 | 606.42 98.622 L 1246 | 606.422 99.205 L 1247 | 606.424 99.668 L 1248 | 606.425 100.035 L 1249 | 606.426 100.326 L 1250 | 606.426 100.558 L 1251 | 606.427 100.741 L 1252 | 606.427 100.887 L 1253 | 606.428 101.002 L 1254 | 606.428 101.094 L 1255 | 606.428 101.167 L 1256 | 606.428 101.224 L 1257 | 606.428 101.27 L 1258 | 606.429 101.306 L 1259 | 606.429 101.335 L 1260 | 260.361 310.298 L 1261 | 260.303 296.413 L 1262 | 260.27 285.387 L 1263 | 260.244 276.638 L 1264 | 260.223 269.695 L 1265 | 260.207 264.186 L 1266 | 260.193 259.815 L 1267 | 260.183 256.346 L 1268 | 260.175 253.593 L 1269 | 260.168 251.409 L 1270 | 260.163 249.676 L 1271 | 260.159 248.301 L 1272 | 260.156 247.209 L 1273 | 260.153 246.343 L 1274 | 260.151 245.656 L 1275 | 260.149 245.111 L 1276 | 260.148 244.678 L 1277 | 260.147 244.335 L 1278 | 260.146 244.062 L 1279 | 260.145 243.846 L 1280 | 260.145 243.675 L 1281 | 260.145 243.538 L 1282 | 260.144 243.43 L 1283 | 260.144 243.345 L 1284 | 260.144 243.277 L 1285 | 260.144 243.223 L 1286 | 260.143 243.18 L 1287 | 260.143 243.146 L 1288 | 260.143 243.119 L 1289 | 260.143 243.098 L 1290 | 260.143 243.081 L 1291 | 260.143 243.067 L 1292 | 260.143 243.056 L 1293 | 260.143 243.048 L 1294 | S 1295 | GR 1296 | GS 1297 | [0.75 0 0 0.75 0 0] CT 1298 | 1 0 1 RC 1299 | [2 2] 0 setdash 1300 | 2 LJ 1301 | 2 LW 1302 | N 1303 | 347 205.08 M 1304 | 347 205.08 L 1305 | 347 205.08 L 1306 | 347 205.08 L 1307 | 347 205.08 L 1308 | 347 205.08 L 1309 | 347 205.08 L 1310 | 347 205.08 L 1311 | 347 205.08 L 1312 | 347 205.08 L 1313 | 347 205.08 L 1314 | 347 205.08 L 1315 | 347 205.08 L 1316 | 347 205.08 L 1317 | 347 205.08 L 1318 | 347 205.08 L 1319 | 347 205.08 L 1320 | 347 205.08 L 1321 | 347 205.08 L 1322 | 347 205.08 L 1323 | 347 205.08 L 1324 | 347 205.08 L 1325 | 347 205.08 L 1326 | 347 205.08 L 1327 | 347 205.08 L 1328 | 347 205.08 L 1329 | 347 205.08 L 1330 | 347 205.08 L 1331 | 347 205.08 L 1332 | 347 205.08 L 1333 | 347 205.08 L 1334 | 347 205.08 L 1335 | 347 205.08 L 1336 | 347 205.08 L 1337 | 347 205.08 L 1338 | 347 205.08 L 1339 | 347 205.08 L 1340 | 607 96.36 L 1341 | 607 96.36 L 1342 | 607 96.36 L 1343 | 607 96.36 L 1344 | 607 96.36 L 1345 | 607 96.36 L 1346 | 607 96.36 L 1347 | 607 96.36 L 1348 | 607 96.36 L 1349 | 607 96.36 L 1350 | 607 96.36 L 1351 | 607 96.36 L 1352 | 607 96.36 L 1353 | 607 96.36 L 1354 | 607 96.36 L 1355 | 607 96.36 L 1356 | 607 96.36 L 1357 | 607 96.36 L 1358 | 607 96.36 L 1359 | 607 96.36 L 1360 | 607 96.36 L 1361 | 607 96.36 L 1362 | 607 96.36 L 1363 | 607 96.36 L 1364 | 607 96.36 L 1365 | 607 96.36 L 1366 | 607 96.36 L 1367 | 607 96.36 L 1368 | 260.333 241.32 L 1369 | 260.333 241.32 L 1370 | 260.333 241.32 L 1371 | 260.333 241.32 L 1372 | 260.333 241.32 L 1373 | 260.333 241.32 L 1374 | 260.333 241.32 L 1375 | 260.333 241.32 L 1376 | 260.333 241.32 L 1377 | 260.333 241.32 L 1378 | 260.333 241.32 L 1379 | 260.333 241.32 L 1380 | 260.333 241.32 L 1381 | 260.333 241.32 L 1382 | 260.333 241.32 L 1383 | 260.333 241.32 L 1384 | 260.333 241.32 L 1385 | 260.333 241.32 L 1386 | 260.333 241.32 L 1387 | 260.333 241.32 L 1388 | 260.333 241.32 L 1389 | 260.333 241.32 L 1390 | 260.333 241.32 L 1391 | 260.333 241.32 L 1392 | 260.333 241.32 L 1393 | 260.333 241.32 L 1394 | 260.333 241.32 L 1395 | 260.333 241.32 L 1396 | 260.333 241.32 L 1397 | 260.333 241.32 L 1398 | 260.333 241.32 L 1399 | 260.333 241.32 L 1400 | 260.333 241.32 L 1401 | 260.333 241.32 L 1402 | 260.333 241.32 L 1403 | S 1404 | GR 1405 | GS 1406 | [0.75 0 0 0.75 0 0] CT 1407 | 0 0 1 RC 1408 | 2 setlinecap 1409 | 10.0 ML 1410 | N 1411 | 379 429.5 M 1412 | 388 429.5 L 1413 | S 1414 | GR 1415 | GS 1416 | [0.75 0 0 0.75 0 0] CT 1417 | 0 0 1 RC 1418 | 2 setlinecap 1419 | 10.0 ML 1420 | N 1421 | 383.5 434 M 1422 | 383.5 425 L 1423 | S 1424 | GR 1425 | GS 1426 | [0.75 0 0 0.75 0 0] CT 1427 | 0 0 1 RC 1428 | 2 setlinecap 1429 | 10.0 ML 1430 | N 1431 | 380 433 M 1432 | 387 426 L 1433 | S 1434 | GR 1435 | GS 1436 | [0.75 0 0 0.75 0 0] CT 1437 | 0 0 1 RC 1438 | 2 setlinecap 1439 | 10.0 ML 1440 | N 1441 | 380 426 M 1442 | 387 433 L 1443 | S 1444 | GR 1445 | GS 1446 | [0.75 0 0 0.75 0 0] CT 1447 | 0 0 1 RC 1448 | N 1449 | 260.5 243.5 M 1450 | 267.833 243.5 L 1451 | 266.851 239.833 L 1452 | cp 1453 | f 1454 | GR 1455 | GS 1456 | [0.75 0 0 0.75 0 0] CT 1457 | 0 0 1 RC 1458 | N 1459 | 260.5 243.5 M 1460 | 266.851 239.833 L 1461 | 264.167 237.149 L 1462 | cp 1463 | f 1464 | GR 1465 | GS 1466 | [0.75 0 0 0.75 0 0] CT 1467 | 0 0 1 RC 1468 | N 1469 | 260.5 243.5 M 1470 | 264.167 237.149 L 1471 | 260.5 236.167 L 1472 | cp 1473 | f 1474 | GR 1475 | GS 1476 | [0.75 0 0 0.75 0 0] CT 1477 | 0 0 1 RC 1478 | N 1479 | 260.5 243.5 M 1480 | 260.5 236.167 L 1481 | 256.833 237.149 L 1482 | cp 1483 | f 1484 | GR 1485 | GS 1486 | [0.75 0 0 0.75 0 0] CT 1487 | 0 0 1 RC 1488 | N 1489 | 260.5 243.5 M 1490 | 256.833 237.149 L 1491 | 254.149 239.833 L 1492 | cp 1493 | f 1494 | GR 1495 | GS 1496 | [0.75 0 0 0.75 0 0] CT 1497 | 0 0 1 RC 1498 | N 1499 | 260.5 243.5 M 1500 | 254.149 239.833 L 1501 | 253.167 243.5 L 1502 | cp 1503 | f 1504 | GR 1505 | GS 1506 | [0.75 0 0 0.75 0 0] CT 1507 | 0 0 1 RC 1508 | N 1509 | 260.5 243.5 M 1510 | 253.167 243.5 L 1511 | 254.149 247.167 L 1512 | cp 1513 | f 1514 | GR 1515 | GS 1516 | [0.75 0 0 0.75 0 0] CT 1517 | 0 0 1 RC 1518 | N 1519 | 260.5 243.5 M 1520 | 254.149 247.167 L 1521 | 256.833 249.851 L 1522 | cp 1523 | f 1524 | GR 1525 | GS 1526 | [0.75 0 0 0.75 0 0] CT 1527 | 0 0 1 RC 1528 | N 1529 | 260.5 243.5 M 1530 | 256.833 249.851 L 1531 | 260.5 250.833 L 1532 | cp 1533 | f 1534 | GR 1535 | GS 1536 | [0.75 0 0 0.75 0 0] CT 1537 | 0 0 1 RC 1538 | N 1539 | 260.5 243.5 M 1540 | 260.5 250.833 L 1541 | 264.167 249.851 L 1542 | cp 1543 | f 1544 | GR 1545 | GS 1546 | [0.75 0 0 0.75 0 0] CT 1547 | 0 0 1 RC 1548 | N 1549 | 260.5 243.5 M 1550 | 264.167 249.851 L 1551 | 266.851 247.167 L 1552 | cp 1553 | f 1554 | GR 1555 | GS 1556 | [0.75 0 0 0.75 0 0] CT 1557 | 0 0 1 RC 1558 | N 1559 | 260.5 243.5 M 1560 | 266.851 247.167 L 1561 | 267.833 243.5 L 1562 | cp 1563 | f 1564 | GR 1565 | GS 1566 | [0.75 0 0 0.75 0 0] CT 1567 | 0 0 1 RC 1568 | 2 setlinecap 1569 | 10.0 ML 1570 | N 1571 | 267.833 243.5 M 1572 | 266.851 239.833 L 1573 | 264.167 237.149 L 1574 | 260.5 236.167 L 1575 | 256.833 237.149 L 1576 | 254.149 239.833 L 1577 | 253.167 243.5 L 1578 | 254.149 247.167 L 1579 | 256.833 249.851 L 1580 | 260.5 250.833 L 1581 | 264.167 249.851 L 1582 | 266.851 247.167 L 1583 | 267.833 243.5 L 1584 | S 1585 | GR 1586 | GS 1587 | [0.75 0 0 0.75 0 0] CT 1588 | 0 1 0 RC 1589 | 2 setlinecap 1590 | 10.0 ML 1591 | N 1592 | 90 220.5 M 1593 | 99 220.5 L 1594 | S 1595 | GR 1596 | GS 1597 | [0.75 0 0 0.75 0 0] CT 1598 | 0 1 0 RC 1599 | 2 setlinecap 1600 | 10.0 ML 1601 | N 1602 | 94.5 225 M 1603 | 94.5 216 L 1604 | S 1605 | GR 1606 | GS 1607 | [0.75 0 0 0.75 0 0] CT 1608 | 0 1 0 RC 1609 | 2 setlinecap 1610 | 10.0 ML 1611 | N 1612 | 91 224 M 1613 | 98 217 L 1614 | S 1615 | GR 1616 | GS 1617 | [0.75 0 0 0.75 0 0] CT 1618 | 0 1 0 RC 1619 | 2 setlinecap 1620 | 10.0 ML 1621 | N 1622 | 91 217 M 1623 | 98 224 L 1624 | S 1625 | GR 1626 | GS 1627 | [0.75 0 0 0.75 0 0] CT 1628 | 0 1 0 RC 1629 | N 1630 | 260.5 243.5 M 1631 | 266.5 243.5 L 1632 | 265.354 239.973 L 1633 | cp 1634 | f 1635 | GR 1636 | GS 1637 | [0.75 0 0 0.75 0 0] CT 1638 | 0 1 0 RC 1639 | N 1640 | 260.5 243.5 M 1641 | 265.354 239.973 L 1642 | 262.354 237.794 L 1643 | cp 1644 | f 1645 | GR 1646 | GS 1647 | [0.75 0 0 0.75 0 0] CT 1648 | 0 1 0 RC 1649 | N 1650 | 260.5 243.5 M 1651 | 262.354 237.794 L 1652 | 258.646 237.794 L 1653 | cp 1654 | f 1655 | GR 1656 | GS 1657 | [0.75 0 0 0.75 0 0] CT 1658 | 0 1 0 RC 1659 | N 1660 | 260.5 243.5 M 1661 | 258.646 237.794 L 1662 | 255.646 239.973 L 1663 | cp 1664 | f 1665 | GR 1666 | GS 1667 | [0.75 0 0 0.75 0 0] CT 1668 | 0 1 0 RC 1669 | N 1670 | 260.5 243.5 M 1671 | 255.646 239.973 L 1672 | 254.5 243.5 L 1673 | cp 1674 | f 1675 | GR 1676 | GS 1677 | [0.75 0 0 0.75 0 0] CT 1678 | 0 1 0 RC 1679 | N 1680 | 260.5 243.5 M 1681 | 254.5 243.5 L 1682 | 255.646 247.027 L 1683 | cp 1684 | f 1685 | GR 1686 | GS 1687 | [0.75 0 0 0.75 0 0] CT 1688 | 0 1 0 RC 1689 | N 1690 | 260.5 243.5 M 1691 | 255.646 247.027 L 1692 | 258.646 249.206 L 1693 | cp 1694 | f 1695 | GR 1696 | GS 1697 | [0.75 0 0 0.75 0 0] CT 1698 | 0 1 0 RC 1699 | N 1700 | 260.5 243.5 M 1701 | 258.646 249.206 L 1702 | 262.354 249.206 L 1703 | cp 1704 | f 1705 | GR 1706 | GS 1707 | [0.75 0 0 0.75 0 0] CT 1708 | 0 1 0 RC 1709 | N 1710 | 260.5 243.5 M 1711 | 262.354 249.206 L 1712 | 265.354 247.027 L 1713 | cp 1714 | f 1715 | GR 1716 | GS 1717 | [0.75 0 0 0.75 0 0] CT 1718 | 0 1 0 RC 1719 | N 1720 | 260.5 243.5 M 1721 | 265.354 247.027 L 1722 | 266.5 243.5 L 1723 | cp 1724 | f 1725 | GR 1726 | GS 1727 | [0.75 0 0 0.75 0 0] CT 1728 | 0 1 0 RC 1729 | 2 setlinecap 1730 | 10.0 ML 1731 | N 1732 | 266.5 243.5 M 1733 | 265.696 240.5 L 1734 | 263.5 238.304 L 1735 | 260.5 237.5 L 1736 | 257.5 238.304 L 1737 | 255.304 240.5 L 1738 | 254.5 243.5 L 1739 | 255.304 246.5 L 1740 | 257.5 248.696 L 1741 | 260.5 249.5 L 1742 | 263.5 248.696 L 1743 | 265.696 246.5 L 1744 | 266.5 243.5 L 1745 | S 1746 | GR 1747 | GS 1748 | [0.75 0 0 0.75 0 0] CT 1749 | 1 0 0 RC 1750 | 2 setlinecap 1751 | 10.0 ML 1752 | N 1753 | 543 97.5 M 1754 | 552 97.5 L 1755 | S 1756 | GR 1757 | GS 1758 | [0.75 0 0 0.75 0 0] CT 1759 | 1 0 0 RC 1760 | 2 setlinecap 1761 | 10.0 ML 1762 | N 1763 | 547.5 102 M 1764 | 547.5 93 L 1765 | S 1766 | GR 1767 | GS 1768 | [0.75 0 0 0.75 0 0] CT 1769 | 1 0 0 RC 1770 | 2 setlinecap 1771 | 10.0 ML 1772 | N 1773 | 544 101 M 1774 | 551 94 L 1775 | S 1776 | GR 1777 | GS 1778 | [0.75 0 0 0.75 0 0] CT 1779 | 1 0 0 RC 1780 | 2 setlinecap 1781 | 10.0 ML 1782 | N 1783 | 544 94 M 1784 | 551 101 L 1785 | S 1786 | GR 1787 | GS 1788 | [0.75 0 0 0.75 0 0] CT 1789 | 1 0 0 RC 1790 | N 1791 | 260.5 243.5 M 1792 | 265.167 243.5 L 1793 | 264.275 240.757 L 1794 | cp 1795 | f 1796 | GR 1797 | GS 1798 | [0.75 0 0 0.75 0 0] CT 1799 | 1 0 0 RC 1800 | N 1801 | 260.5 243.5 M 1802 | 264.275 240.757 L 1803 | 261.942 239.062 L 1804 | cp 1805 | f 1806 | GR 1807 | GS 1808 | [0.75 0 0 0.75 0 0] CT 1809 | 1 0 0 RC 1810 | N 1811 | 260.5 243.5 M 1812 | 261.942 239.062 L 1813 | 259.058 239.062 L 1814 | cp 1815 | f 1816 | GR 1817 | GS 1818 | [0.75 0 0 0.75 0 0] CT 1819 | 1 0 0 RC 1820 | N 1821 | 260.5 243.5 M 1822 | 259.058 239.062 L 1823 | 256.725 240.757 L 1824 | cp 1825 | f 1826 | GR 1827 | GS 1828 | [0.75 0 0 0.75 0 0] CT 1829 | 1 0 0 RC 1830 | N 1831 | 260.5 243.5 M 1832 | 256.725 240.757 L 1833 | 255.833 243.5 L 1834 | cp 1835 | f 1836 | GR 1837 | GS 1838 | [0.75 0 0 0.75 0 0] CT 1839 | 1 0 0 RC 1840 | N 1841 | 260.5 243.5 M 1842 | 255.833 243.5 L 1843 | 256.725 246.243 L 1844 | cp 1845 | f 1846 | GR 1847 | GS 1848 | [0.75 0 0 0.75 0 0] CT 1849 | 1 0 0 RC 1850 | N 1851 | 260.5 243.5 M 1852 | 256.725 246.243 L 1853 | 259.058 247.938 L 1854 | cp 1855 | f 1856 | GR 1857 | GS 1858 | [0.75 0 0 0.75 0 0] CT 1859 | 1 0 0 RC 1860 | N 1861 | 260.5 243.5 M 1862 | 259.058 247.938 L 1863 | 261.942 247.938 L 1864 | cp 1865 | f 1866 | GR 1867 | GS 1868 | [0.75 0 0 0.75 0 0] CT 1869 | 1 0 0 RC 1870 | N 1871 | 260.5 243.5 M 1872 | 261.942 247.938 L 1873 | 264.275 246.243 L 1874 | cp 1875 | f 1876 | GR 1877 | GS 1878 | [0.75 0 0 0.75 0 0] CT 1879 | 1 0 0 RC 1880 | N 1881 | 260.5 243.5 M 1882 | 264.275 246.243 L 1883 | 265.167 243.5 L 1884 | cp 1885 | f 1886 | GR 1887 | GS 1888 | [0.75 0 0 0.75 0 0] CT 1889 | 1 0 0 RC 1890 | 2 setlinecap 1891 | 10.0 ML 1892 | N 1893 | 265.167 243.5 M 1894 | 264.275 240.757 L 1895 | 261.942 239.062 L 1896 | 259.058 239.062 L 1897 | 256.725 240.757 L 1898 | 255.833 243.5 L 1899 | 256.725 246.243 L 1900 | 259.058 247.938 L 1901 | 261.942 247.938 L 1902 | 264.275 246.243 L 1903 | 265.167 243.5 L 1904 | S 1905 | GR 1906 | GS 1907 | [0.75 0 0 0.75 0 0] CT 1908 | 0 1 1 RC 1909 | 2 setlinecap 1910 | 10.0 ML 1911 | N 1912 | 138 484.5 M 1913 | 147 484.5 L 1914 | S 1915 | GR 1916 | GS 1917 | [0.75 0 0 0.75 0 0] CT 1918 | 0 1 1 RC 1919 | 2 setlinecap 1920 | 10.0 ML 1921 | N 1922 | 142.5 489 M 1923 | 142.5 480 L 1924 | S 1925 | GR 1926 | GS 1927 | [0.75 0 0 0.75 0 0] CT 1928 | 0 1 1 RC 1929 | 2 setlinecap 1930 | 10.0 ML 1931 | N 1932 | 139 488 M 1933 | 146 481 L 1934 | S 1935 | GR 1936 | GS 1937 | [0.75 0 0 0.75 0 0] CT 1938 | 0 1 1 RC 1939 | 2 setlinecap 1940 | 10.0 ML 1941 | N 1942 | 139 481 M 1943 | 146 488 L 1944 | S 1945 | GR 1946 | GS 1947 | [0.75 0 0 0.75 0 0] CT 1948 | 0 1 1 RC 1949 | N 1950 | 260.5 243.5 M 1951 | 263.833 243.5 L 1952 | 262.857 241.143 L 1953 | cp 1954 | f 1955 | GR 1956 | GS 1957 | [0.75 0 0 0.75 0 0] CT 1958 | 0 1 1 RC 1959 | N 1960 | 260.5 243.5 M 1961 | 262.857 241.143 L 1962 | 260.5 240.167 L 1963 | cp 1964 | f 1965 | GR 1966 | GS 1967 | [0.75 0 0 0.75 0 0] CT 1968 | 0 1 1 RC 1969 | N 1970 | 260.5 243.5 M 1971 | 260.5 240.167 L 1972 | 258.143 241.143 L 1973 | cp 1974 | f 1975 | GR 1976 | GS 1977 | [0.75 0 0 0.75 0 0] CT 1978 | 0 1 1 RC 1979 | N 1980 | 260.5 243.5 M 1981 | 258.143 241.143 L 1982 | 257.167 243.5 L 1983 | cp 1984 | f 1985 | GR 1986 | GS 1987 | [0.75 0 0 0.75 0 0] CT 1988 | 0 1 1 RC 1989 | N 1990 | 260.5 243.5 M 1991 | 257.167 243.5 L 1992 | 258.143 245.857 L 1993 | cp 1994 | f 1995 | GR 1996 | GS 1997 | [0.75 0 0 0.75 0 0] CT 1998 | 0 1 1 RC 1999 | N 2000 | 260.5 243.5 M 2001 | 258.143 245.857 L 2002 | 260.5 246.833 L 2003 | cp 2004 | f 2005 | GR 2006 | GS 2007 | [0.75 0 0 0.75 0 0] CT 2008 | 0 1 1 RC 2009 | N 2010 | 260.5 243.5 M 2011 | 260.5 246.833 L 2012 | 262.857 245.857 L 2013 | cp 2014 | f 2015 | GR 2016 | GS 2017 | [0.75 0 0 0.75 0 0] CT 2018 | 0 1 1 RC 2019 | N 2020 | 260.5 243.5 M 2021 | 262.857 245.857 L 2022 | 263.833 243.5 L 2023 | cp 2024 | f 2025 | GR 2026 | GS 2027 | [0.75 0 0 0.75 0 0] CT 2028 | 0 1 1 RC 2029 | 2 setlinecap 2030 | 10.0 ML 2031 | N 2032 | 263.833 243.5 M 2033 | 262.857 241.143 L 2034 | 260.5 240.167 L 2035 | 258.143 241.143 L 2036 | 257.167 243.5 L 2037 | 258.143 245.857 L 2038 | 260.5 246.833 L 2039 | 262.857 245.857 L 2040 | 263.833 243.5 L 2041 | S 2042 | GR 2043 | GS 2044 | [0.75 0 0 0.75 0 0] CT 2045 | 1 0 1 RC 2046 | N 2047 | 260.5 241.5 M 2048 | 262.5 241.5 L 2049 | 261.5 239.768 L 2050 | cp 2051 | f 2052 | GR 2053 | GS 2054 | [0.75 0 0 0.75 0 0] CT 2055 | 1 0 1 RC 2056 | N 2057 | 260.5 241.5 M 2058 | 261.5 239.768 L 2059 | 259.5 239.768 L 2060 | cp 2061 | f 2062 | GR 2063 | GS 2064 | [0.75 0 0 0.75 0 0] CT 2065 | 1 0 1 RC 2066 | N 2067 | 260.5 241.5 M 2068 | 259.5 239.768 L 2069 | 258.5 241.5 L 2070 | cp 2071 | f 2072 | GR 2073 | GS 2074 | [0.75 0 0 0.75 0 0] CT 2075 | 1 0 1 RC 2076 | N 2077 | 260.5 241.5 M 2078 | 258.5 241.5 L 2079 | 259.5 243.232 L 2080 | cp 2081 | f 2082 | GR 2083 | GS 2084 | [0.75 0 0 0.75 0 0] CT 2085 | 1 0 1 RC 2086 | N 2087 | 260.5 241.5 M 2088 | 259.5 243.232 L 2089 | 261.5 243.232 L 2090 | cp 2091 | f 2092 | GR 2093 | GS 2094 | [0.75 0 0 0.75 0 0] CT 2095 | 1 0 1 RC 2096 | N 2097 | 260.5 241.5 M 2098 | 261.5 243.232 L 2099 | 262.5 241.5 L 2100 | cp 2101 | f 2102 | GR 2103 | GS 2104 | [0.75 0 0 0.75 0 0] CT 2105 | 1 0 1 RC 2106 | 2 setlinecap 2107 | 10.0 ML 2108 | N 2109 | 262.5 241.5 M 2110 | 261.5 239.768 L 2111 | 259.5 239.768 L 2112 | 258.5 241.5 L 2113 | 259.5 243.232 L 2114 | 261.5 243.232 L 2115 | 262.5 241.5 L 2116 | S 2117 | GR 2118 | GS 2119 | [0.75 0 0 0.75 0 0] CT 2120 | 1 GC 2121 | N 2122 | 505 134 M 2123 | 505 55 L 2124 | 594 55 L 2125 | 594 134 L 2126 | cp 2127 | f 2128 | GR 2129 | GS 2130 | [0.75 0 0 0.75 417.88655 48.58448] CT 2131 | /Helvetica 12 F 2132 | GS 2133 | [1 0 0 1 0 0] CT 2134 | 0 5.018 moveto 2135 | 1 -1 scale 2136 | (tank 1) t 2137 | GR 2138 | GR 2139 | GS 2140 | [0.75 0 0 0.75 0 0] CT 2141 | 0 0 1 RC 2142 | [8 3 2 3] 0 setdash 2143 | 2 LJ 2144 | N 2145 | 513.028 64.779 M 2146 | 553.168 64.779 L 2147 | S 2148 | GR 2149 | GS 2150 | [0.75 0 0 0.75 417.88655 59.72974] CT 2151 | /Helvetica 12 F 2152 | GS 2153 | [1 0 0 1 0 0] CT 2154 | 0 5.018 moveto 2155 | 1 -1 scale 2156 | (tank 2) t 2157 | GR 2158 | GR 2159 | GS 2160 | [0.75 0 0 0.75 0 0] CT 2161 | 0 1 0 RC 2162 | [10 6] 0 setdash 2163 | 2 LJ 2164 | N 2165 | 513.028 79.64 M 2166 | 553.168 79.64 L 2167 | S 2168 | GR 2169 | GS 2170 | [0.75 0 0 0.75 417.88655 70.875] CT 2171 | /Helvetica 12 F 2172 | GS 2173 | [1 0 0 1 0 0] CT 2174 | 0 5.018 moveto 2175 | 1 -1 scale 2176 | (tank 3) t 2177 | GR 2178 | GR 2179 | GS 2180 | [0.75 0 0 0.75 0 0] CT 2181 | 1 0 0 RC 2182 | [8 3 2 3] 0 setdash 2183 | 2 LJ 2184 | N 2185 | 513.028 94.5 M 2186 | 553.168 94.5 L 2187 | S 2188 | GR 2189 | GS 2190 | [0.75 0 0 0.75 417.88655 82.02026] CT 2191 | /Helvetica 12 F 2192 | GS 2193 | [1 0 0 1 0 0] CT 2194 | 0 5.018 moveto 2195 | 1 -1 scale 2196 | (tank 4) t 2197 | GR 2198 | GR 2199 | GS 2200 | [0.75 0 0 0.75 0 0] CT 2201 | 0 1 1 RC 2202 | [10 6] 0 setdash 2203 | 2 LJ 2204 | N 2205 | 513.028 109.36 M 2206 | 553.168 109.36 L 2207 | S 2208 | GR 2209 | GS 2210 | [0.75 0 0 0.75 417.88655 93.16552] CT 2211 | /Helvetica 12 F 2212 | GS 2213 | [1 0 0 1 0 0] CT 2214 | 0 5.018 moveto 2215 | 1 -1 scale 2216 | (Ref) t 2217 | GR 2218 | GR 2219 | GS 2220 | [0.75 0 0 0.75 0 0] CT 2221 | 1 0 1 RC 2222 | [2 2] 0 setdash 2223 | 2 LJ 2224 | 2 LW 2225 | N 2226 | 513.028 124.221 M 2227 | 553.168 124.221 L 2228 | S 2229 | GR 2230 | GS 2231 | [0.75 0 0 0.75 0 0] CT 2232 | 0.149 GC 2233 | 2 setlinecap 2234 | 10.0 ML 2235 | N 2236 | 505 134 M 2237 | 505 55 L 2238 | 594 55 L 2239 | 594 134 L 2240 | 505 134 L 2241 | S 2242 | GR 2243 | %%Trailer 2244 | %%Pages: 1 2245 | %%EOF 2246 | -------------------------------------------------------------------------------- /random_hypergraph.m: -------------------------------------------------------------------------------- 1 | function [H,A,B] = random_hypergraph(M,N,R,overlap) 2 | % RANDOM_HYPERGRAPH Build a random geometric graph. 3 | % [H,A,B] = RANDOM_HYPERGRAPH(M,N,R,overlap) generates a network with M 4 | % fusion centres, N nodes and maximum distance to connect to a FC equal 5 | % to R. overlap is true if the FC are nodes, false if they are separate 6 | % agents. The routine outputs a cell array with elements representing the 7 | % hyper-edges, and matrices A and B that appear in the constraints. 8 | 9 | 10 | %% generate network 11 | % generate nodes-FCs incidence matrix 12 | I = zeros(N,M); 13 | 14 | flag = true; 15 | while(flag) 16 | 17 | % nodes' positions 18 | N_pos = rand(N,1); 19 | 20 | % position of FCs 21 | if overlap 22 | % positions of nodes chosen to be FCs 23 | F_pos = N_pos(randsample(N,M)); 24 | else 25 | % random FCs positions 26 | F_pos = rand(M,1); 27 | end 28 | 29 | % compute distances between nodes and FCs 30 | for n = 1:N 31 | 32 | % compute distance from each FC 33 | I(n,:) = abs(N_pos(n) - F_pos) <= R; 34 | 35 | end 36 | 37 | % if each node is not connected to at least a FC, generate new N_pos 38 | flag = ~all(sum(I,2)); 39 | 40 | end 41 | 42 | %% A and B matrices 43 | % find indices of node-FC connections 44 | [N_idx,F_idx] = find(I); 45 | 46 | % number of constraints 47 | T = length(N_idx); 48 | 49 | A = zeros(T,N); 50 | B = zeros(T,M); 51 | 52 | for t = 1:T 53 | 54 | A(t,N_idx(t)) = -1; 55 | B(t,F_idx(t)) = 1; 56 | 57 | end 58 | 59 | %% hyper-edge cell array 60 | H = cell(M,1); 61 | 62 | for m = 1:M 63 | 64 | H{m} = find(I(:,m)); 65 | 66 | end 67 | 68 | 69 | end 70 | 71 | -------------------------------------------------------------------------------- /states.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alirezalm/RHADMM-Algorithm/58328d8ca010bcf7e864ecac72377e95aa56b19a/states.fig -------------------------------------------------------------------------------- /xupdate.m: -------------------------------------------------------------------------------- 1 | function [x , z, theta,fval] = xupdate(Q,c,Aeq,beq,Aineq,bineq,M,b,rho,alpha,z,A,B,eps,n,N,d,m,H,inv_E,state) 2 | opt = optimoptions('quadprog', 'Display', 'off', 'algorithm','interior-point-convex'); 3 | n1 = zeros(1,m); 4 | for i = 1:m 5 | n1(i) = size(eps{i},2); 6 | end 7 | beta = ((z - max(2 * H * z , 0))' * A)'; 8 | %% Inner QP solve 9 | nx = size(Q{1},1); 10 | 11 | % for i = 1: N 12 | % theta(:,i) = quadprog(0.5*((Q{i} + (1/(rho*d(i)))*M{i}'*M{i})+(Q{i} + (1/(rho*d(i)))*M{i}'*M{i})'), -(1/(rho*d(i)))*... 13 | % ((b/N)'*M{i} - beta(n*(i - 1) + 1:i*n)'*M{i} - c{i}),[],[],Aeq{i},beq{i} * state(:,i),[],[],[],opt); 14 | % 15 | % % end 16 | % for i = 1: N 17 | % HH{i} = Q{i} + (1/rho) * M{i}' * (d(i) * eye(n))^-1 * M{i}; 18 | % HH{i} = 0.5 * ( HH{i} + HH{i}'); 19 | % grad{i} = (-c{i} + (1/rho) * ( (b/N)' * (d(i) * eye(n))^-1 - beta(n*(i - 1) + 1:i*n)' * (d(i) * eye(n))^-1 )* M{i} ) ; 20 | % % [theta(:,i),fval(i)] = quadprog(HH{i},-grad{i},Aineq{i},bineq{i},Aeq{i}, beq{i} * state(:,i),[],[],[],opt); 21 | % % theta(:,i) = thetaa; 22 | % end 23 | % tic 24 | % parfor i = 1: N 25 | % % HH{i} = Q{i} + (1/rho) * M{i}' * (d(i) * eye(n))^-1 * M{i}; 26 | % % HH{i} = 0.5 * ( HH{i} + HH{i}'); 27 | % % grad{i} = (-c{i} + (1/rho) * ( (b/N)' * (d(i) * eye(n))^-1 - beta(n*(i - 1) + 1:i*n)' * (d(i) * eye(n))^-1 )* M{i} ) ; 28 | % [theta(:,i),fval(i)] = quadprog(HH{i},-grad{i},Aineq{i},bineq{i},Aeq{i}, beq{i} * state(:,i),[],[],[],opt); 29 | % % theta(:,i) = thetaa; 30 | % end 31 | % toc 32 | % tic 33 | for i = 1: N 34 | HH{i} = Q{i} + (1/rho) * M{i}' * (d(i) * eye(n))^-1 * M{i} + 0.1 * eye(size(Q{i},1)); 35 | HH{i} = 0.5 * ( HH{i} + HH{i}'); 36 | grad{i} = (-c{i} + (1/rho) * ( (b/N)' * (d(i) * eye(n))^-1 - beta(n*(i - 1) + 1:i*n)' * (d(i) * eye(n))^-1 )* M{i} ) ; 37 | [thetaa,fval] = quadprog(HH{i},-grad{i},Aineq{i},bineq{i},Aeq{i}, beq{i} * state(:,i),[],[],[],opt); 38 | theta(:,i) = thetaa; 39 | end 40 | % toc 41 | for i = 1:N 42 | x(:,i) = (1/rho) * (d(i) * eye(n))^-1 * (M{i} * theta(:,i) - (b/N) + beta(n*(i - 1) + 1:i*n)); 43 | end 44 | 45 | 46 | xx = x(:); 47 | 48 | z = z - max(2 * alpha * B * inv_E * B' * z , 0) - 2 * alpha * rho * A * xx; 49 | 50 | 51 | z = z(:); 52 | end 53 | 54 | --------------------------------------------------------------------------------