Most likely one of the properties of 'sim' is misspelled - the
capitalized 'Tuesday' is a likely candidate.

Note that the next version of Jess 5 will be much better at reporting
errors like this.

I think Ron King wrote:
> 
> Hello Jess Users!
> 
> Can anyone tell me whats causing this error?
> 
> java.lang.ArrayIndexOutOfBoundsException
>         at jess/ValueVector.get
>         at jess/Deftemplate.getSlotType
>         at jess/Jesp.parsePattern
>         at jess/Jesp.doParseDefrule
>         at jess/Jesp.parseDefrule
>         at jess/Jesp.parseSexp
>         at jess/Jesp.parse
>         at jess/Batch.call
>         at jess/Funcall.simpleExecute
>         at jess/Funcall.execute
>         at jess/Funcall.execute
>         at jess/Jesp.parseAndExecuteFuncall
>         at jess/Jesp.parseSexp
>         at jess/Jesp.parse
>         at jess/Rete.executeCommand
>         at jess/toolkit/simulator/MainInJava.main
> 
> ERROR: java.lang.ArrayIndexOutOfBoundsException
> 
> I have created a  bean named  'sim':
> 
> Here is the rule:
> 
> (defrule rule-1
>   (sim (close ?close) (OBJECT ?sim))
>   (sim (open ?open) (OBJECT ?sim))
>   (sim (low ?low) (OBJECT ?sim))
>   (sim (volume ?volume) (OBJECT ?sim))
>   (sim (Tuesday ?Tuesday) (OBJECT ?sim))
>   (test
>  (if  (IfGreater (norm -0.607162 ?open)
>                         (AvgClose 7)) then
>              (if  (IfLess ?low ?volume) then
>                      (and ?Tuesday ?After0530)) else
>              (Equal ( norm ?close ?open)
>                     ( LagVolume 10)))
>   )
>   =>
>   (store "hit" 1)
>   (printout t "hit " ?result crlf))
> 
> 
> Regards,
> 
> Ron King
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to