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

Allow combining snapshot_clustering and skip_snapshots #691

Open
ClaraBuettner opened this issue Oct 30, 2023 · 0 comments
Open

Allow combining snapshot_clustering and skip_snapshots #691

ClaraBuettner opened this issue Oct 30, 2023 · 0 comments
Assignees

Comments

@ClaraBuettner
Copy link
Contributor

It is currently not possible to use snapshot_clustering and skip_snapshots in combination.
At least two things need to be changed.
First, the snapshot_weigthing is currently overwritten in skipp_snapshots, so the weighting of the previous snapshot_clustering is overwritten:

self.network.snapshot_weightings["objective"] = n_skip
self.network.snapshot_weightings["stores"] = n_skip
self.network.snapshot_weightings["generators"] = n_skip

In addition, the constraints for the soc need to be updated. The soc_intra-rule for example wants to refer to the previous timestep using a fixed offset of one hour which results in errors when that one is skipped. It might be also needed to consider the number of skipped snapshots in these constraints:

else:
expr = m.state_of_charge_intra[s, h] == m.state_of_charge_intra[
s, h - pd.DateOffset(hours=1)
] * (1 - network.storage_units.at[s, "standing_loss"]) - (
m.storage_p_dispatch[s, h - pd.DateOffset(hours=1)]
/ network.storage_units.at[s, "efficiency_dispatch"]
- network.storage_units.at[s, "efficiency_store"]
* m.storage_p_store[s, h - pd.DateOffset(hours=1)]
)
return expr

For the next release, I will not fix it but implement a check that makes sure that those methods are not combined.

@ClaraBuettner ClaraBuettner self-assigned this Jan 16, 2024
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

No branches or pull requests

1 participant