Package org.opentrafficsim.water.demand
Class Container
- java.lang.Object
-
- org.opentrafficsim.water.demand.Container
-
- All Implemented Interfaces:
Serializable
public class Container extends Object implements Serializable
A container is exactly 1 TEU. It collects statistics along the way, which are reported to the statistics objects just before the container disappears from the model at the inland client or deep sea terminal / empty depot.Copyright (c) 2013-2020 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, 2016- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Container(DEVSSimulatorInterface.TimeDoubleUnit simulator, Terminal terminalFrom, Terminal terminalTo, boolean empty, ShippingLine shippingLine)
-
Method Summary
-
-
-
Constructor Detail
-
Container
public Container(DEVSSimulatorInterface.TimeDoubleUnit simulator, Terminal terminalFrom, Terminal terminalTo, boolean empty, ShippingLine shippingLine)
- Parameters:
simulator
- DEVSSimulatorInterface.TimeDoubleUnit; the simulatorterminalFrom
- Terminal; origin terminalterminalTo
- Terminal; destination terminalempty
- boolean; empty or fullshippingLine
- ShippingLine; shipping line of the container
-
-
Method Detail
-
addTransportCost
public final void addTransportCost(ContainerTransportCostBreakdownEnum costEnum, double cost)
- Parameters:
costEnum
- ContainerTransportCostBreakdownEnum; cost categorycost
- double; cost to add
-
addTransportFee
public final void addTransportFee(ContainerTransportFeeBreakdownEnum feeEnum, double fee)
- Parameters:
feeEnum
- ContainerTransportFeeBreakdownEnum; cost categoryfee
- double; the fee to add
-
addTransportKgCO2
public final void addTransportKgCO2(ContainerTransportCO2BreakdownEnum co2Enum, double kgCO2)
- Parameters:
co2Enum
- ContainerTransportCO2BreakdownEnum; CO2 categorykgCO2
- double; the amount of CO2 to add
-
addTransportTime
public final void addTransportTime(ContainerTransportTimeBreakdownEnum timeEnum, double time)
- Parameters:
timeEnum
- ContainerTransportTimeBreakdownEnum; time categorytime
- double; the time in hours to add
-
getTransportCost
public final double getTransportCost(ContainerTransportCostBreakdownEnum costEnum)
- Parameters:
costEnum
- ContainerTransportCostBreakdownEnum; cost category- Returns:
- costs of this cost breakdown category until now
-
getTransportFee
public final double getTransportFee(ContainerTransportFeeBreakdownEnum feeEnum)
- Parameters:
feeEnum
- ContainerTransportFeeBreakdownEnum; cost category- Returns:
- fee until now of this cost breakdown category until now
-
getTransportKgCO2
public final double getTransportKgCO2(ContainerTransportCO2BreakdownEnum co2Enum)
- Parameters:
co2Enum
- ContainerTransportCO2BreakdownEnum; CO2 category- Returns:
- kg CO2 of this CO2 breakdown category until now
-
getTransportTime
public final double getTransportTime(ContainerTransportTimeBreakdownEnum timeEnum)
- Parameters:
timeEnum
- ContainerTransportTimeBreakdownEnum; time category- Returns:
- the time in hours
-
getSumTransportCost
public final double getSumTransportCost()
- Returns:
- summed total costs
-
getSumTransportFee
public final double getSumTransportFee()
- Returns:
- summed total fee
-
getSumTransportKgCO2
public final double getSumTransportKgCO2()
- Returns:
- summed total kg CO2
-
getSumTransportTime
public final double getSumTransportTime()
- Returns:
- summed total time
-
collectTerminalStatisticsAtContainerDestination
public final void collectTerminalStatisticsAtContainerDestination()
Collect the final statistics when the container arrived at its destination.
-
getTerminalFrom
public final Terminal getTerminalFrom()
- Returns:
- the terminalFrom
-
getTerminalTo
public final Terminal getTerminalTo()
- Returns:
- the terminalTo
-
getTerminalLastStacked
public final Terminal getTerminalLastStacked()
- Returns:
- the terminalCurrent
-
setTerminalFrom
public final void setTerminalFrom(Terminal terminalFrom)
- Parameters:
terminalFrom
- Terminal; the terminalFrom to set
-
setTerminalTo
public final void setTerminalTo(Terminal terminalTo)
- Parameters:
terminalTo
- Terminal; the terminalTo to set
-
setTerminalLastStacked
public final void setTerminalLastStacked(Terminal terminalLastStacked)
- Parameters:
terminalLastStacked
- Terminal; the terminalCurrent to set
-
isEmpty
public final boolean isEmpty()
- Returns:
- the empty
-
fullEmpty
public final FullEmptyEnum fullEmpty()
- Returns:
- full or empty
-
getOwner
public final Company getOwner()
- Returns:
- the owner
-
getShippingLine
public final ShippingLine getShippingLine()
- Returns:
- the shippingLine
-
toShortString
public final String toShortString()
- Returns:
- short info
-
getStackArrivalTime
public final Time getStackArrivalTime()
- Returns:
- the arrivalTime
-
setStackArrivalTime
public final void setStackArrivalTime()
set the arrivalTime.
-
getCreationTime
public final Time getCreationTime()
- Returns:
- the creationTime
-
getOnShipTime
public final Time getOnShipTime()
- Returns:
- the onShipTime
-
setOnShipTime
public final void setOnShipTime()
set onShipTime.
-
-