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

Moved grid_signals from environment to controllers #175

Merged
merged 5 commits into from Feb 7, 2024
Merged

Conversation

kilianp14
Copy link
Contributor

The grid signals from the environment were just passed around a couple of times throughout different classes, but only the controllers actually use them.
Now they are just initialized with them and there is no more unnecessary and complicated passing of these arguments, saving some complexity.

Copy link
Collaborator

@birnbaum birnbaum left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

examples/basic_example.py Outdated Show resolved Hide resolved
vessim/controller.py Outdated Show resolved Hide resolved
ci_signal = HistoricalSignal(load_carbon_data())
solar_signal = HistoricalSignal(load_solar_data(sqm=0.4 * 0.5))

monitor = Monitor(grid_signals={"carbon_intensity": ci_signal}) # stores simulation result on each step
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's not pass any grid_signals to the Monitor in out examples. It yields no benefit to read them from the CSV-based signal just to write them to another CSV. But let's keep the feature, it might be useful in the future if we have live signals

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, but I will leave that in for the controller_example because we actually do something with the carbon data there, and it would be useful to see the intensity reflected in the output file (especially later for visualizing)

@birnbaum birnbaum merged commit 7f68bd8 into main Feb 7, 2024
4 checks passed
@birnbaum birnbaum deleted the grid_signals branch February 19, 2024 20:57
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.

None yet

2 participants