## 4 Modelling the Hospital's Electrical System Using Petri Nets
### Modelling and Analysing with a Fuzzy Inference System
#### 4.3.4 Rules of Editor  
The next step is to apply the fuzzy operator \"AND & THEN\" in fuzzy rules, and the fuzzy rules that are by data collected and processed according to fuzzy logic with the following 17 rules: (1) If (Electrical Main Power is Low) and (Genset1 is Off) and (Genset2 is Off) and (Automatic Transfer Switch is Not Function) and (UPS1 is Off) and (UPS2 is Off) then (Hospital System is Failing Load); (2) If (Electrical Main Power is Low) and (Genset1 is On) and (Genset2 is Off) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Under Load); (3) If (Electrical Main Power is Low) and (Genset1 is Off) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Under Load); (4) If (Electrical Main Power is Low) and (Genset1 is On) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is Off) then (Hospital System is Under Load); (5) If (Electrical Main Power is Low) and (Genset1 is On) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is Off) and (UPS2 is On) then (Hospital System is Under Load); (6) If (Electrical Main Power is Low) and (Genset1 is On) and (Genset2 is On) and (Automatic Transfer Switch is Not Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Under Load); (7) If (Electrical Main Power is Low) and (Genset1 is On) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Normal Load); (8) If (Electrical Main Power is Normal) & (Genset1 is Off) and (Genset2 is Off) and (Automat-ic Transfer Switch is Not Function) and (UPS1 is Off) and (UPS2 is Off) then (Hospital System is Failing Load); (9) If (Electrical Main Power is Normal) and (Genset1 is Off) and (Genset2 is Off) and (Automatic Transfer Switch is Not Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Under Load); (10) If (Electrical Main Power is Normal) and (Genset1 is Off) and (Genset2 is Off) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Normal Load); (11) If (Electrical Main Power is High) and (Genset1 is Off) and (Genset2 is Off) and (Automatic Transfer Switch is Not Function) and (UPS1 is Off) and (UPS2 is Off) then (Hospital System is Failing Load); (12) If (Electrical Main Power is High) and (Genset1 is On) and (Genset2 is Off) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is On) then (Hospital System is Under Load); (13) If (Electrical Main Power is High) and (Genset1 is Off) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS1 is On) and (UPS1 is On) then (Hospital System is Under Load); (14) If (Electrical Main Power is High) and (Genset1 is On) and (Genset2 is On) and (Automatic Transfer Switch is Function) and (UPS1 is On) and (UPS2 is Off) then (Hospital System is Under Load); (15) If (Electrical Main Power is High) and (Genset1 is On) and (Genset1 is On) and (Genset2 is On) and (Genset1 is On) and (Genset2 is On) and (Genset2 is On) then (Hospital System is Normal Load).  
To support the fuzzy rules above, it is necessary to sort out the working orders of some important equipment of the electrical power system of the hospital that are being analysed. Based on MATLAB software, the fuzzy inference system was used to simulate how reliable and available their functions are in order to prevent any failure. The support of the fuzzy rules that show the simulation of the referred electrical circuits functioning is shown in Table 3.