public class TransportDemand extends Object implements Serializable
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Based on software from the IDVV project, which is Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving and licensed without restrictions to Delft University of Technology, including the right to sub-license sources and derived products to third parties.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 6, 2016Modifier and Type | Class and Description |
---|---|
class |
TransportDemand.DemandCell
A cell of demand from a terminal to a terminal.
|
Constructor and Description |
---|
TransportDemand(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
Region operatingArea) |
Modifier and Type | Method and Description |
---|---|
void |
addDemand(Terminal terminalFrom,
Terminal terminalTo,
int numberAnnual,
double fraction20ft,
double fractionEmpty,
Map<Company,Double> fractionOwners)
add a cell to the demandmap.
|
void |
addDemand(TransportDemand.DemandCell demandCell)
add a cell to the demandmap.
|
TransportDemand.DemandCell |
getDemand(Terminal terminalFrom,
Terminal terminalTo) |
Map<Terminal,Map<Terminal,TransportDemand.DemandCell>> |
getDemandMap() |
Map<Terminal,TransportDemand.DemandCell> |
getDemandMapFrom(Terminal terminalFrom) |
Map<Terminal,TransportDemand.DemandCell> |
getDemandMapTo(Terminal terminalTo) |
Set<TransportDemand.DemandCell> |
getDemandSetFrom(Terminal terminalFrom) |
Set<TransportDemand.DemandCell> |
getDemandSetTo(Terminal terminalTo) |
Region |
getOperatingArea() |
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface |
getSimulator() |
public TransportDemand(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, Region operatingArea)
simulator
- the simulator for scheduling the demandoperatingArea
- the region for which this demand holdspublic final Region getOperatingArea()
public final Map<Terminal,Map<Terminal,TransportDemand.DemandCell>> getDemandMap()
public final void addDemand(TransportDemand.DemandCell demandCell)
demandCell
- the cell to addpublic final void addDemand(Terminal terminalFrom, Terminal terminalTo, int numberAnnual, double fraction20ft, double fractionEmpty, Map<Company,Double> fractionOwners)
terminalFrom
- origin terminalterminalTo
- destination terminalnumberAnnual
- annual number of containers per yearfraction20ft
- fraction of 20 ft containers (rest is 40 ft)fractionEmpty
- fraction of empty containers (rest is full)fractionOwners
- map of owners with fraction (adding up to 1.0) indicating who owns the containerspublic final TransportDemand.DemandCell getDemand(Terminal terminalFrom, Terminal terminalTo)
terminalFrom
- origin terminalterminalTo
- destination terminalpublic final Map<Terminal,TransportDemand.DemandCell> getDemandMapFrom(Terminal terminalFrom)
terminalFrom
- origin terminalpublic final Map<Terminal,TransportDemand.DemandCell> getDemandMapTo(Terminal terminalTo)
terminalTo
- destination terminalpublic final Set<TransportDemand.DemandCell> getDemandSetFrom(Terminal terminalFrom)
terminalFrom
- origin terminalpublic final Set<TransportDemand.DemandCell> getDemandSetTo(Terminal terminalTo)
terminalTo
- destination terminalpublic final org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface getSimulator()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.