Package nl.tudelft.simulation.examples.dsol.timesharedcomputer

# Class Computer

java.lang.Object
org.djutils.event.EventProducer
nl.tudelft.simulation.dsol.model.AbstractDSOLModel<Double,​Double,​SimTimeDouble,​S>
nl.tudelft.simulation.dsol.model.AbstractDSOLModel.TimeDouble<DEVSSimulator.TimeDouble>
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Computer

All Implemented Interfaces:
  `Serializable`, `DSOLModel<Double,​Double,​SimTimeDouble,​DEVSSimulator.TimeDouble>`, `DSOLModel.TimeDouble<DEVSSimulator.TimeDouble>`, `org.djutils.event.EventProducerInterface`

    public class Computer
    extends AbstractDSOLModel.TimeDouble<DEVSSimulator.TimeDouble>

The Computer example as published in Simulation Modeling and Analysis by A.M. Law & W.D. Kelton section 1.4 and 2.4..

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

## Nested Class Summary

Nested Classes
Modifier and Type | Class | Description
--- | --- | ---
`static class` | `Computer.ExitCounter` | A counter which stops after a predifined number of jobs.

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

`AbstractDSOLModel.CalendarDouble<S extends SimulatorInterface.CalendarDouble>, AbstractDSOLModel.CalendarFloat<S extends SimulatorInterface.CalendarFloat>, AbstractDSOLModel.CalendarLong<S extends SimulatorInterface.CalendarLong>, 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.CalendarDouble<S extends SimulatorInterface.CalendarDouble>, DSOLModel.CalendarFloat<S extends SimulatorInterface.CalendarFloat>, DSOLModel.CalendarLong<S extends SimulatorInterface.CalendarLong>, DSOLModel.TimeDouble<S extends SimulatorInterface.TimeDouble>, DSOLModel.TimeDoubleUnit<S extends SimulatorInterface.TimeDoubleUnit>, DSOLModel.TimeFloat<S extends SimulatorInterface.TimeFloat>, DSOLModel.TimeFloatUnit<S extends SimulatorInterface.TimeFloatUnit>, DSOLModel.TimeLong<S extends SimulatorInterface.TimeLong>`

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static long` | `NUMBER_OF_JOBS` | the number of jobs.
`static long` | `NUMBER_OF_TERMINALS` | the number of terminals.

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

`inputParameterMap, outputStatistics, simulator`

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

`eventProducerImpl`

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

`FIRST_POSITION, LAST_POSITION`

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`Computer​(DEVSSimulator.TimeDouble simulator)` | constructs a new Computer.

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`void` | `constructModel()`
`Serializable` | `getSourceId()`

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

`addInputParameter, getInputParameter, getInputParameterMap, getOutputStatistics, getSimulator`

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

`addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, 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

`getInputParameterMap, getOutputStatistics, getSimulator`

## Field Details

### NUMBER_OF_JOBS

public static final long NUMBER_OF_JOBS
the number of jobs.

See Also:
  Constant Field Values

### NUMBER_OF_TERMINALS

public static final long NUMBER_OF_TERMINALS
the number of terminals.

See Also:
  Constant Field Values

## Constructor Details

### Computer

public Computer​(DEVSSimulator.TimeDouble simulator)
constructs a new Computer.

Parameters:
  `simulator` - DEVSSimulator.TimeDouble; the simulator

## Method Details

### constructModel

public void constructModel() throws SimRuntimeException

Throws:
  `SimRuntimeException`

### getSourceId

public Serializable getSourceId()

Specified by:
  `getSourceId` in interface `org.djutils.event.EventProducerInterface`
Specified by:
  `getSourceId` in class `org.djutils.event.EventProducer`