NODEID - the ID type of the Node, e.g., String.LINKID - the ID type of the Link, e.g., String.public interface Network<LINKID,NODEID>
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $,
initial version Jul 22, 2015
Map<String,Route<LINKID,NODEID>> getRouteMap()
Set<Route<LINKID,NODEID>> getRoutesBetween(Node<NODEID> nodeFrom, Node<NODEID> nodeTo)
nodeFrom - the start node.nodeTo - the end node.Route<LINKID,NODEID> getShortestRouteBetween(Node<NODEID> nodeFrom, Node<NODEID> nodeTo)
nodeFrom - the start node.nodeTo - the end node.void addNode(Node<NODEID> node) throws NetworkException
node - the node to add to the network.NetworkException - if node already exists in the network, or if name of the node is not unique.void removeNode(Node<NODEID> node) throws NetworkException
node - the node to remove from the network.NetworkException - if node does not exist in the network.boolean containsNode(Node<NODEID> node)
node - the node to search for in the network.boolean containsNode(NODEID nodeId)
nodeId - the id of the node to search for in the network.Node<NODEID> getNode(NODEID nodeId)
nodeId - the id of the node to search for in the network.void addLink(Link<LINKID,NODEID> link) throws NetworkException
link - the link to add to the network.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.void removeLink(Link<LINKID,NODEID> link) throws NetworkException
link - the link to remove from the network.NetworkException - if link does not exist in the network.boolean containsLink(Link<LINKID,NODEID> link)
link - the link to search for in the network.boolean containsLink(LINKID link)
link - the id of the link to search for in the network.Link<LINKID,NODEID> getLink(LINKID linkId)
linkId - the id of the link to search for in the network.Link<LINKID,NODEID> getLink(Node<NODEID> node1, Node<NODEID> node2)
node1 - first nodenode2 - second nodeLink<LINKID,NODEID> getLink(NODEID node1, NODEID node2) throws NetworkException
node1 - id of the first nodenode2 - id of the second nodeNetworkException - if the node(s) cannot be found by their idvoid addRoute(Route<LINKID,NODEID> route) throws NetworkException
route - the route to add to the network.NetworkException - if route already exists in the network, if name of the route is not unique, if one of the nodes
of the route are not registered in the network.void removeRoute(Route<LINKID,NODEID> route) throws NetworkException
route - the route to remove from the network.NetworkException - if route does not exist in the network.boolean containsRoute(Route<LINKID,NODEID> route)
route - the route to search for in the network.boolean containsRoute(String routeId)
routeId - the route to search for in the network.Copyright © 2014–2015 Delft University of Technology. All rights reserved.