Nicolas Fortin wrote:
Hello everybody,
I am wondering if it is possible to randomize the firing order,
You can create an object that implements the jess.Strategy interface, see:
http://herzberg.ca.sandia.gov/jess/docs/70/api/jess/Strategy.html
You will implement the compare() method and Jess will call this method
to provide an ordering between any given two activations.
You will also need to tell Jess to use your strategy by calling:
http://herzberg.ca.sandia.gov/jess/docs/70/api/jess/Rete.html#setStrategy(jess.Strategy)
or:
http://herzberg.ca.sandia.gov/jess/docs/70/functions.html#set-strategy
Your Strategy implementation will have to examine both activations and
if the rule for each one is the same, apply a random ordering between
the two - I think...
For any two activations that are not from the same rule, you might want
to delegate to an existing Strategy implementation (e.g. the default one.)
Good luck!
alan
--------------------------------------------------------------------
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]
--------------------------------------------------------------------