edu.indiana.iucbrf.cbrsystem
Class CBRSystem

java.lang.Object
  extended by edu.indiana.iucbrf.cbrsystem.CBRSystem
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CCBRSystem, ClassificationSystem, DomainlessSystem, QuadrantSystem, QuadrantSystemRDB, RealtorSystem

public abstract class CBRSystem
extends java.lang.Object
implements java.io.Serializable

The CBRSystem component package is the overall wrapper for the case-based reasoning system. The CBRSystem class contains objects used to describe the particular implementation in use, for each of the major components of the system.

See Also:
Serialized Form

Field Summary
protected  Adaptation adaptation
          The adaptation policy.
protected  java.lang.String baseFilename
           
protected  CaseBase CB
          The case base representation.
protected  Context currentContext
          The context of the system defaults to Context.NORMAL_CONTEXT
protected  boolean debugMode
          Set to true to get diagnostic prints to screen.
static java.lang.String DEFAULT_BASE_FILENAME
           
protected  Domain domain
          The domain the system is working in.
protected  EpisodeSummaryPanel episodeSummaryPanel
           
protected  boolean guiMode
           
protected  Maintenance maintenance
          The maintenance policy.
protected  PerformanceMonitor performanceMonitor
          The means of tracking performance of the system.
protected  Retrieval retrieval
          The retrieval policy.
protected  java.lang.String title
           
 
Constructor Summary
CBRSystem()
          Creates new CBRSystem.
 
Method Summary
 void close()
           
protected  void finalize()
           
 Adaptation getAdaptation()
          Get the adaptation specification for this system.
 java.lang.String getBaseFilename()
           
 CaseBase getCB()
          Get the case base for this system.
 Context getContext()
          Get the current context of the system.
 boolean getDebugMode()
           
 Domain getDomain()
          Get the domain specification for this system.
 boolean getGUIMode()
           
 Maintenance getMaintenance()
          Get the maintenance specification for this system.
 PerformanceMonitor getPerformanceMonitor()
          Get the performance monitor for this system.
 Retrieval getRetrieval()
          Get the retrieval specification for this system.
 java.lang.String getTitle()
           
 void loadCBFromFile(java.lang.String baseFilename)
           
 void loadPerformanceMonitorFromFile(java.lang.String baseFilename)
           
 void saveCBToFile(java.lang.String baseFilename)
           
 void savePerformanceMonitorToFile(java.lang.String baseFilename)
           
 void saveSystemToFile()
           
 void setAdaptation(Adaptation adaptation)
          Set the adaptation specification for this system.
 void setBaseFilename(java.lang.String baseFilename)
           
 void setCB(CaseBase CB)
          Set the case base for this system.
 void setContext(Context context)
          Set the current context of the system.
 void setDebugMode(boolean debugMode)
           
 void setDomain(Domain domain)
          Set the domain specification for this system.
 void setGUIMode(boolean guiMode)
           
 void setMaintenance(Maintenance maintenance)
          Set the maintenance specification for this system.
 void setPerformanceMonitor(PerformanceMonitor performanceMonitor)
          Set the performance monitor for this system.
 void setRetrieval(Retrieval retrieval)
          Set the retrieval specification for this system.
 void setTitle(java.lang.String title)
           
 Solution solve(Problem p)
          Solve a problem according to the system specified by this object.
 Solution solve(Problem p, Solution expectedSolution)
          Solve a problem according to the system specified by this object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BASE_FILENAME

public static final java.lang.String DEFAULT_BASE_FILENAME
See Also:
Constant Field Values

CB

protected CaseBase CB
The case base representation.


performanceMonitor

protected PerformanceMonitor performanceMonitor
The means of tracking performance of the system.


retrieval

protected Retrieval retrieval
The retrieval policy.


maintenance

protected Maintenance maintenance
The maintenance policy.


adaptation

protected Adaptation adaptation
The adaptation policy.


domain

protected Domain domain
The domain the system is working in.


debugMode

protected boolean debugMode
Set to true to get diagnostic prints to screen. Otherwise set to false.


guiMode

protected boolean guiMode

episodeSummaryPanel

protected EpisodeSummaryPanel episodeSummaryPanel

currentContext

protected Context currentContext
The context of the system defaults to Context.NORMAL_CONTEXT


baseFilename

protected java.lang.String baseFilename

title

protected java.lang.String title
Constructor Detail

CBRSystem

public CBRSystem()
Creates new CBRSystem.

Method Detail

solve

public Solution solve(Problem p)
Solve a problem according to the system specified by this object.

Parameters:
p - The Problem object that needs to be solved.
Returns:
The Solution object for this problem.

solve

public Solution solve(Problem p,
                      Solution expectedSolution)
Solve a problem according to the system specified by this object.

Parameters:
p - The Problem object that needs to be solved.
expectedSolution - The expected solution for this problem, to which the system's solution will be compared.
Returns:
The Solution object for this problem.

setContext

public void setContext(Context context)
Set the current context of the system.


getContext

public Context getContext()
Get the current context of the system.


getCB

public CaseBase getCB()
Get the case base for this system.


setCB

public void setCB(CaseBase CB)
Set the case base for this system.


getPerformanceMonitor

public PerformanceMonitor getPerformanceMonitor()
Get the performance monitor for this system.


setPerformanceMonitor

public void setPerformanceMonitor(PerformanceMonitor performanceMonitor)
Set the performance monitor for this system.


getRetrieval

public Retrieval getRetrieval()
Get the retrieval specification for this system.


setRetrieval

public void setRetrieval(Retrieval retrieval)
Set the retrieval specification for this system.


getMaintenance

public Maintenance getMaintenance()
Get the maintenance specification for this system.


setMaintenance

public void setMaintenance(Maintenance maintenance)
Set the maintenance specification for this system.


getAdaptation

public Adaptation getAdaptation()
Get the adaptation specification for this system.


setAdaptation

public void setAdaptation(Adaptation adaptation)
Set the adaptation specification for this system.


getDomain

public Domain getDomain()
Get the domain specification for this system.


setDomain

public void setDomain(Domain domain)
Set the domain specification for this system.


getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getBaseFilename

public java.lang.String getBaseFilename()

setBaseFilename

public void setBaseFilename(java.lang.String baseFilename)

setDebugMode

public void setDebugMode(boolean debugMode)

getDebugMode

public boolean getDebugMode()

setGUIMode

public void setGUIMode(boolean guiMode)

getGUIMode

public boolean getGUIMode()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

close

public void close()

saveSystemToFile

public void saveSystemToFile()

saveCBToFile

public void saveCBToFile(java.lang.String baseFilename)

loadCBFromFile

public void loadCBFromFile(java.lang.String baseFilename)

savePerformanceMonitorToFile

public void savePerformanceMonitorToFile(java.lang.String baseFilename)

loadPerformanceMonitorFromFile

public void loadPerformanceMonitorFromFile(java.lang.String baseFilename)