# A Novel Visual System for Conducting Safety Evaluations of Operational Tunnel Linings
## 3 Function Design and Implementation of Visualized System
str8=get(handles.edit8,'String'); num8=str2 double(str8); % Monitoring data input R1=Ff1(num1,num2,num3,num4); R2=Ff2(num5,num6); R3=Ff3(num7); R4=Ff4(num8); % Forming the membership matrix based on the membership function (2.2.3 Determination of membership function)  wA1=[0.4109,0.3781,0.2110];  wA2=[0.5622,0.4378];  wA3=[1];  wA4=[1]; % index weight  Taking 4 monitoring data for lining cracking as an example: C1=jq(wA1,R1); % Fuzzy composition B1=C1./sum(C1); % normalization wB1=[4 3 2 1]; G1=dot(wB1,B1); if G1>3.5&&G1<=4  H1=('A--slight damage'); set(handles.edit9,'string',num2 str(H1));  end % First-level evaluation.............. E=[B1;B2;B3;B4]; wA=[0.5696,0.1741,0.1632,0.0931]; C=jq(wA,E); B=C./sum(C); wB=[4 3 2 1]; G2=dot(wB,B); set(handles.edit13,'string',num2 str(G2),'FontSize',15);....... if G2>2.5&G2<=3.5  str1=['This section of the lining has been evaluated as having B--moderate damage, which is primarily characterized by insufficient lining strength and thickness, as well as the leakage of water and back cave of the lining. Appropriate measures should be taken to address these issues 10];  str2=[str1]  set(handles.edit14,'string',str2,'FontSize',20);  end % Second-level evaluation (or overall evaluation) The above codes result from the input of 8 representative monitoring data (corresponding to the Table 1 index layer: crack length, crack width, lining deformation, lining peeling depth, actual strength/design strength of lining, actual thickness/design thickness of lining, leakage of water, and lining cave depth), the call of the index weights, and the membership matrix. Taking 4 monitoring data of lining cracking as an example, the Fuzzy evaluation matrix was synthesized by combining the index weight wA1 with the membership matrix R1. The first-level structure safety value G1 was then obtained, allowing for a quantitative evaluation of structure safety state in the criterion layer. Based on the first-level evaluation, the second-level evaluation (or overall evaluation) was implementedand finally the second-level structure safety value G2 and the key disease indexes to focus on were obtained. In addition, the system provides convenient editing and modification of monitoring-data input procedures and subfunctions, such as membership functions or other types of structure safety evaluation functions, which allows for the addition of new monitoring items or changes to the evaluation functions according to practical engineering needs. As a result, the system can continuously adjust its computational model in response to different tunnels with different environmental conditions, making it practical and extensive. Table 2 shows the tunnel structure safety levels and values. The following codes result in the judgment and visualized output of the safety levels (taking the lining cracking as example):  
if G1>3.5&&G1<=4  
H1=('A--slight damage');  
set(handles.edit,'string',num2 str(H1));  
else if G1>2.5&&G1<=3.5  
H2=('B--moderate damage');  
set(handles.edit,'string',num2 str(H2));  
else if G1>1.5&&G1<=2.5  
H3=('C--severe damage');  
set(handles.edit,'string',num2 str(H3));  
else G1>=1&&G1<=1.5  
H4=('D--dangerous state');  
set(handles.edit,'string',num2 str(H4));  
end