24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7. Knowledge Specification Language 90<br />

means that each rule is fired just once.<br />

<strong>flex</strong> toolkit<br />

ruleset example_set9<br />

contains all rules ;<br />

update ruleset by removing each selected rule.<br />

Each time a rule is fired it can be moved to the top or the bottom of the<br />

current ruleset. Moving it to the top means it will be the first rule to be<br />

considered next time round, or moving it to the bottom means it will be the<br />

last rule to be considered. These two options are specified as follows.<br />

ruleset example_set10<br />

contains all rules ;<br />

update ruleset by promoting each selected rule.<br />

ruleset example_set11<br />

contains all rules ;<br />

update ruleset by demoting each selected rule.<br />

The rule agenda may be viewed as a cyclic queue, whereby the rule<br />

following the selected rule is used as the top of the agenda for the next<br />

cycle.<br />

ruleset example_set12<br />

contains all rules ;<br />

update ruleset by cyclic rotation of rules .<br />

The ruleset may be updated by removing from the rule agenda any rules<br />

whose conditions were not satisfied in the last cycle of the forward chaining<br />

engine.<br />

ruleset example_set13<br />

contains all rules ;<br />

update ruleset by removing any unsatisfied rule.<br />

A rule “network” may be specified enabling the agenda to switch between<br />

different groups of rules for each cycle. Each group may be defined using<br />

the KSL group construct, and after each rule is fired, the rule agenda<br />

becomes the set of rules specified by the group with the same name as the<br />

rule which was just fired.<br />

ruleset example_set14<br />

contains all rules ;<br />

update ruleset using rule transition network.<br />

Finally, in addition to these built-in update methods you may define your<br />

own.<br />

ruleset example_set15<br />

contains all rules ;<br />

update ruleset using user_update .<br />

In this case <strong>flex</strong> will look for a definition of user_update/3 (which may be

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!