aim4.vehicle

## Class BasicVehicle.MoveToTargetVelocityMovement

- java.lang.Object
- - aim4.vehicle.BasicVehicle.PhysicalMovement
  - - aim4.vehicle.BasicVehicle.MoveToTargetVelocityMovement

- All Implemented Interfaces:
    BasicVehicle.Movement, BasicVehicle.MovementWithAccel
  Enclosing class:
    BasicVehicle

      public static class BasicVehicle.MoveToTargetVelocityMovement
      extends BasicVehicle.PhysicalMovement

  A move-to-target-velocity movement.

- - ### Field Summary

    - ### Fields inherited from class aim4.vehicle.BasicVehicle.PhysicalMovement

      `spec`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement, double acceleration, double targetVelocity)` Create a move-to-target-velocity movement.
    `BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec, Point2D position, double heading, double velocity, double steeringAngle, double acceleration, double targetVelocity)` Create a move-to-target-velocity movement.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `coast()` Maintain the speed of the vehicle.
    `void` | `move(double currentTime, double timeStep)` Move the vehicle for a given period of time.
    `void` | `setAccelerationWithBound(double acceleration)` Set the acceleration with respect to the physical limit of the vehicle.
    `void` | `setAccelWithMaxTargetVelocity(double acceleration)` Set the acceleration with maximum target velocity.
    `void` | `setMaxAccelWithMaxTargetVelocity()` Set the Vehicle's acceleration to its maximum value.
    `void` | `setTargetVelocityWithBound(double targetVelocity)` Set the target velocity of the velocity
    `void` | `setTargetVelocityWithMaxAccel(double targetVelocity)` Set the target velocity (with maximum acceleration).
    `void` | `slowToStop()` Set the Vehicle's acceleration to its minimum value without going backward.
    `String` | `toString()`

    - ### Methods inherited from class aim4.vehicle.BasicVehicle.PhysicalMovement

      `getAcceleration, getHeading, getNonAccelMovement, getPosition, getVelocity, moveWithoutAcceleration, setVelocityWithBound`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicVehicle.MoveToTargetVelocityMovement

          public BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec,
                                                   Point2D position,
                                                   double heading,
                                                   double velocity,
                                                   double steeringAngle,
                                                   double acceleration,
                                                   double targetVelocity)

      Create a move-to-target-velocity movement.
      Parameters:
        `spec` - the vehicle specification
        `position` - the position
        `heading` - the heading
        `velocity` - the velocity
        `steeringAngle` - the steering angle
        `acceleration` - the acceleration
        `targetVelocity` - the target velocity

    - #### BasicVehicle.MoveToTargetVelocityMovement

          public BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement,
                                                   double acceleration,
                                                   double targetVelocity)

      Create a move-to-target-velocity movement.
      Parameters:
        `basicMovement` - the basic movement
        `acceleration` -
        `targetVelocity` -

  - ### Method Detail

    - #### setTargetVelocityWithBound

          public void setTargetVelocityWithBound(double targetVelocity)

      Set the target velocity of the velocity
      Parameters:
        `targetVelocity` - the target velocity

    - #### setAccelerationWithBound

          public void setAccelerationWithBound(double acceleration)

      Set the acceleration with respect to the physical limit of the vehicle.
      Specified by:
        `setAccelerationWithBound` in interface `BasicVehicle.MovementWithAccel`
      Overrides:
        `setAccelerationWithBound` in class `BasicVehicle.PhysicalMovement`
      Parameters:
        `acceleration` - the acceleration

    - #### coast

          public void coast()

      Maintain the speed of the vehicle.
      Overrides:
        `coast` in class `BasicVehicle.PhysicalMovement`

    - #### slowToStop

          public void slowToStop()

      Set the Vehicle's acceleration to its minimum value without going backward. Obeys limits on acceleration as well as disabilities.

    - #### setMaxAccelWithMaxTargetVelocity

          public void setMaxAccelWithMaxTargetVelocity()

      Set the Vehicle's acceleration to its maximum value. Obeys limits on setMaxAccelWithMaxTargetVelocity as well as disabilities.

    - #### setTargetVelocityWithMaxAccel

          public void setTargetVelocityWithMaxAccel(double targetVelocity)

      Set the target velocity (with maximum acceleration).
      Parameters:
        `targetVelocity` - the target velocity

    - #### setAccelWithMaxTargetVelocity

          public void setAccelWithMaxTargetVelocity(double acceleration)

      Set the acceleration with maximum target velocity.
      Parameters:
        `acceleration` - the acceleration

    - #### move

          public void move(double currentTime,
                  double timeStep)

      Move the vehicle for a given period of time.
      Specified by:
        `move` in interface `BasicVehicle.Movement`
      Overrides:
        `move` in class `BasicVehicle.PhysicalMovement`
      Parameters:
        `currentTime` - the current time
        `timeStep` - the period of time for which the vehicle moves.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `BasicVehicle.PhysicalMovement`

Copyright © 2013. All rights reserved.