edu.indiana.iucbrf.maintenance
Class UnusedRemovedMaintenance

java.lang.Object
  extended by edu.indiana.iucbrf.maintenance.Maintenance
      extended by edu.indiana.iucbrf.maintenance.UnusedRemovedMaintenance
All Implemented Interfaces:
java.io.Serializable

public class UnusedRemovedMaintenance
extends Maintenance

An implementation of some basic maintenance which may be sufficient for some systems. See method descriptions for details.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.indiana.iucbrf.maintenance.Maintenance
checkRemoveFrequency
 
Constructor Summary
UnusedRemovedMaintenance()
          Creates new UnusedRemovedMaintenance
 
Method Summary
 boolean shouldAddCase(Case currentCase, SolutionQuality quality, RetrievalResults retrieved, CaseBase CB, PerformanceMonitor monitor)
          Determine whether or not a case should be added to the case base.
 boolean shouldRemoveCase(Case currentCase, CaseBase CB, PerformanceMonitor monitor)
          Determine whether or not a case should be removed from the case base.
 
Methods inherited from class edu.indiana.iucbrf.maintenance.Maintenance
getCheckRemoveFrequency, removeUnneededCases, setCheckRemoveFrequency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnusedRemovedMaintenance

public UnusedRemovedMaintenance()
Creates new UnusedRemovedMaintenance

Method Detail

shouldRemoveCase

public boolean shouldRemoveCase(Case currentCase,
                                CaseBase CB,
                                PerformanceMonitor monitor)
Determine whether or not a case should be removed from the case base. The implementation here is as follows:
For s cases in the case base, a single case should be used at least once in every s episodes, since the time it was added to the case base. If this has not occurred for a case, then that case is considered irrelevant, and is removed.

Specified by:
shouldRemoveCase in class Maintenance
Parameters:
currentCase - The case under consideration.
CB - The case base from which the case might need to be removed.
monitor - The performance monitor for this system.
Returns:
true if case should be removed, false otherwise

shouldAddCase

public boolean shouldAddCase(Case currentCase,
                             SolutionQuality quality,
                             RetrievalResults retrieved,
                             CaseBase CB,
                             PerformanceMonitor monitor)
Determine whether or not a case should be added to the case base. For this implementation, a case is always added.

Specified by:
shouldAddCase in class Maintenance
Parameters:
currentCase - The case under consideration.
Quality - The Quality of the quality of the solution.
CB - The case base to which the case might be added.
monitor - The performance monitor for this system.
Returns:
true if case should be added, false otherwise