Hi,
Three ideas:
1) Have a look at the archive of this list from the last few days:
http://www.mail-archive.com/[email protected]
Vera Lucia da Silva has been describing her application in which one
main Jess program runs subprograms in separate Rete instances. This
does mean, though, that the subinstances don't see the fact-list from
the main program, which might not work for you.
2) Another option is to use the (undefrule) command; you could have the
last rule that fires in a subprogram call (undefrule) for each rule in
the subprogram.
3) A third option is to use control facts. It's actually likely that
leaving all the rules in memory at once will be more performant than
loading and unloading them. The main program could instead of loading
and unloadiung rules simply assert a fact like (subprogram 1) and all
the rules in subprogram 1 could include (subprogram 1) on their
LHSs. WHen you don't want the rules to fire anymore, you simply
retract that fact.
I think M Ward wrote:
>
> Hello everyone,
>
> I have been asked to encode a decision tree that has 3 branches at
> the top level . As these branches are mutually exclusive, I have
> achieved this by splitting the expert system into four parts:
>
> A main program that ascertains which branch of the decision
> tree the user wishes to follow and then runs the sub-program
> associated with that choice. After the sub-program has run to
> completion, this main program also enquires whether the user wishes
> to start again.
>
> Three sub-programs, each of which contains an expert system for a
> branch of the decision tree.
>
> I have been using the (batch) command in the main program to run the
> selected sub-program. Unfortunately the rules associated with the
> sub-program remain in the system's production memory after control
> returns to the main program.
>
> Could someone tell me a way of removing these sub-program rules
> without affecting the main program's rules? Or is there a better
> method than (batch) for loading the sub-program's rules on a temporary
> basis?
>
> Many thanks,
>
> Michael D.M Ward
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
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 (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------