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

Shortcut simulator #113

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Shortcut simulator #113

merged 2 commits into from
Aug 26, 2021

Conversation

bknueven
Copy link
Collaborator

Closes #108 -- creates a "shortcut simulator" which just uses generator data and day-ahead/real-time LMPs. Fixes a few bugs with non-hourly SCEDs.

Copy link
Collaborator

@darrylmelander darrylmelander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with some optional spots to tweak

prescient/data/providers/shortcut_data_provider.py Outdated Show resolved Hide resolved
'zone': {'virtual_zone':{}},
}
bus_id_to_names = defaultdict(lambda: 'virtual_bus')
parser._read_generators(data_directory, elements, bus_id_to_names)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little dangerous to use a private method, but I can live with it. Maybe you can get the guy who wrote that function to document it though...

prescient/engine/egret/egret_plugin.py Outdated Show resolved Hide resolved
yield InferrableForecastable(how_to_infer, gdata['p_min']['values'])
if isinstance(gdata['p_max'], dict):
yield InferrableForecastable(how_to_infer, gdata['p_max']['values'])
if 'p_cost' in gdata and isinstance(gdata['p_cost'], dict):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just marking this as a spot to talk about tomorrow.

# If the next plan won't be activated until after the simulation has finished,
# don't bother generating the plan. Push the next planning time out past the end.
# We need this check here in case a single day is simulated
if next_planning_time + timedelta(hours=self._ruc_delay) >= stop_time:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to adjust the logic below instead of duplicating the logic here

@bknueven
Copy link
Collaborator Author

Now that I've gone down the route of include the virtual generators in the stack, we should probably also add an output file called virtual_detail.csv.

* Add support for virtual generators in simulation, statistics, and output
* New input format for shortcut simulations
* Utility to convert prices in Prescient output to shortcut input
* New shortcut simulation test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create "shortcut" simulator
2 participants