aim4.im.v2i.batch

## Class RoadBasedReordering

- java.lang.Object
- - aim4.im.v2i.batch.RoadBasedReordering

- All Implemented Interfaces:
    ReorderingStrategy

      public class RoadBasedReordering
      extends Object
      implements ReorderingStrategy

  The road-based reorder strategy.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static double` | `DEFAULT_PROCESSING_INTERVAL` The time period between the processing times.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoadBasedReordering(double processingInterval)` Create a road based reordering strategy

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<BatchModeRequestHandler.IndexedProposal>` | `getBatch(double currentTime, NavigableSet<BatchModeRequestHandler.IndexedProposal> queue, TrackModel trackModel)` Select a subset of indexed proposals from the queue and sort them in a particular order such that they will be processed in that order.
    `double` | `getNextProcessingTime()` Get the next processing time for the next batch.
    `double` | `getNextProposalDeadline()` Get the next proposal deadline for the next batch.
    `void` | `setInitialTime(double initTime)` Set the initial time of the batch mode.

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

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

- - ### Field Detail

    - #### DEFAULT_PROCESSING_INTERVAL

          public static final double DEFAULT_PROCESSING_INTERVAL

      The time period between the processing times.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RoadBasedReordering

          public RoadBasedReordering(double processingInterval)

      Create a road based reordering strategy
      Parameters:
        `processingInterval` - the processing interval

  - ### Method Detail

    - #### setInitialTime

          public void setInitialTime(double initTime)

      Set the initial time of the batch mode.
      Specified by:
        `setInitialTime` in interface `ReorderingStrategy`
      Parameters:
        `initTime` - the initial time of the batch mode.

    - #### getBatch

          public List<BatchModeRequestHandler.IndexedProposal> getBatch(double currentTime,
                                                               NavigableSet<BatchModeRequestHandler.IndexedProposal> queue,
                                                               TrackModel trackModel)

      Select a subset of indexed proposals from the queue and sort them in a particular order such that they will be processed in that order.
      Specified by:
        `getBatch` in interface `ReorderingStrategy`
      Parameters:
        `currentTime` - the current time
        `queue` - the current queue of all indexed proposals
        `trackModel` - the track model
      Returns:
        an ordered list of indexed proposals

    - #### getNextProcessingTime

          public double getNextProcessingTime()

      Get the next processing time for the next batch.
      Specified by:
        `getNextProcessingTime` in interface `ReorderingStrategy`
      Returns:
        the next processing time.

    - #### getNextProposalDeadline

          public double getNextProposalDeadline()

      Get the next proposal deadline for the next batch.
      Specified by:
        `getNextProposalDeadline` in interface `ReorderingStrategy`
      Returns:
        the next proposal deadline.

Copyright © 2013. All rights reserved.