Skip to content

Commit

Permalink
Update mtc.py
Browse files Browse the repository at this point in the history
PNR correction
  • Loading branch information
jawadmhoque committed Jul 9, 2024
1 parent 76fe87d commit fcbf6a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lasso/mtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,8 @@ def roadway_standard_to_mtc_network(
lambda g: g.y
)
# roadway_network.nodes_mtc_df["pnr"]=roadway_network.nodes_mtc_df["pnr"].fillna(0)
roadway_network.nodes_mtc_df["pnr"] = np.where(roadway_network.nodes_mtc_df['pnr']==0, '0.0', '1.0')
WranglerLogger.info("Setting PNR value and converting it to string")
roadway_network.nodes_mtc_df["pnr"] = np.where(roadway_network.nodes_mtc_df['pnr'].isin([0,'',' ']), '0.0', '1.0')

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

0 comments on commit fcbf6a1

Please sign in to comment.