Hello everybody,
For those that did not read my last post, I am doing a simulation program
with Jess. By using Scott Moss good advice (thanks again Scott), I have a
function that looks like this:
private void simulate(){
// Initialize the rule engine.
assertFacts();
defineRules();
for (int tick = 0; t < duration; tick++) {
// Modify the tick shadow fact.
setTick(tick);
try {
// Put modules on stack: they become current in reverse order.
engine.setFocus("CLEANUP");
engine.setFocus("SIMATION");
// Simulate for this tick.
engine.run();
}catch(JessException exception){
handleException(exception)
}
updateGui();
}
undefineRules();
retractFacts();
}
Now, my question may seem stupid but I am wondering: do the shadow facts
necessarily have the same slot values after each simulate() calls? Maybe I
am wrong, but I think that if I always assert the same set of facts, in the
same order, I always define the same set of rules, and I always use forward
chaining, the result should be always the same for each simulate() calls. Is
it correct?
Thank you in advance.
NicolasF
--------------------------------------------------------------------
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]
--------------------------------------------------------------------