An Experiment, is a complete Host, Node, Agent, Component mapping
containing all required runtime variables and components.
A completed Experiment can be handed off to a COUGAAR node and
run, with no additional parameters required.
Adds a component to the experiment. If the component is a society, and
the experiment already contains a society, an exception is thrown. If the
component is not a SocietyComponent or a RecipeComponent
an exception is thrown.
Parameters: comp - Component to add to the experiment. throws: IllegalArgumentException - Expception if component known, or already exists.
Adds a new host to this experiment. An exception is thrown
if the experiment already contains a host of the same name.
Parameters: name - Name of the new host. HostComponent of the new host. throws: IllegalArgumentException - Exception if the host is already defined in the experiment.
Adds a node to the experiment. If the experiment already contains a node
of the same name, an exception is thrown.
Parameters: name - Name of the new node. NodeComponent for the new node. throws: IllegalArgumentException - Exception if the experiment already contains the node.
Adds a specific recipe component to this experiment. If the recipe already exists in
the experiment, an exception is thrown
Parameters: recipe - New recipe component to add to the experiment. throws: IllegalArgumentException - Exception is thrown if the experiment already contains this recipe.
Adds a society, as a SocietyComponent to the experiment. A society contains
a complete Node/Agent/Component mapping.
Each experiment can only contain one Society. If a society already exists, an exception is
thrown.
Parameters: sc - The new society throws: IllegalArgumentException - Exception is thrown if the experiment already contains a society.
Determines if the given agent name is unique within this experiment.
Parameters: name - Name of agent to check for uniqueness true if the agent is unique, else false.
Copies this component, and returns a copy with the name specified.
Parameters: uniqueName - name of the new Component. new ModifiableComponent copy of this component.
Gets a specific RecipeComponent specified by the index it was stored.
Parameters: i - - index of the recipe to retrieve. A RecipeComponent of the recipe found at the specified index. throws: IndexOutOfBoundsException - Exception thrown if index out of bounds occurs.
Imports an HNA mapping into the experiment. This
method is only relevant for database experiments. Experiments
from XML already contain their own HNA mapping.
Parameters: parent - Component containing the HNA mapping.
Removes a specific component, specified as a ModifiableComponent.
An exception is thrown if the Component to be removed is not a SocietyComponent
or a RecipeComponent Parameters: comp - Component to remove from the experiment. throws: IllegalArgumentException - Exception if the component is of unknown type.
Renames a node, in the NodeComponent to the new given name
Parameters: nc - NodeComponent to be renamed. Parameters: name - New name of the node. throws: IllegalArgumentException -
Saves the current Experiment. If the Experiment Instance is
a database instance DBExperiment. The experiment is
saved to the database.
Currently, Saving of an XMLExperiment is not implemented.
Parameters: handler - Database conflict handler. This handler is onlyused for DBExperiment instances. All othersignore it.