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

[BUG] - Model errors when a storage asset is investable==false but storage_method_energy==true #650

Closed
gnawin opened this issue Jun 11, 2024 · 0 comments · Fixed by #651
Closed
Assignees
Labels
Type: bug Something doesn't work correctly Zone: documentation Improvements or additions to documentation Zone: optimisation model Improvements or changes to the optimisation model (e.g., objective function, variables, constraints)

Comments

@gnawin
Copy link
Member

gnawin commented Jun 11, 2024

Description

Model errors when a storage asset is investable==false but storage_method_energy==true.

This setup triggers an error in this part of the objective function,

$$\begin{aligned} \sum_{a \in \mathcal{A}^{\text{se}} } p^{\text{inv cost energy}}_{a} \cdot p^{\text{energy}}_{a} \cdot v^{\text{inv energy}}_{a} \end{aligned}$$

because $v^{\text{inv energy}}_{a}$ is only defined for $a \in Ase \cap Ai$, so it errors when $a \in Ase, a \notin Ai$

A minor issue is that the documentation needs to be changed accordingly:

  • objective function

Reproduction steps

1. Change input data 'test/inputs/Norse'
2. For `Asgard_Battery`: set `investable==false` and `storage_method_energy==true`.
3. [Specific error message]

ERROR: KeyError: key :Asgard_Battery not found


### Logs

_No response_

### OS

_No response_
@gnawin gnawin added Type: bug Something doesn't work correctly Zone: documentation Improvements or additions to documentation Zone: optimisation model Improvements or changes to the optimisation model (e.g., objective function, variables, constraints) labels Jun 11, 2024
@gnawin gnawin self-assigned this Jun 11, 2024
@gnawin gnawin mentioned this issue Jun 11, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something doesn't work correctly Zone: documentation Improvements or additions to documentation Zone: optimisation model Improvements or changes to the optimisation model (e.g., objective function, variables, constraints)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant