for i=1:N for j_i=1:3 temp=0; for k_i=1:3 if k_i==j_i continue; end for z_i=1:Hrow_entity(H_indexcol(i,k_i)) if H_indexrow(H_indexc