Skip to content

Commit

Permalink
Update 01-BCM_ApplyHighwayProjectCards.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
jawadmhoque committed Mar 8, 2024
1 parent 01e7b78 commit 4947068
Showing 1 changed file with 43 additions and 23 deletions.
66 changes: 43 additions & 23 deletions scripts/01-BCM_ApplyHighwayProjectCards.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 54,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"import os\n",
"import sys\n",
Expand Down Expand Up @@ -55,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 55,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -67,15 +76,15 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 56,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2024-03-04 22:49:01, INFO: Lasso base directory set as: ..\n",
"2024-03-04 22:49:01, INFO: Lasso base directory set as: ..\n"
"2024-03-08 10:04:15, INFO: Lasso base directory set as: ..\n",
"2024-03-08 10:04:15, INFO: Lasso base directory set as: ..\n"
]
}
],
Expand All @@ -93,7 +102,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -110,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -127,9 +136,18 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 59,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (2630197963.py, line 14)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"C:\\Users\\local_USJH706661\\Temp\\ipykernel_31468\\2630197963.py\"\u001b[1;36m, line \u001b[1;32m14\u001b[0m\n\u001b[1;33m for card in scenario_2015_cards:\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"project_card_list = []\n",
"\n",
Expand All @@ -143,7 +161,8 @@
" 'Year 2015 Modify HOV Lanes and USE on CA-237 WB North 1st Street to US 101_v2.yml',\n",
" 'Year 2015 Modify HOV Lanes and USE on I-680 NB from Alcosta Blvd to Livorna Road_v2.yml',\n",
" 'Year 2015 Modify HOV Lanes and USE on I-680 SB from Benicia Bridge to Alcosta Blvd_v2.yml',\n",
" 'year_2015_managed_lane_i680n_ca_242_to_benicia_bridge.yml'\n",
" 'year_2015_managed_lane_i680n_ca_242_to_benicia_bridge.yml']\n",
"\n",
"for card in scenario_2015_cards:\n",
" _filename = os.path.join(card_dir, '2020',card)\n",
" card = ProjectCard.read(_filename, validate = False)\n",
Expand All @@ -152,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -664,7 +683,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1086,7 +1105,7 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -1188,7 +1207,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -2573,7 +2592,8 @@
"model_net = ModelRoadwayNetwork.from_RoadwayNetwork(\n",
" roadway_network_object = curr_scenario.road_net, \n",
" parameters = parameters\n",
")"
")\n",
"model_net.nodes_df['N']=model_net.nodes_df['model_node_id']"
]
},
{
Expand All @@ -2586,7 +2606,7 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -6605,12 +6625,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Debugging the updated network"
"## One link in the network has a null geometry. Deleting it and adding it back again with a diferent project card"
]
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -6626,7 +6646,7 @@
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -11002,7 +11022,7 @@
},
{
"cell_type": "code",
"execution_count": 81,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11014,7 +11034,7 @@
},
{
"cell_type": "code",
"execution_count": 82,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11025,7 +11045,7 @@
},
{
"cell_type": "code",
"execution_count": 83,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit 4947068

Please sign in to comment.