Replies: 7 comments 1 reply
-
This is wonderful! Congratulations on your article, and thank you for sharing. In particular, thanks for finding those Lisa bugs!
Cheers David
Lasciate ogne speranza, voi ch’intrate.
…On Wed, Jan 8, 2025 at 1:43 PM, gassechen ***@***.***(mailto:On Wed, Jan 8, 2025 at 1:43 PM, gassechen <<a href=)> wrote:
https://www.linkedin.com/pulse/explorando-el-sistema-del-tanque-de-presi%25C3%25B3n-un-enfoque-gaston-pepe-lmfif
—
Reply to this email directly, [view it on GitHub](#16), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABV3HLFFRSH4P4ADMNPXP3T2JVWUTAVCNFSM6AAAAABU2RRUEOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXG44TSMBWGQ).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you!
Cheers David
Lasciate ogne speranza, voi ch’intrate.
…On Wed, Jan 8, 2025 at 3:13 PM, BossHog883 ***@***.***(mailto:On Wed, Jan 8, 2025 at 3:13 PM, BossHog883 <<a href=)> wrote:
This is wonderful! Congratulations on your article, and thank you for sharing. In particular, thanks for finding those Lisa bugs!
Cheers David
Lasciate ogne speranza, voi ch’intrate.
On Wed, Jan 8, 2025 at 1:43 PM, gassechen < ***@***.***(mailto:On Wed, Jan 8, 2025 at 1:43 PM, gassechen <<a href=)> wrote:
> https://www.linkedin.com/pulse/explorando-el-sistema-del-tanque-de-presi%25C3%25B3n-un-enfoque-gaston-pepe-lmfif
>
> —
> Reply to this email directly, [view it on GitHub](#16), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABV3HLFFRSH4P4ADMNPXP3T2JVWUTAVCNFSM6AAAAABU2RRUEOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXG44TSMBWGQ).
> You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Power Distribution System Code Example
|
Beta Was this translation helpful? Give feedback.
-
This is so cool; I love it! As to your question regarding certainty factors. They seem to have originated with the MYCIN expert system, as an alternative to Bayesian statistics and probabilities. The formula you mentioned is a method of resolving two or more rule firings with different certainty factors, or beliefs.
CFs are somewhat controversial, but we’re accepted as useful in their own right. I took Lisa’s implementation straight out of PAIP, if I recall, as a feature request years ago. Does this help?
Cheers David
Lasciate ogne speranza, voi ch’intrate.
…On Fri, Jan 10, 2025 at 3:08 PM, gassechen ***@***.***(mailto:On Fri, Jan 10, 2025 at 3:08 PM, gassechen <<a href=)> wrote:
Power Distribution System Code Example
(eval-when (:compile-toplevel :load-toplevel :execute)
(when (not (find-package "LISA-ENERGY-DIST"))
(defpackage "LISA-ENERGY-DIST"
(:use "LISA-LISP")
(:export "ENERGY-DIST-SIMULATION"))))
(in-package "LISA-ENERGY-DIST")
(make-inference-engine)
;;; Template Definitions
(deftemplate motor ()
(slot id)
(slot state)
(slot energy-source))
(deftemplate relay ()
(slot name)
(slot state))
(deftemplate timer ()
(slot name)
(slot state))
(deftemplate test-signal ()
(slot state)
(slot time))
(deftemplate battery ()
(slot id)
(slot energy-level))
(deftemplate button ()
(slot name)
(slot state))
;;; System Rules
;; System Start
(defrule start-system ()
(button (name F) (state pressed))
=>
(assert (relay (name G) (state closed)))
(assert (relay (name I) (state closed)))
(assert (test-signal (state on) (time 0)))
(format t "System started: relays G and I are closed.~%"))
;; Motor and Relay Operation
(defrule activate-relay-R-M()
(relay (name K) (state closed))
=>
(assert (relay (name R) (state closed)))
(assert (relay (name M) (state closed)))
(format t "Relays R and M are closed.~%"))
(defrule activate-relay-T()
(relay (name M) (state closed))
=>
(assert (relay (name T) (state closed)))
(format t "Relay T is closed.~%"))
(defrule activate-relay-S()
(relay (name R) (state closed))
(relay (name T) (state closed))
=>
(assert (relay (name S) (state closed)))
(format t "Relay S is closed.~%"))
(defrule activate-motor-1 ()
(relay (name R) (state closed))
=>
(assert (motor (id 1) (state operational) (energy-source Battery1)))
(format t "Motor 1 is operational.~%"))
(defrule activate-motor-2 ()
(relay (name T) (state closed))
=>
(assert (motor (id 2) (state operational) (energy-source Battery2)))
(format t "Motor 2 is operational.~%"))
(defrule activate-motor-3 ()
(relay (name S) (state closed))
=>
(assert (motor (id 3) (state operational) (energy-source Battery1)))
(format t "Motor 3 is operational.~%"))
;; Time Increment and Energy Consumption
(defrule normal-operation ()
(?ts (test-signal (state on) (time ?t)))
(?b1 (battery (id BATTERY1) (energy-level ?level1 (> ?level1 0))))
(?b2 (battery (id BATTERY2) (energy-level ?level2 (> ?level2 0))))
=>
(modify ?ts (time (+ ?t 1)))
(modify ?b1 (energy-level (- ?level1 5)))
(modify ?b2 (energy-level (- ?level2 1)))
(sleep 1)
(format t "Test signal time incremented: ~A seconds.~%" (+ ?t 1))
(format t "Battery BATTERY1: energy level reduced to ~A.~%" (- ?level1 5))
(format t "Battery BATTERY2: energy level reduced to ~A.~%" (- ?level2 1)))
;; Test Signal Completion
(defrule end-test-signal ()
(?ts (test-signal (state on) (time ?t)))
(test (= 60 ?t))
=>
(modify ?ts (state off) (time -1))
(assert (relay (name K) (state open)))
(assert (relay (name G) (state open)))
(format t "Test signal completed: relay K is open.~%"))
;; Shutdown due to Low Energy
(defrule stop-system-battery ()
(battery (id ?id) (energy-level ?level))
(test (<= ?level 0))
=>
(assert (test-signal (state off) (time -1)))
(format t "System stopped: battery ~A is out of energy.~%" ?id))
;; Complete System Shutdown
(defrule stop-system ()
(test-signal (state off))
(relay (name G) (state open))
(?m1 (motor (id 1) (state operational)))
(?m2 (motor (id 2) (state operational)))
(?m3 (motor (id 3) (state operational)))
=>
(retract ?m1)
(retract ?m2)
(retract ?m3)
(format t "System fully stopped.~%")
(halt)
(clear))
;;; Simulation
(defun simulate-energy-distribution-system ()
(reset)
(assert (button (name F) (state pressed)))
(assert (battery (id Battery1) (energy-level 100)))
(assert (battery (id Battery2) (energy-level 100)))
(run)
(format t "Simulation completed.~%"))
(simulate-energy-distribution-system)
[Link](https://www.linkedin.com/posts/gaston-pepe-518179139_common-lisp-sistemas-expertos-activity-7283573935550455808-igh0?utm_source=share&utm_medium=member_desktop)
—
Reply to this email directly, [view it on GitHub](#16 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABV3HLGMAFW6AN3DMTDU3BT2KASDDAVCNFSM6AAAAABU2RRUEOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBQGIYTEMY).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Excellent. Hope you enjoy the book; I definitely did.
Cheers David
Lasciate ogne speranza, voi ch’intrate.
…On Fri, Jan 10, 2025 at 5:41 PM, gassechen ***@***.***(mailto:On Fri, Jan 10, 2025 at 5:41 PM, gassechen <<a href=)> wrote:
Yes, thank you. I already received the book that you recommended I buy. I got a used one and a Spanish version. I'm going to read it so I can ask you better questions.
—
Reply to this email directly, [view it on GitHub](#16 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABV3HLEO7JCFPZMXJ6U25WL2KBECNAVCNFSM6AAAAABU2RRUEOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBQGMZDSMY).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Oh, this is pretty good as well:
https://www.sciencedirect.com/topics/computer-science/certainty-factor
Lasciate ogne speranza, voi ch’intrate.
…On Fri, Jan 10, 2025 at 5:41 PM, gassechen ***@***.***(mailto:On Fri, Jan 10, 2025 at 5:41 PM, gassechen <<a href=)> wrote:
Yes, thank you. I already received the book that you recommended I buy. I got a used one and a Spanish version. I'm going to read it so I can ask you better questions.
—
Reply to this email directly, [view it on GitHub](#16 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABV3HLEO7JCFPZMXJ6U25WL2KBECNAVCNFSM6AAAAABU2RRUEOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBQGMZDSMY).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
https://www.linkedin.com/pulse/explorando-el-sistema-del-tanque-de-presi%25C3%25B3n-un-enfoque-gaston-pepe-lmfif
Beta Was this translation helpful? Give feedback.
All reactions