HeadwayGTUPerceived.java

  1. package org.opentrafficsim.road.gtu.lane.perception.headway;

  2. import org.djunits.value.vdouble.scalar.Acceleration;
  3. import org.djunits.value.vdouble.scalar.Length;
  4. import org.djunits.value.vdouble.scalar.Speed;
  5. import org.opentrafficsim.base.parameters.ParameterSet;
  6. import org.opentrafficsim.core.gtu.GTUException;
  7. import org.opentrafficsim.road.gtu.lane.LaneBasedGTU;

  8. /**
  9.  * <p>
  10.  * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  11.  * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
  12.  * <p>
  13.  * @version $Revision$, $LastChangedDate$, by $Author$, initial version 5 apr. 2018 <br>
  14.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  15.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  16.  * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
  17.  */
  18. public class HeadwayGTUPerceived extends HeadwayGTURealCopy
  19. {

  20.     /** */
  21.     private static final long serialVersionUID = 20180405L;

  22.     /**
  23.      * @param gtu LaneBasedGTU; gtu
  24.      * @param distance Length; distance
  25.      * @param speed Speed; speed
  26.      * @param acceleration Acceleration; acceleration
  27.      * @throws GTUException ...
  28.      */
  29.     public HeadwayGTUPerceived(final LaneBasedGTU gtu, final Length distance, final Speed speed,
  30.             final Acceleration acceleration) throws GTUException
  31.     {
  32.         super(gtu.getId(), gtu.getGTUType(), distance, gtu.getLength(), gtu.getWidth(), speed, acceleration,
  33.                 gtu.getTacticalPlanner().getCarFollowingModel(), new ParameterSet(gtu.getParameters()), getSpeedLimitInfo(gtu),
  34.                 gtu.getStrategicalPlanner().getRoute(), gtu.getDesiredSpeed(),
  35.                 getGTUStatuses(gtu, gtu.getSimulator().getSimulatorTime()));
  36.     }

  37.     /**
  38.      * @param gtu LaneBasedGTU; gtu
  39.      * @param overlapFront Length; the overlap over the front of the GTU
  40.      * @param overlap Length; ???
  41.      * @param overlapRear Length; the overlap over the rear of the GTU
  42.      * @param speed Speed; speed
  43.      * @param acceleration Acceleration; acceleration
  44.      * @throws GTUException ...
  45.      */
  46.     public HeadwayGTUPerceived(final LaneBasedGTU gtu, final Length overlapFront, final Length overlap,
  47.             final Length overlapRear, final Speed speed, final Acceleration acceleration) throws GTUException
  48.     {
  49.         super(gtu.getId(), gtu.getGTUType(), overlapFront, overlap, overlapRear, gtu.getLength(), gtu.getWidth(), speed,
  50.                 acceleration, gtu.getTacticalPlanner().getCarFollowingModel(), new ParameterSet(gtu.getParameters()),
  51.                 getSpeedLimitInfo(gtu), gtu.getStrategicalPlanner().getRoute(), gtu.getDesiredSpeed(),
  52.                 getGTUStatuses(gtu, gtu.getSimulator().getSimulatorTime()));
  53.     }

  54. }