All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentrafficsim.road.gtu.lane.control.DelayedActuation Maven / Gradle / Ivy

The newest version!
package org.opentrafficsim.road.gtu.lane.control;

import org.djunits.value.vdouble.scalar.Acceleration;
import org.djunits.value.vdouble.scalar.Duration;
import org.opentrafficsim.base.parameters.ParameterTypeDuration;
import org.opentrafficsim.base.parameters.constraint.NumericConstraint;
import org.opentrafficsim.road.gtu.lane.LaneBasedGtu;

/**
 * Delays the actuation of acceleration. This is not part of the vehicle model as that is used for both human and automated
 * control, which follow different vehicle capability semantics.
 * 

* Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License. *

* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel */ public interface DelayedActuation { /** No delayed actuation. */ DelayedActuation NONE = new DelayedActuation() { /** {@inheritDoc} */ @Override public Acceleration delayActuation(final Acceleration desiredAcceleration, final LaneBasedGtu gtu) { return desiredAcceleration; } }; /** Parameter for actuation delay. */ ParameterTypeDuration TAU = new ParameterTypeDuration("tau_actuation", "Actuation delay", Duration.instantiateSI(0.1), NumericConstraint.POSITIVE); /** Tau delayed actuation. */ DelayedActuation TAUDELAYED = new DelayedActuation() { /** {@inheritDoc} */ @Override public Acceleration delayActuation(final Acceleration desiredAcceleration, final LaneBasedGtu gtu) { // TODO: numerical implementation of tau rule return desiredAcceleration.minus(gtu.getAcceleration()); } }; /** * Delays the actuation of acceleration. * @param desiredAcceleration Acceleration; desired acceleration * @param gtu LaneBasedGtu; gtu * @return Acceleration; delayed acceleration */ Acceleration delayActuation(Acceleration desiredAcceleration, LaneBasedGtu gtu); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy