public class CapacityOTSLink extends OTSLink implements Capacity
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.
GTU_ADD_EVENT, GTU_REMOVE_EVENT| Modifier | Constructor and Description |
|---|---|
protected |
CapacityOTSLink(Network newNetwork,
OTSSimulatorInterface newSimulator,
boolean animation,
CapacityOTSLink link)
Clone a link for a new network.
|
|
CapacityOTSLink(Network network,
String id,
Node startNode,
Node endNode,
LinkType linkType,
OTSLine3D designLine,
OTSSimulatorInterface simulator,
org.djunits.value.vdouble.scalar.Frequency capacity)
Construct a new link.
|
| Modifier and Type | Method and Description |
|---|---|
CapacityOTSLink |
clone(Network newNetwork,
OTSSimulatorInterface newSimulator,
boolean animation)
Clone the OTSLink for e.g., copying a network.
|
org.djunits.value.vdouble.scalar.Frequency |
getCapacity() |
void |
setCapacity(org.djunits.value.vdouble.scalar.Frequency capacity)
Set the link capacity.
|
String |
toString() |
addGTU, equals, getBounds, getDesignLine, getDirectionality, getEndNode, getGTUCount, getGTUs, getId, getLength, getLinkType, getLocation, getNetwork, getSimulator, getStartNode, hashCode, removeGTUaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerpublic CapacityOTSLink(Network network, String id, Node startNode, Node endNode, LinkType linkType, OTSLine3D designLine, OTSSimulatorInterface simulator, org.djunits.value.vdouble.scalar.Frequency capacity) throws NetworkException
network - the network.id - the link idstartNode - start node (directional)endNode - end node (directional)linkType - Link type to indicate compatibility with GTU typesdesignLine - the OTSLine3D design line of the Linksimulator - the simulator on which events can be scheduledcapacity - link capacity in GTUs per hour // XXX per direction? which GTUType?NetworkException - if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.protected CapacityOTSLink(Network newNetwork, OTSSimulatorInterface newSimulator, boolean animation, CapacityOTSLink link) throws NetworkException
newNetwork - the new network to which the clone belongsnewSimulator - the new simulator for this networkanimation - whether to (re)create animation or notlink - the link to clone fromNetworkException - if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.public final org.djunits.value.vdouble.scalar.Frequency getCapacity()
getCapacity in interface Capacitypublic final void setCapacity(org.djunits.value.vdouble.scalar.Frequency capacity)
setCapacity in interface Capacitycapacity - the new capacity of the link as a frequency in GTUs per time unit.public CapacityOTSLink clone(Network newNetwork, OTSSimulatorInterface newSimulator, boolean animation) throws NetworkException
clone in class OTSLinknewNetwork - the new network to which the clone belongsnewSimulator - the new simulator for this networkanimation - whether to (re)create animation or notNetworkException - in case the cloning failsCopyright © 2014–2018 Delft University of Technology. All rights reserved.