public class CompleteRoute extends Route
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.
$LastChangedDate: 2015-07-16 10:20:53 +0200 (Thu, 16 Jul 2015) $, @version $Revision: 1124 $, by $Author: pknoppers $,
initial version Jul 22, 2015
Constructor and Description |
---|
CompleteRoute(String id,
GTUType gtuType)
Create an empty route for the given GTUType.
|
CompleteRoute(String id,
GTUType gtuType,
List<Node> nodes)
Create a route based on an initial list of nodes.
|
Modifier and Type | Method and Description |
---|---|
CompleteRoute |
addNode(Node node)
Add a node to the end of the node list.
|
CompleteRoute |
clone(Network newNetwork,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the Route.
|
boolean |
containsLink(Link link)
Determine if this Route contains the specified Link.
|
String |
toString() |
contains, destinationNode, getId, getNode, getNodes, indexOf, originNode, size
public CompleteRoute(String id, GTUType gtuType)
id
- String; the name of the routegtuType
- GTUType; the GTUType for which this is a routepublic CompleteRoute(String id, GTUType gtuType, List<Node> nodes) throws NetworkException
id
- String; the name of the route.gtuType
- GTUType; the GTUType for which this is a routenodes
- List<Node>; the initial list of nodes.NetworkException
- if intermediate nodes are missing in the route.public final CompleteRoute addNode(Node node) throws NetworkException
addNode
in class Route
node
- Node; the node to add.NetworkException
- in case node could not be added to the route.public final boolean containsLink(Link link)
link
- Link; the link to check in the route.public CompleteRoute clone(Network newNetwork, SimulatorInterface.TimeDoubleUnit newSimulator) throws NetworkException
clone
in class Route
newNetwork
- Network; the new networknewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkNetworkException
- in case the cloning failsCopyright © 2014–2019 Delft University of Technology. All rights reserved.