Hi,
I'm trying to write a function that runs a query and after that to
remove or modify some of the returned facts. And I have a problem with
retrieving the fact id from the query result. Is there a way to retrieve
the fact id with run-query* without using the deprecated run-query?
Regards,
Hello,
Sorry to bother you again, I have narrowed down my previous issue to the
following:
My rule is as follows:
(defrule getConfigValue loads a single configuration value as a fact
(declare (auto-focus true))
(need-config(pid ?pid)(system ?system)(subSystem
?subSystem)(name
I would like to have functions contained in the slot value of a fact
and then apply them. I can create and assign the function values by
using (lambda ...), which seems to be what I'm looking for on that
side of the equation:
(deftemplate functional-fact
(slot func)
)
(assert
Have tried using the CallLambda Userfunction class from
http://herzberg.ca.sandia.gov/jesswiki/view?LambdaCallUserFunction
(load-function CallLambda)
(deftemplate functional-fact
(slot func)
)
(bind ?f (lambda (?x) ( 1 ?x)))
(assert (functional-fact (func ?f)))
(defrule
So I figured out how to fix this to do what I want. Basically, the
CallLambda Userfunction needs to check that the first argument is a
RU.BINDING in addtion to RU.LAMBDA. This this fix, things work as I
would like them to. Nice addition - and powerful, too.
public class CallLambda implements
Hello,
I'm looking for help regarding variable data types in Jess.
In our company's project we're using Jess to calculate with money,
so floating-point calculations aren't really usable for us, because of
rounding issues.
Our idea was to use the BigDecimal class because it has all the features
I'd like to use a rule of the following form:
(defrule rule557
(logical
(is-active (name Some name))
(in-coverage (tid ?tid) (cid ?cid) (distance ?distance:( 2
(count-query-results in-coverage-nearer-query ?tid ?distance
)
=
(assert (tracking-actual (tid
I want to compute the paths through edges using the following code:
code
(deftemplate edge (slot first) (slot second))
(deftemplate path(slot first) (slot second))
(defrule pathRule
(or (edge (first ?first) (second ?second))
(and (edge (first ?first) (second ?mid))
Hi,I'm trying to write a program that asks a user his telephone number in
GUI, then searches a database for that phone # using defquery, and outputs
some results. But when I run it I get an error as below.
Jess reported an error in routine QueryResult.get
while executing (call ?result getInt ca)
Hi,
I just started working with Jess (7.1p1) in Eclipse and unfortunately,
like several others reported earlier, I too have the problem that
Eclipse completely
stops responding when I try to save the .clp file. It gives no error
messages at all, it just hangs up (Windows reports that it has
Hi,
Is there a book on Jess?
Thank you
Greetings:
Just a reminder that if you want to attend the October Rules Fest (ORF) on
the 22nd - 24th of October in Dallas, you might should make your reservation
now if you have not done so already. The students from the DFW area (10
major universities plus lots of colleges) will find out in
if I understand what you're trying to do, you will need to use method
cal in the test pattern like
the catch is function-fact.func needs to return boolean true/false if
you want to use it in the LHS.
peter
On Thu, Aug 14, 2008 at 11:23 AM, Hal Hildebrand
[EMAIL PROTECTED] wrote:
I would like
Hi Jeen,
It's like Bigfoot or UFOs... we need to have some incontrovertible physical
evidence like a stack trace, error message, log file entry, or something
that shows what's happening. I've never found any clue -- Eclipse just
hangs (as you observed) and only killing the process and
Hi Hal,
Clean up your code a bit, and I think it works fine. :-)
; hal.clp
(clear)
(watch all)
(deftemplate functional-fact
(slot func))
(defrule test-me
(functional-fact (func ?function))
(test (?function 0))
=
(printout t 1 0 crlf))
; PROGRAM
(reset)
(assert
The value of next on the QueryResult is not being checked. If next returns
false, the message below will be seen as if next had not been called. The
getInt method and other get methods could throw a JessException with a
different message when called after next returns FALSE, but doesn't.
Bob
Hi Mike,
Of course! See http://www.jessrules.com/jesswiki/view?JessInAction and
http://www.manning.com/friedman-hill/
I think it's out of print now, but the online version is available and it
saves trees!
Do check out the Jess Wiki for many topics contributed by the Jess
community.
17 matches
Mail list logo