-
Hi again Tim,
does
r2 = clips.BuildRule("polio-rule", "(immunizations (polio ?x&:(= 0 ?x)) (age ?age&:(>= ?age 60)))", "(assert (needs_polio))","The polio Dose #1 Rule")
solve the problem?
BR
Johan Lindberg
johan@pulp.se.
2009-08-12 18:39:20 UTC in PyCLIPS Python Module
-
Hi,
Matching a slot (in a deftemplate) within a rule requires you to state the deftemplate and the slot you wish to match against.
You can test the age slot in immunizations with: (immunizations (age ?age&:(< 180 ?age)))
See 5.4.1 Pattern Conditional Element in CLIPS Basic Programming Guide[1] for more information about why the "?age&:(< 180 ?age)" is required...
2009-08-09 15:28:42 UTC in PyCLIPS Python Module
-
Ok. Let me know if there's anything I can help with. As long as we're talking about the high-level (Python) code I think I might be useful.
2008-01-22 12:35:58 UTC in PyCLIPS Python Module
-
>>> import clips
>>> clips.Assert(unicode("(duck)"))
Traceback (most recent call last):
File "", line 1, in
clips.Assert(unicode("(duck)"))
File "C:\Python25\lib\site-packages\clips\_clips_wrap.py", line 2676, in Assert
raise TypeError("expected a string or a Fact")
TypeError: expected a string or a Fact
>>>
I don't know how Clips handles Unicode but...
2008-01-21 14:45:20 UTC in PyCLIPS Python Module
-
I changed this to a feature request since it turns out that Clips 6.24 does not support calling a function in a different module.
2007-12-31 07:12:10 UTC in PyCLIPS Python Module
-
I'm having trouble evaluating a function call that's placed in a module. I'm trying to make a Python equivalent of the ClipsJNI WineDemo example but I'm running in to trouble when I have to call the function WINES::get-wine-list. This snippet re-creates the problem:
>>> import clips
>>> clips.Load("c:/program/clips/pyclips/winedemo.clp")
>>> clips.Eval("(WINES::get-wine-list)")
Traceback...
2007-12-30 21:27:56 UTC in PyCLIPS Python Module
-
johanlindberg committed revision 78 to the SERF Tools SVN repository, changing 11 files.
2007-07-10 20:15:02 UTC in SERF Tools
-
johanlindberg committed revision 77 to the SERF Tools SVN repository, changing 2 files.
2007-06-26 19:35:50 UTC in SERF Tools
-
johanlindberg committed revision 76 to the SERF Tools SVN repository, changing 1 files.
2007-06-17 20:18:08 UTC in SERF Tools
-
johanlindberg committed revision 75 to the SERF Tools SVN repository, changing 5 files.
2007-05-29 15:24:58 UTC in SERF Tools