Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nl.tudelft.simulation.dsol.experiment
Class Experiment

    java.lang.Object
      nl.tudelft.simulation.event.EventProducer
          nl.tudelft.simulation.dsol.experiment.Experiment

All Implemented Interfaces:
  java.util.EventListener, nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventProducerInterface, java.io.Serializable

public class Experiment
extends nl.tudelft.simulation.event.EventProducer
implements nl.tudelft.simulation.event.EventListenerInterface, java.io.Serializable

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

Version:
  2.0 21.09.2003
Author:
  Peter Jacobs , Alexander Verbraeck
See Also:
  Serialized Form

Field Summary
`static nl.tudelft.simulation.event.EventType` | `END_OF_EXPERIMENT_EVENT` END_OF_EXPERIMENT_EVENT is fired when the experiment is ended
`static java.lang.String` | `EXPERIMENT_ANALYST` EXPERIMENT_ANALYST the analyst name property
`static java.lang.String` | `EXPERIMENT_NAME` EXPERIMENT_NAME the name property
`static nl.tudelft.simulation.event.EventType` | `MODEL_CHANGED_EVENT` MODEL_CHANGED_EVENT is fired whenever the model is changed
`static nl.tudelft.simulation.event.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
`java.lang.String` | `getProperty(java.lang.String key)` returns a property
`java.lang.String` | `getRun()` returns the current run
`SimulatorInterface` | `getSimulator()` returns the simulator
`Treatment[]` | `getTreatments()` returns the treatments
`java.net.URL` | `getUrl()` returns the URL
`void` | `notify(nl.tudelft.simulation.event.EventInterface event)`
`void` | `reset()` resets the experiment
`void` | `setModel(ModelInterface model)` sets the model on the experiment
`void` | `setProperty(java.lang.String key, java.lang.String value)` sets a property
`void` | `setSimulator(SimulatorInterface simulator)` sets the simulator
`void` | `setTreatments(Treatment[] treatments)` sets the treatments
`void` | `setUrl(java.net.URL url)` sets the URL of the experiment
`void` | `start()` starts the experiment on a simulator
`java.lang.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 nl.tudelft.simulation.event.EventType END_OF_EXPERIMENT_EVENT

  END_OF_EXPERIMENT_EVENT is fired when the experiment is ended

### MODEL_CHANGED_EVENT

    public static final nl.tudelft.simulation.event.EventType MODEL_CHANGED_EVENT

  MODEL_CHANGED_EVENT is fired whenever the model is changed

### SIMULATOR_CHANGED_EVENT

    public static final nl.tudelft.simulation.event.EventType SIMULATOR_CHANGED_EVENT

  SIMULATOR_CHANGED_EVENT is fired whenever the simulator is changed

### EXPERIMENT_NAME

    public static final java.lang.String EXPERIMENT_NAME

  EXPERIMENT_NAME the name property

  See Also:
    Constant Field Values

### EXPERIMENT_ANALYST

    public static final java.lang.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 java.lang.String getRun()

  returns the current run

  Returns:
    String

### start

    public void start()

  starts the experiment on a simulator

### getProperty

    public java.lang.String getProperty(java.lang.String key)

  returns a property

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

### setProperty

    public void setProperty(java.lang.String key,
                            java.lang.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 java.net.URL getUrl()

  returns the URL

  Returns:
    URL

### notify

    public void notify(nl.tudelft.simulation.event.EventInterface event)

  Specified by:
    `notify` in interface `nl.tudelft.simulation.event.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

  Returns:
    Treatment

### setTreatments

    public void setTreatments(Treatment[] treatments)

  sets the treatments

  Parameters:
    `treatments` - reflect the treatments

### setUrl

    public void setUrl(java.net.URL url)

  sets the URL of the experiment

  Parameters:
    `url` - the URL

### toString

    public java.lang.String toString()

  See Also:
    `Object.toString()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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