From e8f84d390665a7cdb300d0ca3bf60d81a8a9a87e Mon Sep 17 00:00:00 2001 From: GitLab CI <gitlab-ci@example.com> Date: Thu, 12 Dec 2024 01:17:15 +0000 Subject: [PATCH] Update synced files [skip ci] --- .../Analysis_discharge_solution.ipynb | 2 +- .../Analysis_emissions_solution.ipynb | 18 +++++++++--------- .../Force/Analysis_force_solution.ipynb | 18 +++++++++--------- .../Student/Discharge/Analysis_discharge.ipynb | 6 +++--- .../Student/Emissions/Analysis_emissions.ipynb | 6 +++--- .../GA_1_7/Student/Force/Analysis_force.ipynb | 6 +++--- .../Unused/Temp/Distribution_Fitting_T.ipynb | 14 +++++++------- synced_files/GA_2_5/Analysis_LP_solution.ipynb | 11 ++++++----- synced_files/GA_2_5/Analysis_LP_solution.md | 9 +++++---- synced_files/GA_2_5/Analysis_LP_solution.py | 9 +++++---- .../Week_2_2/old/PA_2_1_solution_sympy.ipynb | 18 +++++++++--------- .../Week_2_2/old/old_PA10_solution_sympy.ipynb | 18 +++++++++--------- 12 files changed, 69 insertions(+), 66 deletions(-) diff --git a/synced_files/GA_1_7/Solution/Discharge/Analysis_discharge_solution.ipynb b/synced_files/GA_1_7/Solution/Discharge/Analysis_discharge_solution.ipynb index bbcf40a2..d859c7cd 100644 --- a/synced_files/GA_1_7/Solution/Discharge/Analysis_discharge_solution.ipynb +++ b/synced_files/GA_1_7/Solution/Discharge/Analysis_discharge_solution.ipynb @@ -606,7 +606,7 @@ }, { "cell_type": "markdown", - "id": "11ddc8c7", + "id": "e3ec88c5", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", diff --git a/synced_files/GA_1_7/Solution/Emissions/Analysis_emissions_solution.ipynb b/synced_files/GA_1_7/Solution/Emissions/Analysis_emissions_solution.ipynb index eaee666b..33abe5e9 100644 --- a/synced_files/GA_1_7/Solution/Emissions/Analysis_emissions_solution.ipynb +++ b/synced_files/GA_1_7/Solution/Emissions/Analysis_emissions_solution.ipynb @@ -159,7 +159,7 @@ }, { "cell_type": "markdown", - "id": "4d6a4ac5", + "id": "5f318fac", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -262,7 +262,7 @@ }, { "cell_type": "markdown", - "id": "a360a68e", + "id": "b88582e2", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -374,7 +374,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78e8bfb0", + "id": "a9249f8a", "metadata": {}, "outputs": [], "source": [ @@ -437,7 +437,7 @@ }, { "cell_type": "markdown", - "id": "f9e6e4b7", + "id": "b8203245", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -538,7 +538,7 @@ }, { "cell_type": "markdown", - "id": "b2b33edf", + "id": "d20c56cb", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -552,7 +552,7 @@ }, { "cell_type": "markdown", - "id": "6dc245f9", + "id": "a64c2f48", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -573,7 +573,7 @@ { "cell_type": "code", "execution_count": null, - "id": "247c8913", + "id": "f11b2a9d", "metadata": {}, "outputs": [], "source": [ @@ -589,7 +589,7 @@ { "cell_type": "code", "execution_count": null, - "id": "36f2bad5", + "id": "1bbdd9ef", "metadata": {}, "outputs": [], "source": [ @@ -602,7 +602,7 @@ }, { "cell_type": "markdown", - "id": "fd15799d", + "id": "92f1d815", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", diff --git a/synced_files/GA_1_7/Solution/Force/Analysis_force_solution.ipynb b/synced_files/GA_1_7/Solution/Force/Analysis_force_solution.ipynb index e62246d1..cc56ac7a 100644 --- a/synced_files/GA_1_7/Solution/Force/Analysis_force_solution.ipynb +++ b/synced_files/GA_1_7/Solution/Force/Analysis_force_solution.ipynb @@ -164,7 +164,7 @@ }, { "cell_type": "markdown", - "id": "f36e02f9", + "id": "dafcccce", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -269,7 +269,7 @@ }, { "cell_type": "markdown", - "id": "f1685ef7", + "id": "8cadad2e", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -382,7 +382,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ee4fa46e", + "id": "d0876078", "metadata": {}, "outputs": [], "source": [ @@ -445,7 +445,7 @@ }, { "cell_type": "markdown", - "id": "1954e862", + "id": "37c26b83", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -546,7 +546,7 @@ }, { "cell_type": "markdown", - "id": "6fbb2622", + "id": "f638295c", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -561,7 +561,7 @@ }, { "cell_type": "markdown", - "id": "a24abfa0", + "id": "79d7654b", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -582,7 +582,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fdf07f46", + "id": "a08cb231", "metadata": {}, "outputs": [], "source": [ @@ -598,7 +598,7 @@ { "cell_type": "code", "execution_count": null, - "id": "52162335", + "id": "2ee565a3", "metadata": {}, "outputs": [], "source": [ @@ -611,7 +611,7 @@ }, { "cell_type": "markdown", - "id": "135af4ab", + "id": "9a9f5228", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; width:95%; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", diff --git a/synced_files/GA_1_7/Student/Discharge/Analysis_discharge.ipynb b/synced_files/GA_1_7/Student/Discharge/Analysis_discharge.ipynb index 2ded1c6e..060762e2 100644 --- a/synced_files/GA_1_7/Student/Discharge/Analysis_discharge.ipynb +++ b/synced_files/GA_1_7/Student/Discharge/Analysis_discharge.ipynb @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "6af7f7aa", + "id": "7dc6f454", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -405,7 +405,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2775d21f", + "id": "971ed028", "metadata": {}, "outputs": [], "source": [ @@ -421,7 +421,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc689f4a", + "id": "be96daf6", "metadata": {}, "outputs": [], "source": [ diff --git a/synced_files/GA_1_7/Student/Emissions/Analysis_emissions.ipynb b/synced_files/GA_1_7/Student/Emissions/Analysis_emissions.ipynb index 24200dbe..ca883feb 100644 --- a/synced_files/GA_1_7/Student/Emissions/Analysis_emissions.ipynb +++ b/synced_files/GA_1_7/Student/Emissions/Analysis_emissions.ipynb @@ -378,7 +378,7 @@ }, { "cell_type": "markdown", - "id": "bb49a9ae", + "id": "37696272", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -399,7 +399,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06e94020", + "id": "26c8bb32", "metadata": {}, "outputs": [], "source": [ @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20b68004", + "id": "3fad295a", "metadata": {}, "outputs": [], "source": [ diff --git a/synced_files/GA_1_7/Student/Force/Analysis_force.ipynb b/synced_files/GA_1_7/Student/Force/Analysis_force.ipynb index 312e6315..69626733 100644 --- a/synced_files/GA_1_7/Student/Force/Analysis_force.ipynb +++ b/synced_files/GA_1_7/Student/Force/Analysis_force.ipynb @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "4708e1c2", + "id": "a55ae969", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -405,7 +405,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4687da18", + "id": "b81312d7", "metadata": {}, "outputs": [], "source": [ @@ -421,7 +421,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cc6cdabe", + "id": "b0439c86", "metadata": {}, "outputs": [], "source": [ diff --git a/synced_files/GA_1_7/Unused/Temp/Distribution_Fitting_T.ipynb b/synced_files/GA_1_7/Unused/Temp/Distribution_Fitting_T.ipynb index 0db72994..7717142f 100644 --- a/synced_files/GA_1_7/Unused/Temp/Distribution_Fitting_T.ipynb +++ b/synced_files/GA_1_7/Unused/Temp/Distribution_Fitting_T.ipynb @@ -163,7 +163,7 @@ }, { "cell_type": "markdown", - "id": "7a98f23d", + "id": "0c01eb6e", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -263,7 +263,7 @@ }, { "cell_type": "markdown", - "id": "072da885", + "id": "4c5d6753", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fce8f81c", + "id": "47906ffe", "metadata": {}, "outputs": [], "source": [ @@ -434,7 +434,7 @@ }, { "cell_type": "markdown", - "id": "b5a9cb50", + "id": "4a520071", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -533,7 +533,7 @@ }, { "cell_type": "markdown", - "id": "59dc7afc", + "id": "a597d304", "metadata": {}, "source": [ "<div style=\"background-color:#FAE99E; color: black; vertical-align: middle; padding:15px; margin: 10px; border-radius: 10px\">\n", @@ -546,7 +546,7 @@ }, { "cell_type": "markdown", - "id": "8542b9a9", + "id": "1fa6a986", "metadata": {}, "source": [ "If you run the code in the cell below, you will obtain a scatter plot of both variables. Explore the relationship between both variables and answer the following questions:\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6061a45e", + "id": "82803c17", "metadata": {}, "outputs": [], "source": [ diff --git a/synced_files/GA_2_5/Analysis_LP_solution.ipynb b/synced_files/GA_2_5/Analysis_LP_solution.ipynb index c3afdcca..6ebebe92 100644 --- a/synced_files/GA_2_5/Analysis_LP_solution.ipynb +++ b/synced_files/GA_2_5/Analysis_LP_solution.ipynb @@ -268,7 +268,8 @@ "source": [ "# define parameters\n", "extension_factor = 1.5 # capacity after extension\n", - "extension_max_no = 40 # simplified budget limit\n", + "extension_max_no = 20 # simplified budget limit\n", + "\n", "timelimit = 300 # seconds\n", "beta = 2 # explained later\n", "\n", @@ -566,7 +567,7 @@ "outputs": [], "source": [ "# constrain the vehicles to the capacity of the road:\n", - "c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links)" + "# c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links)" ] }, { @@ -718,7 +719,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If you wish to see the velues for the entire network you just need to turn on the labels and run the function again. " + "If you wish to see the values for the entire network you just need to turn on the labels and run the function again. " ] }, { @@ -761,7 +762,7 @@ ], "metadata": { "kernelspec": { - "display_name": "mude-week-2-5", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -775,7 +776,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.7" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/synced_files/GA_2_5/Analysis_LP_solution.md b/synced_files/GA_2_5/Analysis_LP_solution.md index f201766b..734fa14e 100644 --- a/synced_files/GA_2_5/Analysis_LP_solution.md +++ b/synced_files/GA_2_5/Analysis_LP_solution.md @@ -7,7 +7,7 @@ jupyter: format_version: '1.3' jupytext_version: 1.16.4 kernelspec: - display_name: mude-week-2-5 + display_name: Python 3 language: python name: python3 --- @@ -191,7 +191,8 @@ Now that we have the required functions for reading and processing the data, let ```python # define parameters extension_factor = 1.5 # capacity after extension -extension_max_no = 40 # simplified budget limit +extension_max_no = 20 # simplified budget limit + timelimit = 300 # seconds beta = 2 # explained later @@ -367,7 +368,7 @@ c_qrt = model.addConstrs(link_flow_sqr[i, j] == link_flow[i, j] * link_flow[i, j ```python # constrain the vehicles to the capacity of the road: -c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links) +# c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links) ``` <!-- #region pycharm={"name": "#%% md\n"} --> @@ -442,7 +443,7 @@ capacity = {(i, j): cap_normal[i, j] * (1 - links_selected[i, j]) + cap_extend[i network_visualization_upgraded (G = G, pos=pos, link_flow=link_flows, capacity_new=capacity ,link_select=links_selected, labels='off') ``` -If you wish to see the velues for the entire network you just need to turn on the labels and run the function again. +If you wish to see the values for the entire network you just need to turn on the labels and run the function again. ```python # To see flow and capacity for the entire network diff --git a/synced_files/GA_2_5/Analysis_LP_solution.py b/synced_files/GA_2_5/Analysis_LP_solution.py index 86cc5586..b8ee1dda 100644 --- a/synced_files/GA_2_5/Analysis_LP_solution.py +++ b/synced_files/GA_2_5/Analysis_LP_solution.py @@ -7,7 +7,7 @@ # format_version: '1.3' # jupytext_version: 1.16.4 # kernelspec: -# display_name: mude-week-2-5 +# display_name: Python 3 # language: python # name: python3 # --- @@ -184,7 +184,8 @@ plt.show() # %% # define parameters extension_factor = 1.5 # capacity after extension -extension_max_no = 40 # simplified budget limit +extension_max_no = 20 # simplified budget limit + timelimit = 300 # seconds beta = 2 # explained later @@ -347,7 +348,7 @@ c_qrt = model.addConstrs(link_flow_sqr[i, j] == link_flow[i, j] * link_flow[i, j # %% # constrain the vehicles to the capacity of the road: -c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links) +# c_new = model.addConstrs(link_flow[i, j] <= cap_normal[i,j] + ((cap_extend[i,j]-cap_normal[i,j] ) * link_selected[i,j]) for (i, j) in links) # %% [markdown] pycharm={"name": "#%% md\n"} # ## Part 3: Solving the model @@ -418,7 +419,7 @@ capacity = {(i, j): cap_normal[i, j] * (1 - links_selected[i, j]) + cap_extend[i network_visualization_upgraded (G = G, pos=pos, link_flow=link_flows, capacity_new=capacity ,link_select=links_selected, labels='off') # %% [markdown] -# If you wish to see the velues for the entire network you just need to turn on the labels and run the function again. +# If you wish to see the values for the entire network you just need to turn on the labels and run the function again. # %% # To see flow and capacity for the entire network diff --git a/synced_files/Week_2_2/old/PA_2_1_solution_sympy.ipynb b/synced_files/Week_2_2/old/PA_2_1_solution_sympy.ipynb index d62595f5..6ed5c18e 100644 --- a/synced_files/Week_2_2/old/PA_2_1_solution_sympy.ipynb +++ b/synced_files/Week_2_2/old/PA_2_1_solution_sympy.ipynb @@ -404,7 +404,7 @@ }, { "cell_type": "markdown", - "id": "2d17caa6", + "id": "463aeb6b", "metadata": {}, "source": [ "You could also solve this problem using sympy! What would be the benefit of doing this? Check below how long it will take! You won't need timeit for this one..." @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19e5dbc1", + "id": "64714f89", "metadata": {}, "outputs": [], "source": [ @@ -423,7 +423,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71ef0f93", + "id": "1179620e", "metadata": {}, "outputs": [], "source": [ @@ -433,7 +433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1ad5a2ea", + "id": "ebaa8811", "metadata": {}, "outputs": [], "source": [ @@ -445,7 +445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "076e8651", + "id": "f711decf", "metadata": {}, "outputs": [], "source": [ @@ -456,7 +456,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24a08ec0", + "id": "2da1b292", "metadata": {}, "outputs": [], "source": [ @@ -465,7 +465,7 @@ }, { "cell_type": "markdown", - "id": "70a7e741", + "id": "6d323e14", "metadata": {}, "source": [ "What is the result for the 501th value using float values?" @@ -474,7 +474,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f8c31cb", + "id": "ac32792c", "metadata": {}, "outputs": [], "source": [ @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "206167c6", + "id": "0d999c47", "metadata": {}, "source": [] } diff --git a/synced_files/Week_2_2/old/old_PA10_solution_sympy.ipynb b/synced_files/Week_2_2/old/old_PA10_solution_sympy.ipynb index 432bc904..b648134b 100644 --- a/synced_files/Week_2_2/old/old_PA10_solution_sympy.ipynb +++ b/synced_files/Week_2_2/old/old_PA10_solution_sympy.ipynb @@ -404,7 +404,7 @@ }, { "cell_type": "markdown", - "id": "cfacddfb", + "id": "fda773bf", "metadata": {}, "source": [ "You could also solve this problem using sympy! What would be the benefit of doing this? Check below how long it will take! You won't need timeit for this one..." @@ -413,7 +413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d77507ca", + "id": "a4610868", "metadata": {}, "outputs": [], "source": [ @@ -423,7 +423,7 @@ { "cell_type": "code", "execution_count": null, - "id": "830df2fa", + "id": "4d96d48c", "metadata": {}, "outputs": [], "source": [ @@ -433,7 +433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a3aa5b0", + "id": "b01ca331", "metadata": {}, "outputs": [], "source": [ @@ -445,7 +445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbaffbad", + "id": "7618eaa8", "metadata": {}, "outputs": [], "source": [ @@ -456,7 +456,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfcc9078", + "id": "3599546a", "metadata": {}, "outputs": [], "source": [ @@ -465,7 +465,7 @@ }, { "cell_type": "markdown", - "id": "c32e6396", + "id": "7d1b5552", "metadata": {}, "source": [ "What is the result for the 501th value using float values?" @@ -474,7 +474,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1ff38cbe", + "id": "67c95621", "metadata": {}, "outputs": [], "source": [ @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "acaaf4cd", + "id": "60acafbd", "metadata": {}, "source": [] } -- GitLab