Package nl.tudelft.simulation.dsol.tutorial.section45

## Class Boat

- java.lang.Object
- - org.djutils.event.EventProducer
  - - nl.tudelft.simulation.dsol.interpreter.process.InterpretableProcess
    - - nl.tudelft.simulation.dsol.formalisms.process.Process<Double,​Double,​SimTimeDouble>
      - - nl.tudelft.simulation.dsol.tutorial.section45.Boat

All Implemented Interfaces:
  `Serializable`, `ResourceRequestorInterface<Double,​Double,​SimTimeDouble>`, `EventProducerInterface`

    public class Boat
    extends Process<Double,​Double,​SimTimeDouble>

A Boat as presented in Birtwistle, 1979, page 12.

Copyright (c) 2002-2020 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

### Field Summary

Fields
`protected Boat` `mySelf` a reference to protect boats from being garbage collection.

### Fields inherited from class nl.tudelft.simulation.dsol.formalisms.process.Process

`simulator`

### Fields inherited from class nl.tudelft.simulation.dsol.interpreter.process.InterpretableProcess

`DEAD, EXECUTING, INITIAL, STATE_CHANGE_EVENT, SUSPENDED`

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

`eventProducerImpl`

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

`FIRST_POSITION, LAST_POSITION`

### Constructor Summary

Constructors
`Boat​(DEVSSimulator<Double,​Double,​SimTimeDouble> simulator, Port port)` constructs a new Boat.

### Method Summary

All Methods Instance Methods Concrete Methods
`Serializable` `getSourceId()`
`void` `process()`
`String` `toString()`

### Methods inherited from class nl.tudelft.simulation.dsol.formalisms.process.Process

`cancel, hold, receiveRequestedResource, resume, suspend`

### Methods inherited from class nl.tudelft.simulation.dsol.interpreter.process.InterpretableProcess

`cancelProcess, getState, resumeProcess, setState, suspendProcess`

### 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, wait, wait, wait`

### Field Detail

#### mySelf

    protected Boat mySelf

a reference to protect boats from being garbage collection.

### Constructor Detail

#### Boat

    public Boat​(DEVSSimulator<Double,​Double,​SimTimeDouble> simulator,
                Port port)

constructs a new Boat.

Parameters:
  `simulator` - DEVSSimulator<Double,Double,SimTimeDouble>; the simulator to schedule on
  `port` - Port; the port to sail to

### Method Detail

#### process

    public void process()

Specified by:
  `process` in class `Process<Double,​Double,​SimTimeDouble>`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getSourceId

    public Serializable getSourceId()

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