Synchronizable.java

  1. package org.opentrafficsim.road.gtu.animation;

  2. /**
  3.  * Interface for tactical planners that can return synchronization information for visualization.
  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 23 feb. 2018 <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 interface Synchronizable
  14. {

  15.     /**
  16.      * Returns the synchronization state.
  17.      * @return State; synchronization state
  18.      */
  19.     State getSynchronizationState();
  20.    
  21.     /**
  22.      * State of synchronization.
  23.      * <p>
  24.      * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  25.      * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
  26.      * <p>
  27.      * @version $Revision$, $LastChangedDate$, by $Author$, initial version 23 feb. 2018 <br>
  28.      * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  29.      * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  30.      * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
  31.      */
  32.     enum State
  33.     {
  34.         /** No synchronization. */
  35.         NONE,

  36.         /** Subject vehicle is adjusting speed. */
  37.         SYNCHRONIZING,

  38.         /** Subject vehicle is adjusting speed and indicating desired lane change. */
  39.         INDICATING,

  40.         /** Subject vehicle is cooperating for a lane change of another GTU. */
  41.         COOPERATING;
  42.     }

  43. }