public class ReservationGridManager extends Object implements ReservationManager<ReservationGridManager.Query,ReservationGridManager.Plan,Integer>
Modifier and Type | Class and Description |
---|---|
static class |
ReservationGridManager.Config
The configuration of the reservation grid manager.
|
static class |
ReservationGridManager.Plan
The plan for the reservation.
|
static class |
ReservationGridManager.Query
The reservation grid manager.
|
static class |
ReservationGridManager.VinHistoryStatCollector
The statistic collector for VIN history.
|
Modifier and Type | Field and Description |
---|---|
ReservationGridManager.Config |
config
The configuration of this reservation grid manager.
|
double |
staticBufferSize
The size of the static buffer, in meters, used by this policy.
|
Constructor and Description |
---|
ReservationGridManager(double currentTime,
ReservationGridManager.Config config,
Intersection intersection,
TiledArea tiledArea,
ReservationGrid reservationGrid)
Create a reservation grid manager.
|
ReservationGridManager(ReservationGridManager.Config config,
Intersection intersection,
TiledArea tiledArea,
ReservationGrid reservationGrid)
Create a reservation grid manager.
|
Modifier and Type | Method and Description |
---|---|
Integer |
accept(ReservationGridManager.Plan plan)
Accept the proposed plan.
|
void |
act(double timeStep)
Advance the time step.
|
void |
cancel(Integer reservationId)
Cancel the reservation.
|
ReservationGridManager.Config |
getConfig()
Get the configuration.
|
List<? extends Shape> |
getDebugShapes()
Get the rectangles for the ReservationTiles that have a reservation
for the current time.
|
StatCollector<ReservationGridManager> |
getStatCollector()
Get the statistic collector.
|
TiledArea |
getTiledArea()
Get the tiled area.
|
ReservationGridManager.Plan |
query(ReservationGridManager.Query q)
Find a set of space-time tile for a particular traversal proposal in
a request message.
|
public ReservationGridManager.Config config
public double staticBufferSize
public ReservationGridManager(ReservationGridManager.Config config, Intersection intersection, TiledArea tiledArea, ReservationGrid reservationGrid)
config
- the configuration of the grid managerintersection
- the intersectiontiledArea
- the tiled areareservationGrid
- the reservation gridpublic ReservationGridManager(double currentTime, ReservationGridManager.Config config, Intersection intersection, TiledArea tiledArea, ReservationGrid reservationGrid)
currentTime
- the current timeconfig
- the configuration of the grid managerintersection
- the intersectiontiledArea
- the tiled areareservationGrid
- the reservation gridpublic void act(double timeStep)
timeStep
- the time steppublic ReservationGridManager.Config getConfig()
public TiledArea getTiledArea()
public StatCollector<ReservationGridManager> getStatCollector()
public ReservationGridManager.Plan query(ReservationGridManager.Query q)
query
in interface ReservationManager<ReservationGridManager.Query,ReservationGridManager.Plan,Integer>
q
- the query objectpublic Integer accept(ReservationGridManager.Plan plan)
accept
in interface ReservationManager<ReservationGridManager.Query,ReservationGridManager.Plan,Integer>
plan
- the plan genreated by query()public void cancel(Integer reservationId)
cancel
in interface ReservationManager<ReservationGridManager.Query,ReservationGridManager.Plan,Integer>
reservationId
- the reservationCopyright © 2013. All rights reserved.