Skip to content

Commit

Permalink
modify write_roadway_as_fixed_width to not use tokens wsp-sag#128
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed Aug 18, 2021
1 parent fd328eb commit 80511c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lasso/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ def __init__(self, **kwargs):

self.fare_matrix_output_variables = ["faresystem", "origin_farezone", "destination_farezone", "price"]

self.zones = 4756
"""
Create all the possible headway variable combinations based on the cube time periods setting
"""
Expand Down
6 changes: 3 additions & 3 deletions lasso/roadway.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ def write_roadway_as_fixedwidth(

# write out cube script
s = 'RUN PGM = NETWORK MSG = "Read in network from fixed width file" \n'
s += "FILEI LINKI[1] = %LINK_DATA_PATH%,"
s += 'FILEI LINKI[1] = "{}",'.format(output_link_txt)
start_pos = 1
for i in range(len(link_max_width_df)):
s += " VAR=" + link_max_width_df.header.iloc[i]
Expand All @@ -1791,7 +1791,7 @@ def write_roadway_as_fixedwidth(

s = s[:-1]
s += "\n"
s += "FILEI NODEI[1] = %NODE_DATA_PATH%,"
s += 'FILEI NODEI[1] = "{}",'.format(output_node_txt)
start_pos = 1
for i in range(len(node_max_width_df)):
s += " VAR=" + node_max_width_df.header.iloc[i]
Expand All @@ -1814,7 +1814,7 @@ def write_roadway_as_fixedwidth(

s = s[:-1]
s += "\n"
s += 'FILEO NETO = "%SCENARIO_DIR%/complete_network.net" \n\n ZONES = %zones% \n\n'
s += 'FILEO NETO = "complete_network.net" \n\n ZONES = {} \n\n'.format(self.parameters.zones)
s += ';ROADWAY = LTRIM(TRIM(ROADWAY)) \n'
s += ';NAME = LTRIM(TRIM(NAME)) \n'
s += '\n \nENDRUN'
Expand Down

0 comments on commit 80511c0

Please sign in to comment.