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

## uchicago.src.sim.engine
Interface SimModel

All Superinterfaces:
  DescriptorContainer, SimEventProducer

All Known Implementing Classes:
  AsynchAgentsModel, EnnBase, EnnBatchModel, EnnModel, GeneticChangeModel, GisBugsModel, HBNoGui, HeatBugsModel, HexaBugsModel, HyperModel, JainModel, JiggleModel, JinGirNewModelII, LifeModel, MouseTrapModel, NeuralModel, NeuralModelFromFile, OpenMapAgentsSampleModel, RabbitPopulationModel, RegressionOfficeModel, SimModelImpl, SimpleModel, SugarModel

    public interface SimModel

extends SimEventProducer, DescriptorContainer

Interface for all RePast models.

Version:
  $Revision: 1.7 $ $Date: 2004/11/03 19:50:57 $
Author:
  Nick Collier (Modified by Michael J. North)

Method Summary
`void` | `begin()` Begins a simulation run.
`void` | `clearMediaProducers()` Clears the vector of displaySurface
`void` | `clearPropertyListeners()` Clears the list of property listeners.
`void` | `generateNewSeed()` Generates a new random number seed and makes it the default.
`IController` | `getController()` Gets the BaseController associated with this model.
`java.lang.String[]` | `getInitParam()` Gets the names of the initial model parameters to set.
`java.util.Vector` | `getMediaProducers()` Gets a Vector of the MediaProducers registered with this model.
`ModelManipulator` | `getModelManipulator()` Gets the ModelManipulator.
`java.lang.String` | `getName()` Gets the name of the model/simulation.
`java.util.Hashtable` | `getParameterDescriptors()` Gets a hashtable of ParameterDescriptors where key is parameter name, and value is the ParameterDescriptor.
`java.lang.String` | `getPropertiesValues()` Gets a list of the simulation properties and values.
`long` | `getRngSeed()` Gets the default random number seed.
`Schedule` | `getSchedule()` Gets the Schedule created by the model.
`double` | `getTickCount()` Gets the current tick count for the execution of this model
`void` | `setController(IController controller)` Sets the controller for this simulation model
`void` | `setRngSeed(long seed)` Sets the random number seed.
`void` | `setup()` Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default.

Methods inherited from interface uchicago.src.sim.engine.SimEventProducer
`addSimEventListener, fireSimEvent, removeSimEventListener`

Method Detail

### getInitParam

    java.lang.String[] getInitParam()

  Gets the names of the initial model parameters to set. These names must have get and set methods supplied by the model. For example, for the parameter maxAge, the model must have getMaxAge and setMaxAge methods.

  Returns:
    a String[] of the initial parameter names

### begin

    void begin()

  Begins a simulation run. All initialization, building the model, diplay, etc. should take place here. This method is called whenever the start button (or the step button if the run has not yet begun) is clicked. If running in batch mode this is called to kick off a new simulation run.

### setup

    void setup()

  Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default. Called whenever the setup button is clicked or if operating in batch mode whenever a single run has ended in preparation for the next. Also called when the model is first loaded.

### getSchedule

    Schedule getSchedule()

  Gets the Schedule created by the model.

  Returns:
    the schedule created by the model

### getName

    java.lang.String getName()

  Gets the name of the model/simulation.

  Returns:
    the name of the model/simulation

### getPropertiesValues

    java.lang.String getPropertiesValues()

  Gets a list of the simulation properties and values. For example,

       MaxVision: 3
       MaxMetabolism: 4
       NumAgents: 52

  Returns:
    the String of properties and values

### setRngSeed

    void setRngSeed(long seed)

  Sets the random number seed. This sets the seed for the generator for random number distributions in the Random class.

  Parameters:
    `seed` - the random number seed.
  See Also:
    `Random`

### getRngSeed

    long getRngSeed()

  Gets the default random number seed.

### generateNewSeed

    void generateNewSeed()

  Generates a new random number seed and makes it the default.

### getTickCount

    double getTickCount()

  Gets the current tick count for the execution of this model

  Returns:
    the current tick count

### setController

    void setController(IController controller)

  Sets the controller for this simulation model

  Parameters:
    `controller` - the controller to associate with this model

### getController

    IController getController()

  Gets the BaseController associated with this model.

### getModelManipulator

    ModelManipulator getModelManipulator()

  Gets the ModelManipulator.

### getMediaProducers

    java.util.Vector getMediaProducers()

  Gets a Vector of the MediaProducers registered with this model.

### clearMediaProducers

    void clearMediaProducers()

  Clears the vector of displaySurface

### clearPropertyListeners

    void clearPropertyListeners()

  Clears the list of property listeners.

### getParameterDescriptors

    java.util.Hashtable getParameterDescriptors()

  Gets a hashtable of ParameterDescriptors where key is parameter name, and value is the ParameterDescriptor.

  Specified by:
    `getParameterDescriptors` in interface `DescriptorContainer`

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