PHAN TCH VA BAO VE HE THONG NANG LNG IEN AT VAN E. LUAT GIAI QUYET BAI TOAN. NG DUNG VAO HE THONG NANG LNG IEN THANH PHO HO CH MINH. KET QUA X L C. 2 H thng cung cp nng lng in l mt h thng v cng phc tp.
May cat van hanh ngat dong May cat khong van hanh ngat dong 3 Cng vic phn tch bo v h thng t ra 4 vn nh sau : Xc nh v tr xy ra s c trn h thng. Xc nh trng thi vn hnh v trng thi khng vn hnh ca cc my ct trn h thng. Ch r cc thnh phn ca h thng. Xc nh h thng ca cc my ct d phng cho cc my ct khng vn hnh trn h thng.
4 Cc lut gii quyt bi ton: cc v t biu din cho cu trc mng: 1.generation(B) 2.protected_by(LineX, B1, B2) 3.connect(B1,B2) 4.operate(B) 5 Lut x l cc my ct lin thng qua thanh gp. If connect(B1, B2) then connection(B1, B2). If connect(B2, B1) then connection(B1,B2).
6 Lut x l my ct cng bo v ng dn. If protected_by(LineX, B1, B2) then other_breaker(B1, B2). If protected_by(LineX, B2, B1) then other_breaker(B1, B2). 7 Lut x l my ct c ngun. If generation(B) then has_gen(B). If connection(B, B1) and other_breaker(B1, B2) and has_gen(B2) then has_gen(B). If connection(B,B1) and has_gen(B1) then has_gen(B). 8 Lut x l my ct d phng cho mt my ct khc. If not(generation(B1)) and connection(B1, B3) and other_breaker(B3,B2) and has_gen(B2) then back_up(B1, B2). 9 Lut x l my ct d phng cho mt my ct khc khng vn hnh. If back_up(B1, B2) and not(operate(B2)) then back_up_did_not_work(B1, B2). 10 Lut x l my ct mt ngun. If not(has_gen(B)) then no_source_coming(B). If has_gen(B) and operate(B) then no_source_coming(B). If back_up(B1, B2) and not(backup_did_not_work(B1, B2)) then No_source_coming(B1). 11 Lut x l xc nh ng dn LineX c s c. If no_source_coming(B1) and no_source_coming(B2) then fault(LineX, B1, B2). 12 S mng in TPHCM 13 Gii thut 14 protected_by("L1_1","B4","T_PhuDinh"). protected_by("L2_1","B7","T_ChoLon"). protected_by("L3_1","B9","T_TruongDua"). protected_by("L4_1","B12","T_BaQueo"). . 15 connect("B13","B15"). connect("B7","B28"). connect("B16","B27"). generation("B28"). generation("B53"). generation("B17"). 16 fault(_,B1,B2) :- no_source_coming(B1),no_source_co ming(B2),!. printbackup(B,Win,Str) :- back_up(B,B1),operate(B1), printout(B,Win,Str) :- has_gen(B),operate(B), 17 concat(Str3,"\n",Str4), win_setText(Win,Str4), run(Cb1,Cb2,Cb3,Cb4,CRe) :- Br1=win_getText(Cb1), assertz(operate(Br1),mydata), 18 Giao din chng trnh 19 Kt qu m phng 20