I think Sanket Dinesh Choksey wrote: > Hi, > > Is there any fixed, specific strategy to determine the activation order? > > Heres what i am doing: > > 1. Load some facts and rules in JESS. > 2. Save the facts in an arraylist. > 3. get the list of activations. (activation list: A B) > 4. fire first activation > 5. reload the state from the arrayList > 6. get the list of activations (activation list: B A) > 7. now the order of activations is different than what i got previously.
I can't picture precisely what you're doing, or especially why (can you explain what you're trying to accomplish? We can probably tell you a far better way to do it!) but the ordering of the agenda depends on the order in which facts are asserted and/or modified, so perhaps you're not reasserting them in the same order (and of course, if any facts were modified, removing all the facts and adding them all back in in *any* order may not recreate the same agenda. If you want to save the engine's complete state, including the Rete memories and the agenda, which will get you back to precisely the same state every time, you can serialize the Rete object, or use the bload and bsave functions (which serialize just its "guts".) So why are you taking all the facts out and putting them back, anyway? --------------------------------------------------------- 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] --------------------------------------------------------------------
