Skip to content

Commit

Permalink
Change to CamelCase instead of camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyan1214 committed Nov 3, 2023
1 parent b688af0 commit c26b0c2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pelicun/resources/auto/Hazus_Earthquake_IM.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
def convertBridgeToHAZUSclass(AIM):

#TODO: replace labels in AIM with standard CamelCase versions
structureType = AIM["bridgeClass"]
structureType = AIM["BridgeClass"]
# if type(structureType)== str and len(structureType)>3 and structureType[:3] == "HWB" and 0 < int(structureType[3:]) and 29 > int(structureType[3:]):
# return AIM["bridge_class"]
state = AIM["stateCode"]
yr_built = AIM["yearBuilt"]
num_span = AIM["numOfSpans"]
len_max_span = AIM["maxSpanLength"]
state = AIM["StateCode"]
yr_built = AIM["YearBuilt"]
num_span = AIM["NumOfSpans"]
len_max_span = AIM["MaxSpanLength"]

seismic = ((int(state)==6 and int(yr_built)>=1975) or
(int(state)!=6 and int(yr_built)>=1990))
Expand Down Expand Up @@ -219,20 +219,20 @@ def convertBridgeToHAZUSclass(AIM):

def convertTunnelToHAZUSclass(AIM):

if ("bored" in AIM["constructType"]) or ("drilled" in AIM["constructType"]):
if ("Bored" in AIM["ConstructType"]) or ("Drilled" in AIM["ConstructType"]):
return "HTU1"
elif ("cut" in AIM["constructType"]) or ("cover" in AIM["constructType"]):
elif ("Cut" in AIM["ConstructType"]) or ("Cover" in AIM["ConstructType"]):
return "HTU2"
else:
# Select HTU2 for unclassfied tunnels because it is more conservative.
return "HTU2"

def convertRoadToHAZUSclass(AIM):

if AIM["roadType"] in ["primary", "secondary"]:
if AIM["RoadType"] in ["Primary", "Secondary"]:
return "HRD1"

elif AIM["roadType"]=="residential":
elif AIM["RoadType"]=="Residential":
return "HRD2"

else:
Expand Down Expand Up @@ -379,7 +379,7 @@ def auto_populate(AIM):

inf_type = GI["assetSubtype"]

if inf_type == "hwyBridge":
if inf_type == "HwyBridge":

# get the bridge class
bt = convertBridgeToHAZUSclass(GI)
Expand Down Expand Up @@ -411,7 +411,7 @@ def auto_populate(AIM):
}
}

elif inf_type == "hwyTunnel":
elif inf_type == "HwyTunnel":

# get the tunnel class
tt = convertTunnelToHAZUSclass(GI)
Expand Down Expand Up @@ -442,7 +442,7 @@ def auto_populate(AIM):
}
}
}
elif inf_type == "roadway":
elif inf_type == "Roadway":

# get the road class
rt = convertRoadToHAZUSclass(GI)
Expand Down

0 comments on commit c26b0c2

Please sign in to comment.