Re: JESS: Naming facts

2006-01-19 Thread Alan Moore
You could also try something like the following: WARNING: not real code... file: DeviceMonitor.jess (import com.yourpackage.Device) (defclass Device com.yourpackage.Device) (defrule shutdown-out-of-limit-devices (Device (outOfLimit TRUE) (id ?deviceId) (OBJECT ?obj)) => (printout t "Devi

Re: JESS: Firing order

2005-11-20 Thread Alan Moore
Nicolas Fortin wrote: Hello everybody, I am wondering if it is possible to randomize the firing order, You can create an object that implements the jess.Strategy interface, see: http://herzberg.ca.sandia.gov/jess/docs/70/api/jess/Strategy.html You will implement the compare() method and Jess

Re: JESS: Debugger

2005-11-17 Thread Alan Moore
[EMAIL PROTECTED] wrote: I think Jeffrey Davine wrote: I'll do the research, but as a general matter, do you think the Jess API exposes enough information (particularly concerning the rete tokens) so that I could write such a tool? Alan's more optimistic, but I myself don't think this can re

Re: FW: JESS: Debugger

2005-11-16 Thread Alan Moore
Jeffrey, I created a debugger quite a few years back (Jess version 4.xx) that I have not maintained. I'd have to locate the media it is archived onto but I've been wanting to resurrect it. It didn't do exactly what you want and it was pretty crude since it was fronted by the Windows Scriptin

Re: JESS: Debugger

2005-11-16 Thread Alan Moore
Try this: (view) It displays the rete in a swing based graph. alan Jeffrey Davine wrote: Does Jess have a built-in facility to browse rules? By that I mean a way to check, for any rule, which if any facts match patterns in the rule (showing how the fact is bound to the pattern) and whether

Re: JESS: Jess error: Bad index

2005-11-01 Thread Alan Moore
Eunice, Please provide the exact code and error messages you are getting. Please try to figure out whether the problem is with Protege, JessTab and/or Jess before posting to this list. For example, copy key portions (e.g. function names, exception names) of the stacktrace you are getting and

Re: JESS: Converting from/to strings

2005-10-21 Thread Alan Moore
Henrique Lopes Cardoso wrote: Hi, I have two problems. ---> The first: I have a string which contains an atom. How do I convert it to an atom? I tried this,which works: (bind ?string "henrique") (nth$ 1 (explode$ ?string)) Is there a simpler way? I can't think of any at the mome

Re: JESS: Using multifields in LHS

2005-10-21 Thread Alan Moore
Henrique, Also, if you are not modifying the multislot values but are simply converting strings to multislots so that you can search for value(s) in the string, you can use the new Jess 7.0 regex functionality, see: http://herzberg.ca.sandia.gov/jess/docs/70/rules.html#patterns Here is an ex

Re: JESS: Using multifields in LHS

2005-10-20 Thread Alan Moore
Henrique Lopes Cardoso wrote: Hi, I am having trouble in getting to multifields and strings. I was trying to evaluate the contents of a string in a rule's LHS: (assert (a "nice string")) Note: this asserts a single ordered fact with two fields. The first one is an ATOM and the second one is

Re: JESS: Using multifields in LHS

2005-10-20 Thread Alan Moore
Or more simply: (assert (a "nice string")) (assert (b nice)) ; note: "nice" (in quotes) won't work (defrule r1 (a ?x) (b ?y&:(member$ ?y (explode$ ?x))) => (printout t "Found!" crlf) ) (run) i.e. a non-zero value from (member$) evaluates in the pattern above like a TRUE - or like

Re: JESS: Blackboard Framework

2005-10-11 Thread Alan Moore
Scott, Someone else is likely to have a more relevant answer but I thought I'd give my 2 cents worth - it's been a while (15 years?!) so I hope I can remember this correctly... During my graduate studies I worked with Dr. Len Myers and others at CalPoly SLO on a BB based system that used CLI

Re: JESS: code works from java but not clp file

2005-10-11 Thread Alan Moore
> I wonder if anyone else running Jess with RePast has encountered a > similar problem. When people have trouble using Jess with one java library or another, such as repast, the problems tend to be generic java problems, e.g. missing library on the classpath, methods throwing exceptions unexpe

Re: JESS: code works from java but not clp file

2005-10-11 Thread Alan Moore
Also, in testing.clp, you can place the following code to help you debug the exception: ;; untested...ymmv (try (bind ?user-agent (new User "harvey")) catch ;; ?ERROR will be the caught throwable (printout t "ERROR = " (?ERROR toString) crlf) (printout t "cause = " ((?ERROR getCause)

Re: JESS: Problems with Jess and Eclipse

2005-10-07 Thread Alan Moore
Matt, Whoops, sorry - I didn't see your attachment. alan [EMAIL PROTECTED] wrote: In the screenshot, you show that you've defined two "classpath variables", one named source pointing to the "source" directory, and one named "jess" pointing to jess.jar. This is no guarantee that you've *used*

Re: JESS: Problems with Jess and Eclipse

2005-10-07 Thread Alan Moore
Matt, Setting the windows classpath environment variable shouldn't be necessary or may not even work at all since eclipse is likely to use classloaders that are limited to those directories/jars specified in the project configuration. I'm not an eclipse expert but you might want to ping the e

Re: JESS: Firing on subsets (again)

2005-10-05 Thread Alan Moore
Jerome, You can match against ordered facts like so: (defrule myRule (first second ? fourth fifth ? seventh) => (printout t "Rule fired") ) What this does is to match any of the following facts: (assert (first second dontcare fourth fifth dontcare seventh)) (assert (first second anything

Re: JESS: Matching a static variable

2005-10-03 Thread Alan Moore
First, let me mention that I'm happy to see someone using the brand-new "static imports" feature -- the thing that lets you use (CarClass.MINI) as a constant. [alan] Nice, this makes things a *lot* cleaner. Thanks! Third, let me mention, as I often do on this list (I really need to make this p

Re: JESS: Matrixes in Jess

2005-09-30 Thread Alan Moore
Yuri, You can use any/all facilities that Java has for matrices since Jess has full (reflective) access to the Java/third-party matrix APIs - see: http://math.nist.gov/javanumerics/jama If you want to pattern match against elements in a matrix, you can use multifields or ordered facts. For e

Re: JESS: firing on sub sets

2005-09-28 Thread Alan Moore
Jerome, I'm a little confused as to why your example below would work for either set of facts. First of all, your "rule" isn't a rule at all - it is a fact. (MAIN::webservice (service getaddress) (project sage) (org georgetown) (analystname blake) (analystrole lead) (priorit

Re: JESS: Module Question

2005-09-14 Thread Alan Moore
Scott, My advice is to make your Regions explicit instead of using modules for this purpose. You could create a Region class (in Java), create instances of these objects and definstance them as needed. Your rules could then pattern match against these Region objects. This is essentially ma

Re: JESS: Changing the value of Defglobal variables

2005-08-30 Thread Alan Moore
Richard, Kevin R. wrote: I'm planning on using a defglobal variable to reflect the state of a checkbox in the UI for my application. The value of this variable, therefore will be set and modified in Java. Looking at the Jess API, I don't see any means of changing the value of a Defglobal obje

Re: JESS: Announcing the Jess Wiki

2005-08-30 Thread Alan Moore
Jason, Nice! See you there... alan Jason Morris wrote: Hello All Jess Users, I am pleased to announce the launch of the Jess Wiki http://herzberg.ca.sandia.gov/jesswiki/view The Jess Wiki is a repository for a new Community of Practice centered on the existing Jess User community. One of

Re: JESS: JessDE Feature Request

2005-08-30 Thread Alan Moore
[EMAIL PROTECTED] wrote: Sorry for the delay -- I've been on vacation for a week. No worries - hope you had a good time! Your color-coding ideas are interesting but I think it's probably better to do things according to precedent. Wouldn't the "Eclipse way" be to have you Alt-click on a var

JESS: JessDE Feature Request

2005-08-22 Thread Alan Moore
Ernest, I've been using JessDE recently and found myself spending a considerable amount of time checking to make sure my variables were bound and used in the right places in the patterns. It seems to me that having a simple way to verify/highlight the bindings visually would help in this regar

RE: JESS: Jess agenda function

2004-05-03 Thread Alan Moore
Title: RE: JESS: Jess agenda function inline... > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of Michael Knapik > Sent: Monday, May 03, 2004 11:19 AM > To: [EMAIL PROTECTED] > Subject: JESS: Jess agenda function > > > I have a set of 5 rules

JESS: Re: Jess agenda function

2004-05-03 Thread Alan Moore
If you want to "manage" the agenda (conflict resolution) I think you will need to implement: http://herzberg.ca.sandia.gov/jess/docs/61/api/jess/Strategy.html Otherwise, you can change the default strategy with: (set-strategy) Does this answer your question or am I missing the point? alan --

RE: JESS: Re: 'mirroring' one jess process with another

2004-04-27 Thread Alan Moore
Title: RE: JESS: Re: 'mirroring' one jess process with another Take a look at the jess event mechanism. You could use this to activate your duplication code. I don't know if all the information you would need is available via the supplied event object(s) - TBD. Good luck! alan -Origi

JESS: Updated 7.0 trial?

2004-04-21 Thread Alan Moore
Title: Updated 7.0 trial? I finally had time to test out some new features in 7.0 but discovered that the download I saved has expired. Also, 7.0 no longer appears to be available for download. Is there going to be another preview release in the near future? Thanks in advance. alan