Reasoner
Class MonteCarloRunSet

java.lang.Object
  |
  +--Reasoner.MonteCarloRunSet

public class MonteCarloRunSet
extends java.lang.Object

Serves as a collection of closely related ObjectInferences produced by the pre-reasoner. It supports the Monte Carlo simulation that feeds into the distillation process. A Monte Carlo simulation consists of an arbitrary number of runs over the following steps:

  1. The reasoner creates a slightly alternative, yet equally valid, interpretation.
  2. A new MonteCarloRunSet is created.
  3. Each object produced by the reasoner is wrapped in its own ObjectInference.
  4. Each ObjectInference is added to the current MonteCarloRunSet.

See the Distiller for the next set of steps.

Version:
Created 14 March 2003
Author:
Dan Tappan
See Also:
ObjectInference, Distiller, StaticReasoner, SimulationEngine

Field Summary
private  java.util.Hashtable m_object_inferences
           
private  SemanticNetwork m_semantic_network_instance
           
private  java.lang.String m_set_name
           
 
Constructor Summary
MonteCarloRunSet(java.lang.String set_name)
          Creates an empty run set.
 
Method Summary
 void addObjectInference(ObjectInference object_inference)
          Adds an ObjectInference to this run set.
 MonteCarloRunSet getClone()
          Returns a deep copy of this run set.
 java.lang.StringBuffer getExport()
          Returns a string representation of the object inferences in this run set.
 java.lang.String getName()
          Returns the name of this run set.
 ObjectInference getObjectInference(java.lang.String object_name)
          Returns the specified ObjectInference in this run set.
 int getObjectInferenceCount()
          Returns the number of ObjectInferences in this run set.
 java.util.LinkedList getObjectInferenceNames()
          Returns a string list of the names of ObjectInferences in this run set.
 java.util.Enumeration getObjectInferences()
          Returns a list of ObjectInferences in this run set.
 SemanticNetwork getSemanticNetworkInstance()
          Returns the network instance of this run set.
 void overrideName(java.lang.String set_name)
          Replaces the name of this run set.
 void setSemanticNetworkInstance(SemanticNetwork semantic_network_instance)
          Sets the semantic network instance of this run set.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_set_name

private java.lang.String m_set_name

m_object_inferences

private java.util.Hashtable m_object_inferences

m_semantic_network_instance

private SemanticNetwork m_semantic_network_instance
Constructor Detail

MonteCarloRunSet

public MonteCarloRunSet(java.lang.String set_name)
Creates an empty run set.

Parameters:
set_name - - the name
Method Detail

addObjectInference

public void addObjectInference(ObjectInference object_inference)
                        throws java.lang.Exception
Adds an ObjectInference to this run set.

Parameters:
object_inference - - the object
Throws:
java.lang.Exception - - if the object is already present in this run set

getClone

public MonteCarloRunSet getClone()
Returns a deep copy of this run set.

Returns:
the clone

getExport

public java.lang.StringBuffer getExport()
Returns a string representation of the object inferences in this run set. This is used for exporting to Visio on Windows, so it uses the Windows newline sequence.

Returns:
the export
See Also:
Support.WINDOWS_NEWLINE

getObjectInference

public ObjectInference getObjectInference(java.lang.String object_name)
                                   throws java.lang.Exception
Returns the specified ObjectInference in this run set.

Parameters:
object_name - - the object name
Returns:
the object
Throws:
java.lang.Exception - - if the object is not present in this run set

getObjectInferences

public java.util.Enumeration getObjectInferences()
Returns a list of ObjectInferences in this run set.

Returns:
the list
See Also:
ObjectInference

getObjectInferenceCount

public int getObjectInferenceCount()
Returns the number of ObjectInferences in this run set.

Returns:
the count

getObjectInferenceNames

public java.util.LinkedList getObjectInferenceNames()
Returns a string list of the names of ObjectInferences in this run set.

Returns:
the list

getName

public java.lang.String getName()
Returns the name of this run set.

Returns:
the name

getSemanticNetworkInstance

public SemanticNetwork getSemanticNetworkInstance()
Returns the network instance of this run set.

Returns:
the semantic network instance
See Also:
setSemanticNetworkInstance(SemanticNetwork.SemanticNetwork)

overrideName

public void overrideName(java.lang.String set_name)
Replaces the name of this run set. This is used by the distiller to recode run sets.

Parameters:
set_name - - the new name

setSemanticNetworkInstance

public void setSemanticNetworkInstance(SemanticNetwork semantic_network_instance)
Sets the semantic network instance of this run set. This is the unique variant of the semantic network produced by the dynamic reasoner, which augments the original semantic network with attribute and relationship inferences based on the particular solution in a Monte Carlo run.

See Also:
getSemanticNetworkInstance()

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation
See Also:
Support.toPrettyString(java.lang.String)