Package org.opentrafficsim.water.demand
Class Container
java.lang.Object
org.opentrafficsim.water.demand.Container
- All Implemented Interfaces:
 java.io.Serializable
public class Container
extends java.lang.Object
implements java.io.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 Details
- 
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 Details
- 
addTransportCost
- Parameters:
 costEnum- ContainerTransportCostBreakdownEnum; cost categorycost- double; cost to add
 - 
addTransportFee
- Parameters:
 feeEnum- ContainerTransportFeeBreakdownEnum; cost categoryfee- double; the fee to add
 - 
addTransportKgCO2
- Parameters:
 co2Enum- ContainerTransportCO2BreakdownEnum; CO2 categorykgCO2- double; the amount of CO2 to add
 - 
addTransportTime
- Parameters:
 timeEnum- ContainerTransportTimeBreakdownEnum; time categorytime- double; the time in hours to add
 - 
getTransportCost
- Parameters:
 costEnum- ContainerTransportCostBreakdownEnum; cost category- Returns:
 - costs of this cost breakdown category until now
 
 - 
getTransportFee
- Parameters:
 feeEnum- ContainerTransportFeeBreakdownEnum; cost category- Returns:
 - fee until now of this cost breakdown category until now
 
 - 
getTransportKgCO2
- Parameters:
 co2Enum- ContainerTransportCO2BreakdownEnum; CO2 category- Returns:
 - kg CO2 of this CO2 breakdown category until now
 
 - 
getTransportTime
- 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
- Returns:
 - the terminalFrom
 
 - 
getTerminalTo
- Returns:
 - the terminalTo
 
 - 
getTerminalLastStacked
- Returns:
 - the terminalCurrent
 
 - 
setTerminalFrom
- Parameters:
 terminalFrom- Terminal; the terminalFrom to set
 - 
setTerminalTo
- Parameters:
 terminalTo- Terminal; the terminalTo to set
 - 
setTerminalLastStacked
- Parameters:
 terminalLastStacked- Terminal; the terminalCurrent to set
 - 
isEmpty
public final boolean isEmpty()- Returns:
 - the empty
 
 - 
fullEmpty
- Returns:
 - full or empty
 
 - 
getOwner
- Returns:
 - the owner
 
 - 
getShippingLine
- Returns:
 - the shippingLine
 
 - 
toString
public final java.lang.String toString()- Overrides:
 toStringin classjava.lang.Object
 - 
toShortString
public final java.lang.String toShortString()- Returns:
 - short info
 
 - 
getStackArrivalTime
- Returns:
 - the arrivalTime
 
 - 
setStackArrivalTime
public final void setStackArrivalTime()set the arrivalTime. - 
getCreationTime
- Returns:
 - the creationTime
 
 - 
getOnShipTime
- Returns:
 - the onShipTime
 
 - 
setOnShipTime
public final void setOnShipTime()set onShipTime. 
 -