| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.im.v2i.reservation.ReservationArray
aim4.im.v2i.reservation.ReservationGrid
public class ReservationGrid
The reservation grid.
| Nested Class Summary | |
|---|---|
 class | 
ReservationGrid.TimeTile
The time tile.  | 
| Constructor Summary | |
|---|---|
ReservationGrid(int xNum,
                int yNum,
                double gridTimeStep)
Create a reservation grid.  | 
|
| Method Summary | |
|---|---|
 int | 
calcDiscreteTime(double time)
Get the discrete time of a given time.  | 
 double | 
calcRemainingTime(double time)
Get the remaining time in the grid time step of the given time  | 
 int | 
calcTileId(int x,
           int y)
Get the ID of the time tile at a given coordinate.  | 
 double | 
calcTime(int discreteTime)
Get the time of a given discrete time.  | 
 int | 
calcX(int tid)
The x coordinate of the time tile.  | 
 int | 
calcY(int tid)
The y coordinate of the time tile.  | 
 void | 
cleanUp(double currentTime)
Clean up the reservation grid.  | 
 double | 
getGridTimeStep()
Get the time step.  | 
 double | 
getLastReservedTime()
Get the last time at which any time-tile has been reserved.  | 
 List<Integer> | 
getReservedTilesAtTime(double time)
Get the set of all reserved tiles at a given discrete time.  | 
 Set<Integer> | 
getVinOfReservedTilesAtTime(double time)
Get the VINs of all reserved tiles at a given discrete time.  | 
 int | 
getxNum()
Get the number of time tiles in the x direction.  | 
 int | 
getXnum()
Get the number of time tiles in the x direction.  | 
 int | 
getyNum()
Get the number of time tiles in the y direction.  | 
 int | 
getYnum()
Get the number of time tiles in the y direction.  | 
| Methods inherited from class aim4.im.v2i.reservation.ReservationArray | 
|---|
cancel, cleanUp, getLastReservedDiscreteTime, getLastReservedDiscreteTime, getNumberOfTiles, getReservationId, getReservedTilesAtTime, getVinOfReservedTilesAtTime, hasReservation, isReserved, reserve | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ReservationGrid(int xNum,
                       int yNum,
                       double gridTimeStep)
xNum - the number of time tiles in the x directionyNum - the number of time tiles in the y directiongridTimeStep - the time step.| Method Detail | 
|---|
public void cleanUp(double currentTime)
currentTime - the current timepublic int getXnum()
public int getYnum()
public int calcX(int tid)
tid - the ID of the time tile
public int calcY(int tid)
tid - the ID of the time tile
public int calcTileId(int x,
                      int y)
x - the x-coordinatey - the y-coordinate
public int getxNum()
public int getyNum()
public double getGridTimeStep()
public int calcDiscreteTime(double time)
time - the time
public double calcRemainingTime(double time)
time - the time
public double calcTime(int discreteTime)
discreteTime - the time
public double getLastReservedTime()
public List<Integer> getReservedTilesAtTime(double time)
time - the time
public Set<Integer> getVinOfReservedTilesAtTime(double time)
time - the time
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||