Hi,
Consider the following situation. I have asserted quite a number of
facts, with various values for their slots. Now I want to select a
limited number of facts that are most suitable, according to some
user-defined criterion.
My idea was to set up a defquery and then use Java sorting to order
Maybe this is coming close to what you want.
; your fact template
(deftemplate Fact (slot id)(slot a)(slot b)(slot c))
; supposed to contain the rating functions for the slot values
(deftemplate Func (slot fa)(slot fb)(slot fc))
; the computed ranking for a fact
(deftemplate Rank (slot r)(slot
Hi Jan,
Couldn't you simply write one or more rules that place matching fact
bindings into an arbitrary collection class?
I'm assuming that you are filtering only on one type of fact. For example:
(clear)
(import java.util.ArrayList)
(watch all)
(deftemplate somefact
(slot x)
(slot y)
I'm considering Jess for a software project that reasons about large-
ish data sets of small objects. Perhaps people could comment on
whether they think JESS is a suitable engine.
From what I know of CLIPS, the rule based system would be a very good
way to transform the data sets in terms
Working memories of the order of a 100,000 facts are actually pretty
routine. Any quadratic behavior will kill you, so you have to be
careful to write the rules properly. But a few hundred thousand
facts is not a problem at all.
Jess doesn't spool working memory to disk; it lives in RAM.
On Nov 27, 2007, at 10:59 AM, Ernest Friedman-Hill wrote:
Jess doesn't spool working memory to disk; it lives in RAM. There
are techniques for telling Jess how to only load the facts it
actually needs, however.
Can you elaborate a bit more on that?
Hi,
I've noticed the following problem. A rule matches a fact and its id is
assigned to some variable ?m. Later, in the body of that rule I call twice
the (modify) function on ?m. The program started acting strange so I
switched to (watch facts) mode and it turns out, that on one input (in no
Hi!
I am a relatively new Jess user so please forgive me
if this question is trivial.
I am running Protege 3.2.1 using JessTab under which I
am running Jess V7.0p1. I have an ontology built in
Protege which I map to Jess facts using the mapclass
function in JessTab. I wrote a rule which uses a
Facts can be selected in rank order with a defquery and a Java collection.
(deftemplate sample
Sample facts to be ranked
(declare (ordered FALSE))
(slot primary (type INTEGER) (default 0))
(slot secondary (type INTEGER))
(slot stuff)
)
(defquery sample-query
Query for
Two things to understand:
1) Jess's working memory can't contain duplicate facts. If you modify
a fact and it becomes identical to another fact, then the modified
fact object is effectively removed from working memory. You can think
of it as merging with the pre-existing fact that it is
Remember that pattern-matching is driven by fact assertions,
retractions, and modifications. Matches involving global variables
will be evaluated when working memory changes cause the patterns to
be matched. Changing a global variable will *not* cause the matching
to be reevaluated. So,
n Nov 27, 2007, at 2:45 PM, Hal Hildebrand wrote:
On Nov 27, 2007, at 10:59 AM, Ernest Friedman-Hill wrote:
Jess doesn't spool working memory to disk; it lives in RAM. There
are techniques for telling Jess how to only load the facts it
actually needs, however.
Can you elaborate a bit
Hi,
Is there a way to temporarily holding off rule firing when some facts get
deleted and some facts get added in the same time? I'm using Jess in
'runUntilHalt' mode and I know there is a workaround for my question which is
to assert a (updating-facts) when batch facts get updated and then
13 matches
Mail list logo