I think Michael McConnell wrote:
> Jess> (batch AVIS\\avis-proto.clp)
> Jess reported an error in routine ValueVector.get
> while executing (batch
> AVIS\avis-rules-proto-rules.clp)
> while executing (batch AVIS\avis-proto.clp).
> Message: Bad index -3 in call to get() on this
> vector: (name nil -1 loc nil -1 s
> 1 days-required nil -1 rate-type nil -1 res-num nil -1
> car-group-name nil -1).
> Program text: ( batch AVIS\avis-proto.clp ) at line
> 1.
That silly "Bad index -3" message always means you've mispelled the
name of a slot, somewhere. I promise in Jess 6.0a7, it will finally be
gone, and there will be clear, compile-time reporting of this
kind of error.
Looking at the slot names in the stack trace, it's a (reservation)
pattern someplace.
>
> ;; reservation attribute
> (deftemplate reservation
> (slot name)
> (slot loc)
... etc
This rule tries to match a "days requested" slot. There isn't one --
there's a "days-required" slot. I think that's it.
> (defrule rule2_ReservationToCheckout
> (current-name ?current-name)
> (reservation (start-date ?start-date)(days-requested ?days-requested)
>(name ?name) (loc ?loc) (rate-type ?rate-type))
> (test (eq (?name ?current-name)))
>
> =>
...
I didn't scrutinize everything to make sure there aren't others, but
this one jumped out at me.
I saw a couple of other oddities: (modify (?slot-name ?value)) won't
work -- the slot name has to be a compile-time constant.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [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 (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------