Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. ACTIONS
  2. DISPLAY "Sist. exec robot"
  3. FIND SER
  4. DISPLAY "Sist. de ex pt. un robot: {SER}";
  5.  
  6.  
  7. RULE 1
  8. IF senzp=min AND obiect=existent
  9. THEN
  10. senzdist=detectat;
  11.  
  12. RULE 2
  13. IF senzp=min AND obiect=inexistent
  14. THEN
  15. senzdist=nedetectat;
  16.  
  17. RULE 3
  18. IF senzp=max AND obiect=existent
  19. THEN
  20. senzdist=nedetectat;
  21.  
  22. RULE 4
  23. IF senzp=max AND obiect=inexistent
  24. THEN
  25. senzdist=nedetectat;
  26.  
  27. RULE 5
  28. IF senzp=standby AND obiect=existent
  29. THEN
  30. senzdist=eroare;
  31.  
  32. RULE 6
  33. IF senzp=standby AND obiect=inexistent
  34. THEN
  35. senzdist=eroare;
  36.  
  37. RULE 7
  38. IF senzp=nefunctional AND obiect=existent
  39. THEN
  40. senzdist=nefunctional;
  41.  
  42. RULE 8
  43. IF senzp=nefunctional AND obiect=inexistent
  44. THEN
  45. senzdist=nefunctional;
  46.  
  47. RULE 9
  48. IF motor=pornit AND senzdist=detectat
  49. THEN
  50. SER=ocolire;
  51.  
  52. RULE 10
  53. IF motor=pornit AND senzdist=nedetectat
  54. THEN
  55. SER=continua;
  56.  
  57. RULE 11
  58. IF motor=pornit AND senzdist=eroare
  59. THEN
  60. SER=risc;
  61.  
  62. RULE 12
  63. IF motor=pornit AND senzdist=nefunctional
  64. THEN
  65. SER=risc;
  66.  
  67. RULE 13
  68. IF motor=oprit AND senzdist=detectat
  69. THEN
  70. SER=err_motor;
  71.  
  72. RULE 14
  73. IF motor=oprit AND senzdist=nedetectat
  74. THEN
  75. SER=err_motor;
  76.  
  77. RULE 15
  78. IF motor=oprit AND senzdist=eroare
  79. THEN
  80. SER=err_motor;
  81.  
  82. RULE 16
  83. IF motor=oprit AND senzdist=nefunctional
  84. THEN
  85. SER=oprit;
  86.  
  87. ASK motor:"Stare motor?";
  88. CHOICES motor: pornit, oprit;
  89.  
  90. ASK senzp:"In ce stare e senzorul de proximitate?";
  91. CHOICES senzp:min, max, standby, nefunctional;
  92.  
  93. ASK obiect:"Stare obiect?";
  94. CHOICES obiect:existent, inexistent;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement