View Javadoc
1   package org.opentrafficsim.kpi.sampling;
2   
3   /**
4    * <p>
5    * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
6    * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
7    * <p>
8    * @version $Revision$, $LastChangedDate$, by $Author$, initial version 12 okt. 2016 <br>
9    * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
10   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
11   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
12   */
13  public enum KpiGtuDirectionality
14  {
15  
16      /**
17       * Driving direction matches the direction of the graph, increasing fractional position when driving in this direction.
18       */
19      DIR_PLUS,
20  
21      /**
22       * Driving direction opposite to the direction of the graph, decreasing fractional position when driving in this direction.
23       */
24      DIR_MINUS;
25  
26      /**
27       * @return whether the gtu drives in the design direction on the link
28       */
29      public boolean isPlus()
30      {
31          return this.equals(DIR_PLUS);
32      }
33  
34      /**
35       * @return whether the gtu drives against the design direction on the link
36       */
37      public boolean isMinus()
38      {
39          return this.equals(DIR_MINUS);
40      }
41  
42  }