Breakthrough-Energy / PreREISE

Generate input data for scenario framework
https://breakthrough-energy.github.io/docs/
MIT License
21 stars 28 forks source link

Fix call to function #356

Closed rouille closed 1 year ago

rouille commented 1 year ago

Pull Request doc

Purpose

What is the larger goal of this change?

What the code is doing

Pass a single argument, the path to the folder containing the network data, to the get_bus_pos function. Some code responsible for reading files was refactored.

Testing

An error was thrown when generating the documentation locally with sphinx. With the change, it is fixed.

Where to look

The get_bus_pos located in the prereise.gather.flexibilitydata.doe.bus_data module takes one argument, the path to a folder containing the sub.csv and bus2sub.csv file. The bus_example script located in prereise.gather.flexibilitydata.doe.examples.bus_example module call the function with two arguments, the path to a folder and a filename.

@BainanXia and @lanesmith, do you know why the get_bus_pos reads network data instead of using a Grid object? A Grid object could be the argument of the get_bus_pos function.

Usage Example/Visuals

N/A

Time estimate

5min

BainanXia commented 1 year ago

If I recall correctly, it took a specific version of the network and some corner cases were resolved manually at the early stage. Later we automated the process which should no longer a problem.

rouille commented 1 year ago

If I recall correctly, it took a specific version of the network and some corner cases were resolved manually at the early stage. Later we automated the process which should no longer a problem.

I will refactor the function in a follow up PR then.