View Javadoc
1   package org.opentrafficsim.water.network;
2   
3   import java.util.Map;
4   
5   import org.opentrafficsim.core.geometry.OTSLine3D;
6   import org.opentrafficsim.core.gtu.GTUType;
7   import org.opentrafficsim.core.network.LinkType;
8   import org.opentrafficsim.core.network.LongitudinalDirectionality;
9   import org.opentrafficsim.core.network.Network;
10  import org.opentrafficsim.core.network.NetworkException;
11  import org.opentrafficsim.core.network.OTSLink;
12  import org.opentrafficsim.core.network.OTSNode;
13  
14  /**
15   * <p>
16   * Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
17   * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
18   * </p>
19   * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
20   * initial version Sep 27, 2015 <br>
21   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
22   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
23   */
24  public class Waterway extends OTSLink
25  {
26      /** */
27      private static final long serialVersionUID = 20150927L;
28  
29      /**
30       * Construct a new waterway.
31       * @param network the network.
32       * @param id the link id
33       * @param startNode start node (directional)
34       * @param endNode end node (directional)
35       * @param linkType Link type to indicate compatibility with GTU types
36       * @param designLine the OTSLine3D design line of the Link
37       * @param directionality to indicate the general direction of the waterway (FORWARD = in the direction of the design line;
38       *            BACKWARD is in the opposite direction; BOTH is a waterway that can be used in both directions; NONE is a
39       *            waterway that cannot be used for sailing.
40       * @throws NetworkException 
41       */
42      public Waterway(final Network network, String id, OTSNode startNode, OTSNode endNode, LinkType linkType, OTSLine3D designLine,
43          LongitudinalDirectionality directionality) throws NetworkException
44      {
45          super(network, id, startNode, endNode, linkType, designLine, directionality);
46      }
47  
48      /**
49       * Construct a new waterway.
50       * @param network the network.
51       * @param id the link id
52       * @param startNode start node (directional)
53       * @param endNode end node (directional)
54       * @param linkType Link type to indicate compatibility with GTU types
55       * @param designLine the OTSLine3D design line of the Link
56       * @param directionalityMap the directions for different type of ships; it might be that all or certain types of ships are
57       *            only allowed to use a canal in one direction. Furthermore, the directions can limit waterways for certain
58       *            classes of ships. Set the LongitudinalDirectionality to NONE for ships that are not allowed to sail this
59       *            waterway.
60       * @throws NetworkException 
61       */
62      public Waterway(final Network network, String id, OTSNode startNode, OTSNode endNode, LinkType linkType, OTSLine3D designLine,
63          Map<GTUType, LongitudinalDirectionality> directionalityMap) throws NetworkException
64      {
65          super(network, id, startNode, endNode, linkType, designLine, directionalityMap);
66      }
67  
68  }