Skip to main content

Code for PuV TS-PART

Project description

PUV, TS Part (Exercises 3 & 4)

Setup:

  1. Clone the repository to a suitable location on your computer.
  2. Create your virtual environment (venv) using Python 3.10 with the command: python -m venv venv
  3. Activate your venv with .\venv\Scripts\activate
  4. Install openbus_light using the provided wheel file: pip install openbus_light-X.X.X-py3-none-any.whl (replace X.X.X with the actual version number).
  5. Verify the setup by running the unittests: python -m unittest
  6. Open your preferred IDE and begin working on exercise_3.py and exercise_4.py.

Running the Line Planning Problem Experiments (Exercise 3)

The line planning problem (LPP) experiments are designed to explore the impacts of various parameters on the planning outcomes. exercise_3.py serves as the main script for executing these experiments in parallel.

How to Run Experiments

  1. Ensure both exercise_3.py and solve_exercise_3.py are present in your working directory.

  2. Execute the solve_exercise_3.py script from your terminal to initiate the experiments:
    python solve_exercise_3.py
    This script will automatically run multiple configurations of the LPP in parallel, collect results, and generate insightful plots for analysis.

  3. Experiment summaries and plots will be saved in the results directory. Review these materials to analyze the performance and outcomes of different configurations.

Analyzing Trip and Dwell Times (Exercise 4)

In exercise_4.py, you will analyze the trip and dwell times for bus lines using recorded measurements. This involves calculating and comparing planned versus observed trip times and dwell times for selected bus lines.

How to Run Analysis

  1. Ensure you've completed the setup steps and have access to the necessary data files.
  2. Run exercise_4.py, optionally specifying the bus line numbers for analysis. This script will load bus lines with recorded measurements, calculate trip and dwell times, and prepare the data for further analysis.

Note: The script includes a NotImplementedError as a placeholder for where you will need to process and display the analysis results. This is an intentional aspect of the exercise, designed to encourage you to apply what you've learned from Exercise 3, such as plotting techniques, and extend it with additional insights, like plotting data on maps or between stations.

Adding Result Plotting

Result plotting provides a visual analysis of the experiment outcomes, enhancing understanding through visual means.

  • After executing solve_exercise_3.py, visit the results directory to find the generated HTML files.
  • Open these files in a web browser to view the scatter and bar plots, which visualize the experiments' results. The scatter plot displays the number of vehicles versus the objective (CHF per hour), while the bar plot details the objective by activity, offering a breakdown of cost components.

Student Engagement and Adaptation

Exercise 4 is purposefully left incomplete to challenge you to apply and adapt the learnings from Exercise 3. This includes utilizing plotting capabilities and integrating geographic data visualization to enrich your analysis. You are encouraged to manipulate and extend the provided code to explore creative and insightful ways of representing and analyzing the data.

Conclusion

These exercises are crafted to provide a comprehensive, hands-on experience with public transport optimization, covering everything from setup and execution of line planning problems to in-depth data analysis and visualization. By following the above instructions and engaging actively with the exercises, you will deepen your understanding of transport planning challenges and solutions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbus_light-0.1.0.tar.gz (43.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openbus_light-0.1.0-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file openbus_light-0.1.0.tar.gz.

File metadata

  • Download URL: openbus_light-0.1.0.tar.gz
  • Upload date:
  • Size: 43.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.4

File hashes

Hashes for openbus_light-0.1.0.tar.gz
Algorithm Hash digest
SHA256 464a5e1ef09436537dd015af1afaa51643a70986c7e0f6600701453151665dc7
MD5 a05c754c40da60639886d3ceb8129024
BLAKE2b-256 bb8b64342ee35b2faa3958e4d8160ef7cf0f500fdf2fea39bc0a494a54f133bc

See more details on using hashes here.

File details

Details for the file openbus_light-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openbus_light-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.4

File hashes

Hashes for openbus_light-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1beeebf9ab11510bd2542649458ed81fd96f3c4093961d271e47f8c341734b63
MD5 6ff093e216028247a0fd4fb86a14bb92
BLAKE2b-256 68d12165cbeedc225e0ae84073eb3c7009e71499b83bae76b293bf1644ec4234

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page