package org.opentrafficsim.ahfe; import java.rmi.RemoteException; import java.util.LinkedHashMap; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; import org.djunits.value.vdouble.scalar.Acceleration; import org.djunits.value.vdouble.scalar.Duration; import org.djunits.value.vdouble.scalar.Length; import org.djunits.value.vdouble.scalar.Speed; import org.djunits.value.vdouble.scalar.Time; import org.djutils.event.EventInterface; import org.djutils.event.EventListenerInterface; import org.djutils.exceptions.Throw; import org.opentrafficsim.base.TimeStampedObject; import org.opentrafficsim.base.parameters.ParameterException; import org.opentrafficsim.base.parameters.ParameterTypeDouble; import org.opentrafficsim.base.parameters.ParameterTypeDuration; import org.opentrafficsim.base.parameters.Parameters; import org.opentrafficsim.base.parameters.constraint.ConstraintInterface; import org.opentrafficsim.core.gtu.GTUException; import org.opentrafficsim.core.gtu.perception.EgoPerception; import org.opentrafficsim.core.gtu.perception.PerceptionException; import org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException; import org.opentrafficsim.core.network.LateralDirectionality; import org.opentrafficsim.road.gtu.lane.LaneBasedGTU; import org.opentrafficsim.road.gtu.lane.perception.LanePerception; import org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable; import org.opentrafficsim.road.gtu.lane.perception.RelativeLane; import org.opentrafficsim.road.gtu.lane.perception.SortedSetPerceptionIterable; import org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.Anticipation; import org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborTriplet; import org.opentrafficsim.road.gtu.lane.perception.headway.HeadwayGTU; import org.opentrafficsim.road.network.OTSRoadNetwork; import nl.tudelft.simulation.jstats.distributions.DistNormal; /** * Implementation of delayed neighbors perception which anticipates using constant speed. *
* Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License.
*
* Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
*
* BSD-style license. See OpenTrafficSim License.
*
* @version $Revision$, $LastChangedDate$, by $Author$, initial version 4 mrt. 2017
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Wouter Schakel
*/
private class ErrorValue
{
/** Time. */
private Time time;
/** Error. */
private double error;
/**
*
*/
ErrorValue()
{
}
/**
* @return time.
*/
public Time getTime()
{
return this.time;
}
/**
* @return error.
*/
public double getError()
{
return this.error;
}
/**
* @param t Time; time
* @param err double; error
*/
public void set(final Time t, final double err)
{
this.time = t;
this.error = err;
}
/** {@inheritDoc} */
@Override
public final String toString()
{
return "ErrorValue [time=" + this.time + ", error=" + this.error + "]";
}
}
/** {@inheritDoc} */
@Override
public final String toString()
{
return "DelayedNeighborsPerception [anticipation=" + this.anticipation + ", rearrangeTime=" + this.rearrangeTime
+ ", followers=" + this.followers + ", leaders=" + this.leaders + ", firstFollowers=" + this.firstFollowers
+ ", firstLeaders=" + this.firstLeaders + ", gtuAlongside=" + this.gtuAlongside + ", errors=" + this.errors
+ ", norm=" + this.norm + "]";
}
}