Skip to content

Commit

Permalink
Removed old debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavasana authored May 12, 2024
1 parent 202f818 commit 68656e3
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/asim/scripts/resident/2zoneSkim.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
nodes['X'] = nodes.geometry.x
nodes['Y'] = nodes.geometry.y

# TEST: nodes
# nodes.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/nodes.csv")

links = gpd.read_file(sf)
links = links.to_crs(epsg=2230)

Expand All @@ -68,37 +65,18 @@
centroids["network_node_x"] = nodes["X"].loc[centroids["network_node_id"]].tolist()
centroids["network_node_y"] = nodes["Y"].loc[centroids["network_node_id"]].tolist()

# TEST: centroids
# centroids.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/centroids.csv")

# %%
## read transit stop and route file (KK) ============
stops = pd.read_csv(os.path.join(model_inputs, parms['stop_attributes']['file']))
routes = pd.read_csv(os.path.join(model_inputs, parms['route_attributes']['file']))
routes = routes.filter(['Route_ID','Route_Name', 'Mode'])

# TEST: stops 1
# stops.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/stops_1.csv")

# add mode from route file & convert lat.long to stateplane(KK)=====
stops = stops.merge(routes, left_on='Route_ID', right_on='Route_ID') #

# TEST: stops 2
# stops.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/stops_2.csv")

# stops.rename(columns={' Latitude': 'Latitude'}, inplace=True)
# stops["Longitude1"] = stops["Longitude"]/1000000
# stops["Latitude1"] = stops["Latitude"]/1000000

# TEST: stops 3
# stops.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/stops_3.csv")

gpd_stops = gpd.GeoDataFrame(stops, geometry = gpd.points_from_xy(stops.Longitude, stops.Latitude, crs='epsg:4326'))
gpd_stops = gpd_stops.to_crs('epsg:2230')

# TEST: stops 4
# gpd_stops.to_file(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/gpd_stops.shp")

pd.set_option('display.float_format', lambda x: '%.9f' % x)

gpd_stops['Longitude'] = gpd_stops['geometry'].x
Expand All @@ -112,9 +90,6 @@
np.where((stops['Mode']==4) | (stops['Mode']==5) | (stops['Mode']==8) | (stops['Mode']==9) | (stops['Mode']==6) | (stops['Mode']==7), 'E',
'N'))

# TEST: stops 4
# stops.to_csv(r"C:/abm_runs/sar/2022_ABM3_tned/src/asim/scripts/resident/stops_4.csv")

# %%
# MAZ-to-MAZ Walk
print(f"{datetime.now().strftime('%H:%M:%S')} Build MAZ to MAZ Walk Table...")
Expand Down

0 comments on commit 68656e3

Please sign in to comment.