Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACTIONS
- DISPLAY "Sist. exec robot"
- FIND SER
- DISPLAY "Sist. de ex pt. un robot: {SER}";
- RULE 1
- IF senzp=min AND obiect=existent
- THEN
- senzdist=detectat;
- RULE 2
- IF senzp=min AND obiect=inexistent
- THEN
- senzdist=nedetectat;
- RULE 3
- IF senzp=max AND obiect=existent
- THEN
- senzdist=nedetectat;
- RULE 4
- IF senzp=max AND obiect=inexistent
- THEN
- senzdist=nedetectat;
- RULE 5
- IF senzp=standby AND obiect=existent
- THEN
- senzdist=eroare;
- RULE 6
- IF senzp=standby AND obiect=inexistent
- THEN
- senzdist=eroare;
- RULE 7
- IF senzp=nefunctional AND obiect=existent
- THEN
- senzdist=nefunctional;
- RULE 8
- IF senzp=nefunctional AND obiect=inexistent
- THEN
- senzdist=nefunctional;
- RULE 9
- IF motor=pornit AND senzdist=detectat
- THEN
- SER=ocolire;
- RULE 10
- IF motor=pornit AND senzdist=nedetectat
- THEN
- SER=continua;
- RULE 11
- IF motor=pornit AND senzdist=eroare
- THEN
- SER=risc;
- RULE 12
- IF motor=pornit AND senzdist=nefunctional
- THEN
- SER=risc;
- RULE 13
- IF motor=oprit AND senzdist=detectat
- THEN
- SER=err_motor;
- RULE 14
- IF motor=oprit AND senzdist=nedetectat
- THEN
- SER=err_motor;
- RULE 15
- IF motor=oprit AND senzdist=eroare
- THEN
- SER=err_motor;
- RULE 16
- IF motor=oprit AND senzdist=nefunctional
- THEN
- SER=oprit;
- ASK motor:"Stare motor?";
- CHOICES motor: pornit, oprit;
- ASK senzp:"In ce stare e senzorul de proximitate?";
- CHOICES senzp:min, max, standby, nefunctional;
- ASK obiect:"Stare obiect?";
- CHOICES obiect:existent, inexistent;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement