⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clean_up_boundary.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function [boundary_new,hpflags_new] = clean_up_boundary(first_boundary,second_boundary,first_hpflags,second_hpflags)global GLOBAL_PIHAglobal GLOBAL_APPROX_PARAMhyperplanes = GLOBAL_PIHA.Hyperplanes;[c1,d1]=cell_ineq(first_boundary,first_hpflags);[c2,d2]=cell_ineq(second_boundary,second_hpflags);a=linearcon([],[],c1,d1);b=linearcon([],[],c2,d2);if isempty(a&b)   boundary_new=[];   hpflags_new=[];elseboundary=[first_boundary second_boundary];hpflags=[first_hpflags second_hpflags];[CBND,dBND] = cell_ineq(boundary,hpflags);[CE,dE,CI,dI] = linearcon_data(clean_up(linearcon([],[],CBND,dBND)));%Use the following to indicate which hpflags elements will still be validhp_flag_index=[];if (length(dI) == length(dBND))  boundary_new = boundary;else  hyperplane_tol = GLOBAL_APPROX_PARAM.poly_hyperplane_tol;  boundary_new = [];  for k = 1:length(boundary)    ck = hyperplanes{boundary(k)}.c;    dk = hyperplanes{boundary(k)}.d;    found = 0;    for l = 1:length(dI)      if rank([CI(l,:) dI(l); ck dk],hyperplane_tol) == 1        found = 1;        break;      end    end    if found&~ismember(boundary(k),boundary_new)      boundary_new = [boundary_new boundary(k)];      hp_flag_index=[hp_flag_index k];   endend%Create new hpflags vectorfor j=1:length(hp_flag_index)   hpflags_new(j)=hpflags(hp_flag_index(j));endendendreturn%-------------------------------------------------------------------------------------------------------------------------------%  function clean_transition()%% This function eliminates duplicate transitions. It compares the guards of two transitions.%If the lists of guards are equal, merge the transitions.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -