I think =?windows-1252?Q?Joaquin_Ca=F1adas?= wrote:
> 
> (defrule create-Estado_Fenologico
> (need-Parral (Estado_Fenologico ?))

Note that this pattern matches every need-Parral fact, regardless of
the contents of any slot; the blank variable "?" matches anything. The
entire slot Estado_Fenologico needn't be mentioned here to get exactly
the same effect.
> 
> (defrule create-Dias_Hasta_Recoleccion
> (need-Parral (Dias_Hasta_Recoleccion ?))

Same for this rule. The match conditions for both of these rules are
the same; both will fire any time any need-Parral fact is assered.

> 
> The general idea is how to ask to the users the unknown slots which 
> appear in the LHS rules, using backward-chaining. And how to assert the 
> slots values of a fact in a independent way.

You can't assert slots independently any more than you can create the
member variables of a Java object independently; you have to create
the whole object at once. You can *set* the slots independently, but
that would be a mess.

You just want to do something like this: one rule to replace both of
the above:

(defrule create-Dias_Hasta_Recoleccion
  (need-Parral (Dias_Hasta_Recoleccion ?d) (Estado_Fenologico ?e))
  =>
  (if (eq nil ?d) then
    (printout t "Dias_Hasta_Recoleccion? ")
    (bind ?d (read)))
  (if (eq nil ?e) then
    (printout t "Estado_Fenologico? ")
    (bind ?e (read)))
  (assert (Parral (Dias_Hasta_Recoleccion ?d) (Estado_Fenologico ?e))))

---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov


--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to