Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of not using parking file of the tail RideHailManagers. #3756

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,12 @@ object InfrastructureUtils extends LazyLogging {

// CHARGING ZONES ARE BUILT HERE
logger.info(s"building charging networks...")
val (nonRhChargingNetwork, rhChargingNetwork) = (
ChargingNetwork.init(
chargingStalls,
envelopeInUTM,
beamServices
),
rideHailChargingStalls.map { case (_, chargingZones) =>
RideHailDepotNetwork.init(chargingZones, envelopeInUTM, beamServices)
}.head
val nonRhChargingNetwork = ChargingNetwork.init(
chargingStalls,
envelopeInUTM,
beamServices
)
val rhChargingNetwork = RideHailDepotNetwork.init(rideHailChargingStalls, envelopeInUTM, beamServices)
logger.info(s"public charging network has ${nonRhChargingNetwork.parkingZones.size} stations")
logger.info(s"ride-hail charging network has ${rhChargingNetwork.parkingZones.size} depots")

Expand Down Expand Up @@ -245,20 +241,19 @@ object InfrastructureUtils extends LazyLogging {
* @param stalls list of parking zones
* @return
*/
def loadRideHailChargingStalls(
private def loadRideHailChargingStalls(
stalls: Map[Id[ParkingZoneId], ParkingZone]
): Map[Id[VehicleManager], Map[Id[ParkingZoneId], ParkingZone]] = {
): Map[Id[ParkingZoneId], ParkingZone] = {
import VehicleManager._
stalls
.filter(x => x._2.chargingPointType.nonEmpty && x._2.reservedFor.managerType == TypeEnum.RideHail)
.groupBy(_._2.reservedFor.managerId)
}

/**
* @param stalls list of parking zones
* @return
*/
def loadChargingStalls(
private def loadChargingStalls(
stalls: Map[Id[ParkingZoneId], ParkingZone]
): Map[Id[ParkingZoneId], ParkingZone] = {
import VehicleManager._
Expand Down