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