Package nl.tudelft.simulation.dsol.tutorial.section43

## Class PredatorPreyModel

- java.lang.Object
- - org.djutils.event.EventProducer
  - - nl.tudelft.simulation.dsol.model.AbstractDSOLModel<Double,​Double,​SimTimeDouble,​S>
    - - nl.tudelft.simulation.dsol.model.AbstractDSOLModel.TimeDouble<DESSSimulator.TimeDouble>
      - - nl.tudelft.simulation.dsol.tutorial.section43.PredatorPreyModel

All Implemented Interfaces:
  `Serializable`, `DSOLModel<Double,​Double,​SimTimeDouble,​DESSSimulator.TimeDouble>`, `DSOLModel.TimeDouble<DESSSimulator.TimeDouble>`, `EventProducerInterface`

    public class PredatorPreyModel
    extends AbstractDSOLModel.TimeDouble<DESSSimulator.TimeDouble>

A Predator-Prey model with a graph.

Copyright (c) 2002-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://simulation.tudelft.nl/dsol/3.0/license.html.

Author:
  Peter Jacobs
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`(package private) static class` `PredatorPreyModel.SkipEventProducer` small event producer that fires events for the graph with a lower resolution.

### Nested classes/interfaces inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel

`AbstractDSOLModel.TimeDouble<S extends SimulatorInterface.TimeDouble>, AbstractDSOLModel.TimeDoubleUnit<S extends SimulatorInterface.TimeDoubleUnit>, AbstractDSOLModel.TimeFloat<S extends SimulatorInterface.TimeFloat>, AbstractDSOLModel.TimeFloatUnit<S extends SimulatorInterface.TimeFloatUnit>, AbstractDSOLModel.TimeLong<S extends SimulatorInterface.TimeLong>`

### Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.model.DSOLModel

`DSOLModel.TimeDouble<S extends SimulatorInterface<Double,​Double,​SimTimeDouble>>, DSOLModel.TimeDoubleUnit<S extends SimulatorInterface<Time,​Duration,​SimTimeDoubleUnit>>, DSOLModel.TimeFloat<S extends SimulatorInterface<Float,​Float,​SimTimeFloat>>, DSOLModel.TimeFloatUnit<S extends SimulatorInterface<FloatTime,​FloatDuration,​SimTimeFloatUnit>>, DSOLModel.TimeLong<S extends SimulatorInterface<Long,​Long,​SimTimeLong>>`

### Field Summary

### Fields inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel

`inputParameterMap, outputStatistics, simulator, streamInformation`

### Fields inherited from class org.djutils.event.EventProducer

`eventProducerImpl`

### Fields inherited from interface org.djutils.event.EventProducerInterface

`FIRST_POSITION, LAST_POSITION`

### Constructor Summary

Constructors
`PredatorPreyModel​(DESSSimulator.TimeDouble simulator)` constructs a new Life.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `constructModel()`
`XYChart` `getChart()`
`Serializable` `getSourceId()`

### Methods inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel

`addInputParameter, getInputParameter, getInputParameterMap, getOutputStatistics, getSimulator, getStreamInformation, setStreamInformation`

### Methods inherited from class org.djutils.event.EventProducer

`addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface nl.tudelft.simulation.dsol.model.DSOLModel

`getDefaultStream, getInputParameterMap, getOutputStatistics, getSimulator, getStream, getStreamInformation, getStreams, resetStreams, setStreamInformation`

### Constructor Detail

#### PredatorPreyModel

    public PredatorPreyModel​(DESSSimulator.TimeDouble simulator)

constructs a new Life.

Parameters:
  `simulator` - DESSSimulator.TimeDouble; the continuous simulator

### Method Detail

#### constructModel

    public final void constructModel()
                              throws SimRuntimeException

Throws:
  `SimRuntimeException`

#### getChart

    public final XYChart getChart()

Returns:
  chart

#### getSourceId

    public Serializable getSourceId()

Specified by:
  `getSourceId` in interface `EventProducerInterface`
Specified by:
  `getSourceId` in class `EventProducer`