public class TransportDemand extends Object implements Serializable
Copyright (c) 2013-2019 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(DEVSSimulatorInterface.TimeDoubleUnit 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() |
DEVSSimulatorInterface.TimeDoubleUnit |
getSimulator() |
public TransportDemand(DEVSSimulatorInterface.TimeDoubleUnit simulator, Region operatingArea)
simulator
- DEVSSimulatorInterface.TimeDoubleUnit; the simulator for scheduling the demandoperatingArea
- Region; 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
- DemandCell; the cell to addpublic final void addDemand(Terminal terminalFrom, Terminal terminalTo, int numberAnnual, double fraction20ft, double fractionEmpty, Map<Company,Double> fractionOwners)
terminalFrom
- Terminal; origin terminalterminalTo
- Terminal; destination terminalnumberAnnual
- int; annual number of containers per yearfraction20ft
- double; fraction of 20 ft containers (rest is 40 ft)fractionEmpty
- double; fraction of empty containers (rest is full)fractionOwners
- Map<Company,Double>; map of owners with fraction (adding up to 1.0) indicating who owns the
containerspublic final TransportDemand.DemandCell getDemand(Terminal terminalFrom, Terminal terminalTo)
terminalFrom
- Terminal; origin terminalterminalTo
- Terminal; destination terminalpublic final Map<Terminal,TransportDemand.DemandCell> getDemandMapFrom(Terminal terminalFrom)
terminalFrom
- Terminal; origin terminalpublic final Map<Terminal,TransportDemand.DemandCell> getDemandMapTo(Terminal terminalTo)
terminalTo
- Terminal; destination terminalpublic final Set<TransportDemand.DemandCell> getDemandSetFrom(Terminal terminalFrom)
terminalFrom
- Terminal; origin terminalpublic final Set<TransportDemand.DemandCell> getDemandSetTo(Terminal terminalTo)
terminalTo
- Terminal; destination terminalpublic final DEVSSimulatorInterface.TimeDoubleUnit getSimulator()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.