nl.tudelft.simulation.dsol.experiment
Class Experiment

java.lang.Object
  extended by nl.tudelft.simulation.event.EventProducer
      extended by nl.tudelft.simulation.dsol.experiment.Experiment
All Implemented Interfaces:
Serializable, EventListener, EventListenerInterface, EventProducerInterface

public class Experiment
extends EventProducer
implements EventListenerInterface, Serializable

The Experiment specifies the parameters for a simulation experiment
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:31 $
Author:
Peter Jacobs , Alexander Verbraeck
See Also:
Serialized Form

Field Summary
static EventType END_OF_EXPERIMENT_EVENT
          END_OF_EXPERIMENT_EVENT is fired when the experiment is ended
static String EXPERIMENT_ANALYST
          EXPERIMENT_ANALYST the analyst name property
static String EXPERIMENT_NAME
          EXPERIMENT_NAME the name property
static EventType MODEL_CHANGED_EVENT
          MODEL_CHANGED_EVENT is fired whenever the model is changed
static EventType SIMULATOR_CHANGED_EVENT
          SIMULATOR_CHANGED_EVENT is fired whenever the simulator is changed
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
Experiment()
          constructs a new Experiment
 
Method Summary
 ModelInterface getModel()
          returns the model
 String getProperty(String key)
          returns a property
 String getRun()
          returns the current run
 SimulatorInterface getSimulator()
          returns the simulator
 Treatment[] getTreatments()
          Returns the treatments of this experiment
 URL getUrl()
          returns the URL
 void notify(EventInterface event)
           
 void reset()
          resets the experiment
 void setModel(ModelInterface model)
          sets the model on the experiment
 void setProperty(String key, String value)
          sets a property
 void setSimulator(SimulatorInterface simulator)
          sets the simulator
 void setTreatments(Treatment[] treatments)
          sets the treatments of an experiment
 void setUrl(URL url)
          sets the URL of the experiment
 void start()
          starts the experiment on a simulator
 String toString()
           
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

END_OF_EXPERIMENT_EVENT

public static final EventType END_OF_EXPERIMENT_EVENT
END_OF_EXPERIMENT_EVENT is fired when the experiment is ended


MODEL_CHANGED_EVENT

public static final EventType MODEL_CHANGED_EVENT
MODEL_CHANGED_EVENT is fired whenever the model is changed


SIMULATOR_CHANGED_EVENT

public static final EventType SIMULATOR_CHANGED_EVENT
SIMULATOR_CHANGED_EVENT is fired whenever the simulator is changed


EXPERIMENT_NAME

public static final String EXPERIMENT_NAME
EXPERIMENT_NAME the name property

See Also:
Constant Field Values

EXPERIMENT_ANALYST

public static final String EXPERIMENT_ANALYST
EXPERIMENT_ANALYST the analyst name property

See Also:
Constant Field Values
Constructor Detail

Experiment

public Experiment()
constructs a new Experiment

Method Detail

setSimulator

public void setSimulator(SimulatorInterface simulator)
sets the simulator

Parameters:
simulator - the simulator

getSimulator

public SimulatorInterface getSimulator()
returns the simulator

Returns:
SimulatorInterface

getRun

public String getRun()
returns the current run

Returns:
String

start

public void start()
starts the experiment on a simulator


getProperty

public String getProperty(String key)
returns a property

Parameters:
key - properties are stored as key-value
Returns:
String the property

setProperty

public void setProperty(String key,
                        String value)
sets a property

Parameters:
key - properties are stored in key-value pairs
value - properties are stored in key-value pairs

getModel

public ModelInterface getModel()
returns the model

Returns:
ModelInterface the model

getUrl

public URL getUrl()
returns the URL

Returns:
URL

notify

public void notify(EventInterface event)
Specified by:
notify in interface EventListenerInterface
See Also:
#notify(nl.tudelft.simulation.event.EventInterface)

reset

public void reset()
resets the experiment


setModel

public void setModel(ModelInterface model)
sets the model on the experiment

Parameters:
model - the simulatormodel

getTreatments

public Treatment[] getTreatments()
Returns the treatments of this experiment

Returns:
the treatments of this experiment

setTreatments

public void setTreatments(Treatment[] treatments)
sets the treatments of an experiment

Parameters:
treatments - the treatments

setUrl

public void setUrl(URL url)
sets the URL of the experiment

Parameters:
url - the URL

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.