Network.java

  1. package org.opentrafficsim.core.network;

  2. import java.util.List;
  3. import java.util.Set;

  4. import org.djutils.immutablecollections.ImmutableMap;
  5. import org.opentrafficsim.base.Identifiable;
  6. import org.opentrafficsim.core.definitions.Definitions;
  7. import org.opentrafficsim.core.gtu.GTUType;
  8. import org.opentrafficsim.core.network.route.CompleteRoute;
  9. import org.opentrafficsim.core.network.route.Route;
  10. import org.opentrafficsim.core.object.InvisibleObjectInterface;
  11. import org.opentrafficsim.core.object.ObjectInterface;

  12. import nl.tudelft.simulation.event.EventProducerInterface;
  13. import nl.tudelft.simulation.event.EventType;

  14. /**
  15.  * Interface that defines what information a network should be able to provide about Nodes, Links and Routes.
  16.  * <p>
  17.  * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  18.  * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
  19.  * <p>
  20.  * $LastChangedDate: 2020-01-23 11:14:19 +0100 (Thu, 23 Jan 2020) $, @version $Revision: 6010 $, by $Author: averbraeck $,
  21.  * initial version Jul 22, 2015 <br>
  22.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  23.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  24.  * @author <a href="http://www.citg.tudelft.nl">Guus Tamminga</a>
  25.  */
  26. public interface Network extends Definitions, EventProducerInterface, Identifiable
  27. {
  28.     /** @return String; the id */
  29.     @Override
  30.     String getId();

  31.     /***************************************************************************************/
  32.     /**************************************** NODES ****************************************/
  33.     /***************************************************************************************/

  34.     /**
  35.      * Provide an immutable map of node ids to nodes in the network.
  36.      * @return an immutable map of nodes.
  37.      */
  38.     ImmutableMap<String, Node> getNodeMap();

  39.     /**
  40.      * Register a node in the network.
  41.      * @param node Node; the node to add to the network.
  42.      * @throws NetworkException if node already exists in the network, or if name of the node is not unique.
  43.      */
  44.     void addNode(Node node) throws NetworkException;

  45.     /**
  46.      * Unregister a node from the network.
  47.      * @param node Node; the node to remove from the network.
  48.      * @throws NetworkException if node does not exist in the network.
  49.      */
  50.     void removeNode(Node node) throws NetworkException;

  51.     /**
  52.      * Test whether a node is present in the network.
  53.      * @param node Node; the node to search for in the network.
  54.      * @return whether the node is in this network
  55.      */
  56.     boolean containsNode(Node node);

  57.     /**
  58.      * Test whether a node with a given id is present in the network.
  59.      * @param nodeId String; the id of the node to search for in the network.
  60.      * @return whether the node is in this network
  61.      */
  62.     boolean containsNode(String nodeId);

  63.     /**
  64.      * Retrieve a node with a given id from the network, or null if the id cannot be found.
  65.      * @param nodeId String; the id of the node to search for in the network.
  66.      * @return the node or null if not present
  67.      */
  68.     Node getNode(String nodeId);

  69.     /***************************************************************************************/
  70.     /**************************************** LINKS ****************************************/
  71.     /***************************************************************************************/

  72.     /**
  73.      * Provide an immutable map of link ids to links in the network.
  74.      * @return the an immutable map of links.
  75.      */
  76.     ImmutableMap<String, Link> getLinkMap();

  77.     /**
  78.      * Register a link in the network.
  79.      * @param link Link; the link to add to the network.
  80.      * @throws NetworkException if link already exists in the network, if name of the link is not unique, or if the start node
  81.      *             or the end node of the link are not registered in the network.
  82.      */
  83.     void addLink(Link link) throws NetworkException;

  84.     /**
  85.      * Unregister a link from the network.
  86.      * @param link Link; the link to remove from the network.
  87.      * @throws NetworkException if link does not exist in the network.
  88.      */
  89.     void removeLink(Link link) throws NetworkException;

  90.     /**
  91.      * Test whether a link is present in the network.
  92.      * @param link Link; the link to search for in the network.
  93.      * @return whether the link is in this network
  94.      */
  95.     boolean containsLink(Link link);

  96.     /**
  97.      * Test whether a link with a given id is present in the network.
  98.      * @param link String; the id of the link to search for in the network.
  99.      * @return whether the link is in this network
  100.      */
  101.     boolean containsLink(String link);

  102.     /**
  103.      * Retrieve a node with a given id from the network, or null if the id cannot be found.
  104.      * @param linkId String; the id of the link to search for in the network.
  105.      * @return the link or null if not present
  106.      */
  107.     Link getLink(String linkId);

  108.     /**
  109.      * Find a link between node1 and node2 and return it if it exists in the network. If not, return null.
  110.      * @param node1 Node; first node
  111.      * @param node2 Node; second node
  112.      * @return the link between node1 and node2 in the network or null if it does not exist.
  113.      */
  114.     Link getLink(Node node1, Node node2);

  115.     /**
  116.      * Find a link between node1 and node2 and return it if it exists in the network. If not, return null.
  117.      * @param nodeId1 String; id of the first node
  118.      * @param nodeId2 String; id of the second node
  119.      * @return the link between node1 and node2 in the network or null if it does not exist.
  120.      * @throws NetworkException if the node(s) cannot be found by their id
  121.      */
  122.     Link getLink(String nodeId1, String nodeId2) throws NetworkException;

  123.     /***************************************************************************************/
  124.     /************************ OBJECT INTERFACE IMPLEMENTING OBJECTS ************************/
  125.     /***************************************************************************************/

  126.     /**
  127.      * Return an immutable map of all ObjectInterface implementing objects in the Network.
  128.      * @return ImmutableMap&lt;String, ObjectInterface&gt;; the immutable map of all ObjectInterface implementing objects in the
  129.      *         Network
  130.      */
  131.     ImmutableMap<String, ObjectInterface> getObjectMap();

  132.     /**
  133.      * Return an immutable map of all ObjectInterface implementing objects in the network that are of type objectType, or any
  134.      * sub type thereof.
  135.      * @param objectType Class&lt;T&gt;; the (sub-)type of ObjectInterface that the returned map is reduced to
  136.      * @param <T> type of object
  137.      * @return ImmutableMap&lt;String, ObjectInterface&gt;; the immutable map of all ObjectInterface implementing objects in the
  138.      *         Network that are of the type objectType, or any sub type thereof
  139.      */
  140.     <T extends ObjectInterface> ImmutableMap<String, T> getObjectMap(Class<T> objectType);

  141.     /**
  142.      * Return object of given type with given id.
  143.      * @param objectType T; object type class
  144.      * @param objectId String; id of object
  145.      * @param <T> object type
  146.      * @return T; object of given type with given id, {@code null} if no such object
  147.      */
  148.     <T extends ObjectInterface> T getObject(Class<T> objectType, String objectId);

  149.     /**
  150.      * Add an ObjectInterface implementing object to the Network.
  151.      * @param object ObjectInterface; the object that implements ObjectInterface
  152.      * @throws NetworkException if link already exists in the network, if name of the object is not unique.
  153.      */
  154.     void addObject(ObjectInterface object) throws NetworkException;

  155.     /**
  156.      * Remove an ObjectInterface implementing object form the Network.
  157.      * @param object ObjectInterface; the object that implements ObjectInterface
  158.      * @throws NetworkException if the object does not exist in the network.
  159.      */
  160.     void removeObject(ObjectInterface object) throws NetworkException;

  161.     /**
  162.      * Test whether the object is present in the Network.
  163.      * @param object ObjectInterface; the object that is tested for presence
  164.      * @return boolean; whether the object is present in the Network
  165.      */
  166.     boolean containsObject(ObjectInterface object);

  167.     /**
  168.      * Test whether an object with the given id is present in the Network.
  169.      * @param objectId String; the id that is tested for presence
  170.      * @return boolean; whether an object with the given id is present in the Network
  171.      */
  172.     boolean containsObject(String objectId);

  173.     /***************************************************************************************/
  174.     /********************************* INVISIBLE OBJECTS ***********************************/
  175.     /***************************************************************************************/

  176.     /**
  177.      * Return an immutable map of all InvisibleObject implementing objects in the Network.
  178.      * @return ImmutableMap&lt;String, ObjectInterface&gt;; the immutable map of all ObjectInterface implementing objects in the
  179.      *         Network
  180.      */
  181.     ImmutableMap<String, InvisibleObjectInterface> getInvisibleObjectMap();

  182.     /**
  183.      * Return an immutable map of all InvisibleObject implementing objects in the network that are of type objectType, or any
  184.      * sub type thereof.
  185.      * @param objectType Class&lt;InvisibleObjectInterface&gt;; the (sub-)type of InvisibleObject that the returned map is
  186.      *            reduced to
  187.      * @return ImmutableMap&lt;String, InvisibleObject&gt;; the immutable map of all InvisibleObject implementing objects in the
  188.      *         Network that are of the type objectType, or any sub type thereof
  189.      */
  190.     ImmutableMap<String, InvisibleObjectInterface> getInvisibleObjectMap(Class<InvisibleObjectInterface> objectType);

  191.     /**
  192.      * Add an ObjectInterface implementing object to the Network.
  193.      * @param object InvisibleObjectInterface; the object that implements ObjectInterface
  194.      * @throws NetworkException if link already exists in the network, if name of the object is not unique.
  195.      */
  196.     void addInvisibleObject(InvisibleObjectInterface object) throws NetworkException;

  197.     /**
  198.      * Remove an ObjectInterface implementing object form the Network.
  199.      * @param object InvisibleObjectInterface; the object that implements ObjectInterface
  200.      * @throws NetworkException if the object does not exist in the network.
  201.      */
  202.     void removeInvisibleObject(InvisibleObjectInterface object) throws NetworkException;

  203.     /**
  204.      * Test whether the invisible object is present in the Network.
  205.      * @param object InvisibleObjectInterface; the object that is tested for presence
  206.      * @return boolean; whether the invisible object is present in the Network
  207.      */
  208.     boolean containsInvisibleObject(InvisibleObjectInterface object);

  209.     /**
  210.      * Test whether an invisible object with the given id is present in the Network.
  211.      * @param objectId String; the id that is tested for presence
  212.      * @return boolean; whether an invisible object with the given id is present in the Network
  213.      */
  214.     boolean containsInvisibleObject(String objectId);

  215.     /***************************************************************************************/
  216.     /*************************************** ROUTES ****************************************/
  217.     /***************************************************************************************/

  218.     /**
  219.      * Return an immutable map of routes that exist in the network for the GTUType.
  220.      * @param gtuType GTUType; the GTUType for which to retrieve the defined routes
  221.      * @return an immutable map of routes in the network for the given GTUType, or an empty Map if no routes are defined for the
  222.      *         given GTUType.
  223.      */
  224.     ImmutableMap<String, Route> getDefinedRouteMap(GTUType gtuType);

  225.     /**
  226.      * Add a route to the network.
  227.      * @param gtuType GTUType; the GTUType for which to add a route
  228.      * @param route Route; the route to add to the network.
  229.      * @throws NetworkException if route already exists in the network, if name of the route is not unique, if one of the nodes
  230.      *             of the route are not registered in the network.
  231.      */
  232.     void addRoute(GTUType gtuType, Route route) throws NetworkException;

  233.     /**
  234.      * Remove the route from the network, e.g. because of road maintenance.
  235.      * @param gtuType GTUType; the GTUType for which to remove a route
  236.      * @param route Route; the route to remove from the network.
  237.      * @throws NetworkException if route does not exist in the network.
  238.      */
  239.     void removeRoute(GTUType gtuType, Route route) throws NetworkException;

  240.     /**
  241.      * Return the route with the given id in the network for the given GTUType, or null if it the route with the id does not
  242.      * exist.
  243.      * @param gtuType GTUType; the GTUType for which to retrieve a route based on its id.
  244.      * @param routeId String; the route to search for in the network.
  245.      * @return the route or null if not present
  246.      */
  247.     Route getRoute(GTUType gtuType, String routeId);

  248.     /**
  249.      * Determine whether the provided route exists in the network for the given GTUType.
  250.      * @param gtuType GTUType; the GTUType for which to check whether the route exists
  251.      * @param route Route; the route to check for
  252.      * @return whether the route exists in the network for the given GTUType
  253.      */
  254.     boolean containsRoute(GTUType gtuType, Route route);

  255.     /**
  256.      * Determine whether a route with the given id exists in the network for the given GTUType.
  257.      * @param gtuType GTUType; the GTUType for which to check whether the route exists
  258.      * @param routeId String; the id of the route to check for
  259.      * @return whether a route with the given id exists in the network for the given GTUType
  260.      */
  261.     boolean containsRoute(GTUType gtuType, String routeId);

  262.     /**
  263.      * Return the the shortest route between two nodes in the network, via a list of intermediate nodes. If no path exists from
  264.      * the start node to the end node via the intermediate nodes in the network, null is returned.
  265.      * @param gtuType GTUType; the GTUType for which to retrieve the defined routes
  266.      * @param nodeFrom Node; the start node.
  267.      * @param nodeTo Node; the end node.
  268.      * @return a set with routes from the start Node to the end Node in the network; if no route can be found, an empty set is
  269.      *         returned.
  270.      */
  271.     Set<Route> getRoutesBetween(GTUType gtuType, Node nodeFrom, Node nodeTo);

  272.     /**
  273.      * (Re)build the underlying graph for the given GTUType.
  274.      * @param gtuType GTUType; the GTUType for which to (re)build the graph
  275.      */
  276.     void buildGraph(GTUType gtuType);

  277.     /**
  278.      * Calculate the shortest route between two nodes in the network. If no path exists from the start node to the end node in
  279.      * the network, null is returned. This method returns a CompleteRoute, which includes all nodes to get from start to end. In
  280.      * case the graph for the GTUType has not yet been built, this method will call the buildGraph method.
  281.      * @param gtuType GTUType; the GTUType for which to calculate the shortest route
  282.      * @param nodeFrom Node; the start node.
  283.      * @param nodeTo Node; the end node.
  284.      * @return the shortest route from the start Node to the end Node in the network. If no path exists from the start node to
  285.      *         the end node in the network, null is returned.
  286.      * @throws NetworkException in case nodes cannot be added to the route, e.g. because they are not directly connected. This
  287.      *             can be the case when the links in the network have changed, but the graph has not been rebuilt.
  288.      */
  289.     default CompleteRoute getShortestRouteBetween(GTUType gtuType, Node nodeFrom, Node nodeTo) throws NetworkException
  290.     {
  291.         return getShortestRouteBetween(gtuType, nodeFrom, nodeTo, LinkWeight.LENGTH);
  292.     }

  293.     /**
  294.      * Calculate the shortest route between two nodes in the network. If no path exists from the start node to the end node in
  295.      * the network, null is returned. This method returns a CompleteRoute, which includes all nodes to get from start to end.
  296.      * This method recalculates the graph.
  297.      * @param gtuType GTUType; the GTUType for which to calculate the shortest route
  298.      * @param nodeFrom Node; the start node.
  299.      * @param nodeTo Node; the end node.
  300.      * @param linkWeight LinkWeight; link weight.
  301.      * @return the shortest route from the start Node to the end Node in the network. If no path exists from the start node to
  302.      *         the end node in the network, null is returned.
  303.      * @throws NetworkException in case nodes cannot be added to the route, e.g. because they are not directly connected. This
  304.      *             can be the case when the links in the network have changed, but the graph has not been rebuilt.
  305.      */
  306.     CompleteRoute getShortestRouteBetween(GTUType gtuType, Node nodeFrom, Node nodeTo, LinkWeight linkWeight)
  307.             throws NetworkException;

  308.     /**
  309.      * Calculate the shortest route between two nodes in the network, via a list of intermediate nodes. If no path exists from
  310.      * the start node to the end node via the intermediate nodes in the network, null is returned. This method returns a
  311.      * CompleteRoute, which includes all nodes to get from start to end. In case the graph for the GTUType has not yet been
  312.      * built, this method will call the buildGraph method.
  313.      * @param gtuType GTUType; the GTUType for which to calculate the shortest route
  314.      * @param nodeFrom Node; the start node.
  315.      * @param nodeTo Node; the end node.
  316.      * @param nodesVia List&lt;Node&gt;; a number of nodes that the GTU has to pass between nodeFrom and nodeTo in the given
  317.      *            order.
  318.      * @return the shortest route between two nodes in the network, via the intermediate nodes. If no path exists from the start
  319.      *         node to the end node via the intermediate nodes in the network, null is returned.
  320.      * @throws NetworkException in case nodes cannot be added to the route, e.g. because they are not directly connected. This
  321.      *             can be the case when the links in the network have changed, but the graph has not been rebuilt.
  322.      */
  323.     default CompleteRoute getShortestRouteBetween(GTUType gtuType, Node nodeFrom, Node nodeTo, List<Node> nodesVia)
  324.             throws NetworkException
  325.     {
  326.         return getShortestRouteBetween(gtuType, nodeFrom, nodeTo, nodesVia, LinkWeight.LENGTH);
  327.     }

  328.     /**
  329.      * Calculate the shortest route between two nodes in the network, via a list of intermediate nodes. If no path exists from
  330.      * the start node to the end node via the intermediate nodes in the network, null is returned. This method returns a
  331.      * CompleteRoute, which includes all nodes to get from start to end. This method recalculates the graph.
  332.      * @param gtuType GTUType; the GTUType for which to calculate the shortest route
  333.      * @param nodeFrom Node; the start node.
  334.      * @param nodeTo Node; the end node.
  335.      * @param nodesVia List&lt;Node&gt;; a number of nodes that the GTU has to pass between nodeFrom and nodeTo in the given
  336.      *            order.
  337.      * @param linkWeight LinkWeight; link weight.
  338.      * @return the shortest route between two nodes in the network, via the intermediate nodes. If no path exists from the start
  339.      *         node to the end node via the intermediate nodes in the network, null is returned.
  340.      * @throws NetworkException in case nodes cannot be added to the route, e.g. because they are not directly connected. This
  341.      *             can be the case when the links in the network have changed, but the graph has not been rebuilt.
  342.      */
  343.     CompleteRoute getShortestRouteBetween(GTUType gtuType, Node nodeFrom, Node nodeTo, List<Node> nodesVia,
  344.             LinkWeight linkWeight) throws NetworkException;

  345.     /***************************************************************************************/
  346.     /********************************** ANIMATION EVENTS ***********************************/
  347.     /***************************************************************************************/

  348.     /**
  349.      * The timed event type for pub/sub indicating the addition of a Node. <br>
  350.      * Payload: Node node (not an array, just an Object)
  351.      */
  352.     EventType ANIMATION_NODE_ADD_EVENT = new EventType("ANIMATION.NETWORK.NODE.ADD");

  353.     /**
  354.      * The (regular, not timed) event type for pub/sub indicating the removal of a Node. <br>
  355.      * Payload: Node node (not an array, just an Object)
  356.      */
  357.     EventType ANIMATION_NODE_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.NODE.REMOVE");

  358.     /**
  359.      * The (regular, not timed) event type for pub/sub indicating the addition of a Link. <br>
  360.      * Payload: Link link (not an array, just an Object)
  361.      */
  362.     EventType ANIMATION_LINK_ADD_EVENT = new EventType("ANIMATION.NETWORK.LINK.ADD");

  363.     /**
  364.      * The (regular, not timed) event type for pub/sub indicating the removal of a Link. <br>
  365.      * Payload: Link link (not an array, just an Object)
  366.      */
  367.     EventType ANIMATION_LINK_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.LINK.REMOVE");

  368.     /**
  369.      * The (regular, not timed) event type for pub/sub indicating the addition of an ObjectInterface implementing object. <br>
  370.      * Payload: StaticObject object (not an array, just an Object)
  371.      */
  372.     EventType ANIMATION_OBJECT_ADD_EVENT = new EventType("ANIMATION.NETWORK.OBJECT.ADD");

  373.     /**
  374.      * The (regular, not timed) event type for pub/sub indicating the removal of an ObjectInterface implementing object. <br>
  375.      * Payload: StaticObject object (not an array, just an Object)
  376.      */
  377.     EventType ANIMATION_OBJECT_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.OBJECT.REMOVE");

  378.     /**
  379.      * The (regular, not timed) event type for pub/sub indicating the addition of an InvisibleObjectInterface implementing
  380.      * object. <br>
  381.      * Payload: InvisibleObject object (not an array, just an Object)
  382.      */
  383.     EventType ANIMATION_INVISIBLE_OBJECT_ADD_EVENT = new EventType("ANIMATION.NETWORK.INVISIBLE_OBJECT.ADD");

  384.     /**
  385.      * The (regular, not timed) event type for pub/sub indicating the removal of an InvisibleObjectInterface implementing
  386.      * object. <br>
  387.      * Payload: InvisibleObject object (not an array, just an Object)
  388.      */
  389.     EventType ANIMATION_INVISIBLE_OBJECT_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.INVISIBLE_OBJECT.REMOVE");

  390.     /**
  391.      * The (regular, not timed) event type for pub/sub indicating the addition of a Route for a gtuType. <br>
  392.      * Payload: [GTUType gtuType, Route route]
  393.      */
  394.     EventType ANIMATION_ROUTE_ADD_EVENT = new EventType("ANIMATION.NETWORK.ROUTE.ADD");

  395.     /**
  396.      * The (regular, not timed) event type for pub/sub indicating the removal of a Route for a gtuType. <br>
  397.      * Payload: [GTUType gtuType, Route route]
  398.      */
  399.     EventType ANIMATION_ROUTE_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.ROUTE.REMOVE");

  400.     /**
  401.      * The <b>timed</b> event type for pub/sub indicating the addition of a GTU to the network. <br>
  402.      * Payload: GTU gtu (not an array, just an Object)
  403.      */
  404.     EventType ANIMATION_GTU_ADD_EVENT = new EventType("ANIMATION.NETWORK.GTU.ADD");

  405.     /**
  406.      * The <b>timed</b> event type for pub/sub indicating the removal of a GTU from the network. <br>
  407.      * Payload: GTU gtu (not an array, just an Object)
  408.      */
  409.     EventType ANIMATION_GTU_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.GTU.REMOVE");

  410.     /**
  411.      * The (regular, not timed) event type for pub/sub indicating the addition of an GTUGenerator implementing object. <br>
  412.      * Payload: AbstractGTUGenerator object (not an array, just an Object)
  413.      */
  414.     EventType ANIMATION_GENERATOR_ADD_EVENT = new EventType("ANIMATION.NETWORK.GENERATOR.ADD");

  415.     /**
  416.      * The (regular, not timed) event type for pub/sub indicating the removal of an GTUGenerator implementing object. <br>
  417.      * Payload: AbstractGTUGenerator object (not an array, just an Object)
  418.      */
  419.     EventType ANIMATION_GENERATOR_REMOVE_EVENT = new EventType("ANIMATION.NETWORK.GENERATOR.REMOVE");

  420.     /***************************************************************************************/
  421.     /*************************************** EVENTS ****************************************/
  422.     /***************************************************************************************/

  423.     /**
  424.      * The (regular, not timed) event type for pub/sub indicating the addition of a Node. <br>
  425.      * Payload: String nodeId (not an array, just a String)
  426.      */
  427.     EventType NODE_ADD_EVENT = new EventType("NETWORK.NODE.ADD");

  428.     /**
  429.      * The (regular, not timed) event type for pub/sub indicating the removal of a Node. <br>
  430.      * Payload: String nodeId (not an array, just a String)
  431.      */
  432.     EventType NODE_REMOVE_EVENT = new EventType("NETWORK.NODE.REMOVE");

  433.     /**
  434.      * The (regular, not timed) event type for pub/sub indicating the addition of a Link. <br>
  435.      * Payload: String linkId (not an array, just a String)
  436.      */
  437.     EventType LINK_ADD_EVENT = new EventType("NETWORK.LINK.ADD");

  438.     /**
  439.      * The (regular, not timed) event type for pub/sub indicating the removal of a Link. <br>
  440.      * Payload: String linkId (not an array, just a String)
  441.      */
  442.     EventType LINK_REMOVE_EVENT = new EventType("NETWORK.LINK.REMOVE");

  443.     /**
  444.      * The (regular, not timed) event type for pub/sub indicating the addition of an ObjectInterface implementing object. <br>
  445.      * Payload: String ObjectId (not an array, just a String)
  446.      */
  447.     EventType OBJECT_ADD_EVENT = new EventType("NETWORK.OBJECT.ADD");

  448.     /**
  449.      * The (regular, not timed) event type for pub/sub indicating the removal of an ObjectInterface implementing object. <br>
  450.      * Payload: String objectId (not an array, just a String)
  451.      */
  452.     EventType OBJECT_REMOVE_EVENT = new EventType("NETWORK.OBJECT.REMOVE");

  453.     /**
  454.      * The (regular, not timed) event type for pub/sub indicating the addition of an InvisibleObjectInterface implementing
  455.      * object. <br>
  456.      * Payload: String ObjectId (not an array, just a String)
  457.      */
  458.     EventType INVISIBLE_OBJECT_ADD_EVENT = new EventType("NETWORK.INVISIBLE_OBJECT.ADD");

  459.     /**
  460.      * The (regular, not timed) event type for pub/sub indicating the removal of an InvisibleObjectInterface implementing
  461.      * object. <br>
  462.      * Payload: String objectId (not an array, just a String)
  463.      */
  464.     EventType INVISIBLE_OBJECT_REMOVE_EVENT = new EventType("NETWORK.INVISIBLE_OBJECT.REMOVE");

  465.     /**
  466.      * The (regular, not timed) event type for pub/sub indicating the addition of a Route for a gtuType. <br>
  467.      * Payload: [String gtuTypeId, String routeId]
  468.      */
  469.     EventType ROUTE_ADD_EVENT = new EventType("NETWORK.ROUTE.ADD");

  470.     /**
  471.      * The (regular, not timed) event type for pub/sub indicating the removal of a Route for a gtuType. <br>
  472.      * Payload: [String gtuTypeId, String routeId]
  473.      */
  474.     EventType ROUTE_REMOVE_EVENT = new EventType("NETWORK.ROUTE.REMOVE");

  475.     /**
  476.      * The <b>timed</b> event type for pub/sub indicating the addition of a GTU to the network. <br>
  477.      * Payload: String gtuId (not an array, just a String)
  478.      */
  479.     EventType GTU_ADD_EVENT = new EventType("NETWORK.GTU.ADD");

  480.     /**
  481.      * The <b>timed</b> event type for pub/sub indicating the removal of a GTU from the network. <br>
  482.      * Payload: String gtuId (not an array, just a String)
  483.      */
  484.     EventType GTU_REMOVE_EVENT = new EventType("NETWORK.GTU.REMOVE");

  485.     /**
  486.      * The <b>timed</b> event type for pub/sub indicating the addition of a GTUGenerator to the network. <br>
  487.      * Payload: String generatorName (not an array, just a String)
  488.      */
  489.     EventType GENERATOR_ADD_EVENT = new EventType("NETWORK.GENERATOR.ADD");

  490.     /**
  491.      * The <b>timed</b> event type for pub/sub indicating the removal of a GTUGenerator from the network. <br>
  492.      * Payload: String generatorName (not an array, just a String)
  493.      */
  494.     EventType GENERATOR_REMOVE_EVENT = new EventType("NETWORK.GENERATOR.REMOVE");
  495. }