12.07.2015 Views

flex Examples - LPIS

flex Examples - LPIS

flex Examples - LPIS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

50 Flex Example Listingsand the slave does not contain more than the master`s spare capacitythen empty the slave into the masterand write_action( 'empty slave into master' )because the emptier the master and the fuller the slave the better itis to empty the slave contents into the master ;score master`s spare capacity + slave`s contents .% The rules for slave ...rule fill_slaveif the slave is not fullthen fill up the slaveand write_action( 'fill slave' )because the emptier the slave the better it is to fill it ;score slave`s spare capacity .rule empty_slaveif the slave is not emptythen empty out the slaveand write_action( 'empty slave' )because the fuller the slave the better it is to empty it ;score slave`s contents .rule fill_slave_from_masterif the slave is not fulland the master contains more than the slave`s spare capacitythen fill the slave from the masterand write_action( 'fill slave from master' )because the emptier the slave and the fuller the master the betterit is to fill the slave from the master ;score slave`s spare capacity + master`s contents .rule empty_master_into_slaveif the master is not emptyand the master does not contain more than the slave`s spare capacitythen empty the master into the slaveand write_action( 'empty master into slave' )because the emptier the slave and the fuller the master the betterit is to empty the master contents into the slave ;score slave`s spare capacity + master`s contents .ruleset container_rulescontains start_rules ;select rule using conflict resolution with threshold 6 ;update ruleset using rule transition network ;initiate by doing restart ;terminate when the contents of the master is 4 .% The rules are now linked into a network by declaring groups ...group start_rulesfill_master, fill_slave .group fill_masterempty_master_into_slave, fill_slave_from_master,fill_slave, empty_slave .group empty_masterA Guide to the Flex Expert System Toolkit

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

Saved successfully!

Ooh no, something went wrong!