Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Load Custom Demand/Gen Profiles .csv #547

Closed
1 task done
apalomES opened this issue Sep 15, 2021 · 4 comments · Fixed by #548
Closed
1 task done

Feature request: Load Custom Demand/Gen Profiles .csv #547

apalomES opened this issue Sep 15, 2021 · 4 comments · Fixed by #548
Assignees
Labels
feature request Request for a new feature. (Only lives in Backlog)

Comments

@apalomES
Copy link

🚀

  • Is your feature request essential for your project?

Describe the workflow you want to enable

I would like the BES model to allow users to define custom demand/gen profiles. In the standalone/plug install, demand, hydro, solar, wind profile csvs are in the plug/scenario_data/raw/usa_tamu/ directory. Editing these profiles directly does not change the scenario profile in the BES model (i.e. Jupyter Notebook). This functionality would strengthen the BES model's utility in industry.

Describe your proposed implementation

Could the Input Class allow users to define an external file path to .csvs with custome profiles.

Describe alternatives you've considered, if relevant

Hacking.

Additional context

The attached demand_vJan2021.csv is an example csv that I would like to be able to load into my BES model. This is a trivial example with the first 3 days of the year zero'd out.

demand_vJan2021_es.csv

@apalomES apalomES added the feature request Request for a new feature. (Only lives in Backlog) label Sep 15, 2021
@danielolsen
Copy link
Contributor

danielolsen commented Sep 15, 2021

Are you hoping to be able to define one-off profiles for a single Scenario, or an alternative profile to be potentially shared across many Scenarios?

Looking into this a bit, it seems like we may we able to add a version.json file in the appropriate location that would allow you to define a local profile which could be assigned to a scenario when it is being created, and would therefore automatically be used to prepare inputs for the simulation engine and for post-simulation analysis:

def get_profile_version_local(grid_model, kind):
@jon-hagg might have a better idea of how this can be done, since he added this code in #419.

@jenhagg
Copy link
Collaborator

jenhagg commented Sep 15, 2021

The code that Daniel linked is the relevant bit - basically we will combine the profile versions found in the version.json from blob storage with the ones found in the version.json (if it exists) located in the container's ~/ScenarioData folder. At the moment, the easiest way to use a custom profile is to add the two files - the version.json specifying your profile's name, and the profile itself, which I believe could be placed outside the container, in the rootdir/raw/usa_tamu folder at the root of the plug repo.

I haven't actually done this in a while, but I know it's worked before and the data should persist in the docker volume so it would be a one time thing. Hopefully we will find some time to simplify this process.

@jenhagg
Copy link
Collaborator

jenhagg commented Sep 16, 2021

@apalomES the attached PR makes it so there is no need to add a local version.json. Rather, you could place any custom profile in the rootdir/raw/usa_tamu folder (relative to the plug repo), and select it when building a scenario. This may require restarting or replacing any running containers.. let me know if there are any issues.

@jenhagg
Copy link
Collaborator

jenhagg commented Sep 16, 2021

One more thing I forgot to mention, but to use this code, the docker-compose.yml should reference the postreise:latest image, rather than :stable. May or may not be applicable depending on when you last pulled the plug repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature. (Only lives in Backlog)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants