I am creating an expert system using clipspy, when I run the code in Python it throws nothing in the output and I have not been able to find the reason.
Python code:
import clips
DEFTEMPLATE_STRING = """
(deftemplate dormitorio
(slot Presencia (type STRING))
(slot Iluminación (type STRING)))
"""
env = clips.Environment()
env.build(DEFTEMPLATE_STRING)
env.load('test.CLP')
Dormitorio = env.find_template('dormitorio')
fact_Dormitorio = Dormitorio.assert_fact(Presencia = 'Si',
Iluminación = 'Apagada')
env.reset()
env.run()
Clips file:
(defrule dormitorio
(Presencia Si)
(Iluminación Apagada)
=>
(printout t "Encender la iluminación del dormitorio." crlf)
(modify 1 (Iluminación Encendida))
)
What is expected is to output the print and modify the variable (Iluminación
)?