Skip to content

Commit fcbf6a1

Browse files
committed
Update mtc.py
PNR correction
1 parent 76fe87d commit fcbf6a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lasso/mtc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,8 @@ def roadway_standard_to_mtc_network(
17531753
lambda g: g.y
17541754
)
17551755
# roadway_network.nodes_mtc_df["pnr"]=roadway_network.nodes_mtc_df["pnr"].fillna(0)
1756-
roadway_network.nodes_mtc_df["pnr"] = np.where(roadway_network.nodes_mtc_df['pnr']==0, '0.0', '1.0')
1756+
WranglerLogger.info("Setting PNR value and converting it to string")
1757+
roadway_network.nodes_mtc_df["pnr"] = np.where(roadway_network.nodes_mtc_df['pnr'].isin([0,'',' ']), '0.0', '1.0')
17571758

17581759
# CUBE expect node id to be N
17591760
roadway_network.nodes_mtc_df.rename(columns={"model_node_id": "N"}, inplace=True)

0 commit comments

Comments
 (0)