aim4.msg.i2v
Class Confirm

java.lang.Object
  extended by aim4.msg.i2v.I2VMessage
      extended by aim4.msg.i2v.Confirm

public class Confirm
extends I2VMessage

Message sent from an Intersection Manager to a Vehicle to confirm a reservation request.


Nested Class Summary
 
Nested classes/interfaces inherited from class aim4.msg.i2v.I2VMessage
I2VMessage.Type
 
Field Summary
 
Fields inherited from class aim4.msg.i2v.I2VMessage
messageType, size
 
Constructor Summary
Confirm(int imId, int vin, int reservationID, int requestId, double arrivalTime, double earlyError, double lateError, double arrivalVelocity, int arrivalLaneID, int departureLaneID, double aczDistance, Queue<double[]> accProfile)
          Create a confirm message.
 
Method Summary
 Queue<double[]> getAccelerationProfile()
          Get a run-length encoded list of acceleration/duration pairs to be executed by the vehicle during intersection traversal.
 double getACZDistance()
          Get the distance the Admission Control Zone extends past the intersection for this reservation.
 int getArrivalLaneID()
          Get the ID number of the lane in which the vehicle should arrive at the intersection.
 double getArrivalTime()
          Get the time at which the receiving vehicle should arrive at the intersection.
 double getArrivalVelocity()
          Get the velocity at which the vehicle should arrive at the intersection.
 int getDepartureLaneID()
          Get the ID number of the lane in which the vehicle should depart the intersection.
 double getEarlyError()
          Get the maximum amount of time before the arrival time that the receiving vehicle can safely arrive at the intersection.
 double getLateError()
          Get the maximum amount of time after the arrival time that the receiving vehicle can safely arrive at the intersection.
 int getRequestId()
          Get the request ID of the request message this confirm message correspond to.
 int getReservationId()
          Get the unique ID number for the reservation confirmed by this message.
 String toString()
           
 
Methods inherited from class aim4.msg.i2v.I2VMessage
getImId, getMessageType, getSize, getVin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Confirm

public Confirm(int imId,
               int vin,
               int reservationID,
               int requestId,
               double arrivalTime,
               double earlyError,
               double lateError,
               double arrivalVelocity,
               int arrivalLaneID,
               int departureLaneID,
               double aczDistance,
               Queue<double[]> accProfile)
Create a confirm message.

Parameters:
imId - the ID number of the IntersectionManager sending this message
vin - the ID number of the Vehicle to which this message is being sent
reservationID - the unique ID number for the reservation confirmed by this message
requestId - the request id of the request message this confirm message corresponds to.
arrivalTime - the time at which the receiving vehicle should arrive at the intersection
earlyError - the maximum amount of time before the arrival time that the receiving vehicle can safely arrive at the intersection, in seconds
lateError - the maximum amount of time after the arrival time that the receiving vehicle can safely arrive at the intersection, in seconds
arrivalVelocity - the velocity at which the vehicle should arrive at the intersection, in meters per second
arrivalLaneID - the ID number of the lane in which the vehicle should arrive at the intersection
departureLaneID - the ID number of the lane in which the vehicle should depart the intersection
aczDistance - The distance after the intersection that is protected by an Admission Control Zone.
accProfile - a run-length encoded list of acceleration/duration pairs to be executed by the vehicle during intersection traversal
Method Detail

getReservationId

public int getReservationId()
Get the unique ID number for the reservation confirmed by this message.

Returns:
the ID number for the reservation confirmed by this message

getRequestId

public int getRequestId()
Get the request ID of the request message this confirm message correspond to.

Returns:
the id of the request message.

getArrivalTime

public double getArrivalTime()
Get the time at which the receiving vehicle should arrive at the intersection.

Returns:
the time at which the receiving vehicle should arrive at the intersection

getEarlyError

public double getEarlyError()
Get the maximum amount of time before the arrival time that the receiving vehicle can safely arrive at the intersection.

Returns:
the maximum amount of time before the arrival time that the receiving vehicle can safely arrive at the intersection, in seconds

getLateError

public double getLateError()
Get the maximum amount of time after the arrival time that the receiving vehicle can safely arrive at the intersection.

Returns:
the maximum amount of time after the arrival time that the receiving vehicle can safely arrive at the intersection, in seconds

getArrivalVelocity

public double getArrivalVelocity()
Get the velocity at which the vehicle should arrive at the intersection.

Returns:
the velocity at which the vehicle should arrive at the intersection, in meters per second

getArrivalLaneID

public int getArrivalLaneID()
Get the ID number of the lane in which the vehicle should arrive at the intersection.

Returns:
the ID number of the lane in which the vehicle should arrive at the intersection

getDepartureLaneID

public int getDepartureLaneID()
Get the ID number of the lane in which the vehicle should depart the intersection.

Returns:
the ID number of the lane in which the vehicle should depart the intersection

getACZDistance

public double getACZDistance()
Get the distance the Admission Control Zone extends past the intersection for this reservation.

Returns:
the length of the Admission Control Zone after the intersection for this reservation

getAccelerationProfile

public Queue<double[]> getAccelerationProfile()
Get a run-length encoded list of acceleration/duration pairs to be executed by the vehicle during intersection traversal.

Returns:
a run-length encoded list of acceleration/duration pairs (in meters per second squared and meters, respectively) to be executed by the vehicle during intersection traversal

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.