Class ChargingStationIndex
java.lang.Object
org.eclipse.mosaic.fed.application.ambassador.simulation.electric.ChargingStationIndex
A
ChargingStationIndex holds Charging Stations in a tree structure, sorted by their position.
The tree is initialized and gets updated lazily when a search is performed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChargingStation(String id, GeoPoint position) Adds a Charging Station to the tree.getChargingStationsInCircle(GeoCircle circle) intvoidupdateChargingStation(ChargingStationData chargingStationData) Replaces the stations data object.
-
Constructor Details
-
ChargingStationIndex
public ChargingStationIndex()Inits aChargingStationIndexwith default bucket size of 20. Bucket size describes the item capacity of one tree node.
-
-
Method Details
-
addChargingStation
Adds a Charging Station to the tree. Be sure to addChargingStationDatausingupdateChargingStation(ChargingStationData).The CS is inserted into the tree when it is queried (e.g.
getChargingStationsInCircle(GeoCircle)orgetNumberOfChargingStations()- Parameters:
id- ID of the ChargingStationposition- Position of the ChargingStation
-
updateChargingStation
Replaces the stations data object. -
getChargingStationsInCircle
-
getNumberOfChargingStations
public int getNumberOfChargingStations()
-