Skip to content

Commit

Permalink
fixing style #22
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Sep 29, 2024
1 parent 9ced1d9 commit ed11c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/contributed/saga
Submodule saga updated 1 files
+1 −0 CODEOWNERS
6 changes: 3 additions & 3 deletions tools/distributeChargingStations.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def main(options):
unchangedParkings = []
unvisitedEdges = []
for edge, parkingAreas in edge2parkingArea.items():
if ((checkSelection and not edge.isSelected()) or len(parkingAreas) == 0 or
(options.skipEquippedEdges and edge in edge2chargingPointCount and edge2chargingPointCount[edge] > 0)):
if ((checkSelection and not edge.isSelected()) or len(parkingAreas) == 0 or
(options.skipEquippedEdges and edge2chargingPointCount.get(edge, 0) > 0)):
if len(parkingAreas) > 0:
unchangedParkings.extend([pa[0] for pa in parkingAreas])
continue
Expand All @@ -201,7 +201,7 @@ def main(options):
parkingAreas = edge2parkingArea[selectedEdge]
capacities = [p[1] for p in parkingAreas]
parkingSum = sum(capacities)
chargingPointDiscount = edge2chargingPointCount[selectedEdge] if options.includeExisting and selectedEdge in edge2chargingPointCount else 0 # noqa
chargingPointDiscount = edge2chargingPointCount.get(selectedEdge, 0) if options.includeExisting else 0
wishedChargingPointCount = max(0, math.floor(options.density * parkingSum) - chargingPointDiscount)
if parkingSum < options.min:
assignBalance -= wishedChargingPointCount
Expand Down

0 comments on commit ed11c43

Please sign in to comment.