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

Track power balance using expressions #117

Merged
merged 16 commits into from
Feb 16, 2023
Merged

Conversation

Betristor
Copy link
Collaborator

In power sector, power balance plays the most important role in establishing the model and its composition will be more and more complicated if we keep adding more terms, which will definitely cause problem when writing power balance in results.

  1. Add transmission term
  2. Add demand term - inputs demand minus non served demand + additional demand from other sectors
  3. Add additional demand
  4. Write these terms in writing balance function

P.S. Hydrogen sector is not handled so additional demand is not processed. By the way expression eH2NetpowerConsumptionByAll could be used as part of additional demand but term additional demand could be extended if more sectors are to be added.

@Betristor Betristor added enhancement New feature or request DOLPHYN structure How DOLPYHN manages sector coupling and model formulation DOLPHYN UX DOLPHYN User Experience labels Jan 8, 2023
@Betristor Betristor requested a review from RuaridhMacd January 8, 2023 06:31
@Betristor Betristor self-assigned this Jan 8, 2023
@dharik13
Copy link
Collaborator

Revise the PR to populate eAdditionalDemandbyZone expression with power consumption by H2 supply chain.

@Betristor
Copy link
Collaborator Author

@RuaridhMacd eAdditionalDemandbyZone contains power demand from other sectors like hydrogen and carbon. With eH2NetpowerConsumptionByAll expression, the additional demand from power could be accessed easily. But as for the index sequence, I think we should have a consistent way to arrange how to index the data, especially with basic dimension of spatial and temporal. I'd like to use zone and time indexed as z,t. This way is more readable.
Similar expressions in hydrogen sector is also added.

@RuaridhMacd
Copy link
Collaborator

RuaridhMacd commented Feb 2, 2023

  • For now leave at [t,z] to stay consistent with the rest of the codebase
  • @RuaridhMacd Make a proposal for consistent outputs

@Betristor
Copy link
Collaborator Author

@RuaridhMacd There exist some codes with index sequence of zone and time (z,t) in genx we used in main branch such as eGenerationByZone, eGenerationByVRE, eGenerationByHydroRes and expressions in transmission like eNet_Export_Flows and eLosses_By_Zone. I will leave these code aside and focus on the code I added.

@RuaridhMacd
Copy link
Collaborator

@Betristor This looks good. I think it's fine to leave the other existing (z,t) cases for now, to avoid causing issues.

Are you ready for me to review and merge this?

@Betristor
Copy link
Collaborator Author

@RuaridhMacd These expressions won't affect any codes in establishing the model but just track some numbers we want to know. As a start, I hope with the model scope expanding, these expressions could help record any detailed while small terms as a whole and save the trouble in writing output part.

I added a term in write_h2_balance.jl named transmission. Now it's ready to go.

@RuaridhMacd
Copy link
Collaborator

RuaridhMacd commented Feb 13, 2023

Copy link
Collaborator

@RuaridhMacd RuaridhMacd left a comment

Choose a reason for hiding this comment

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

The changes worked for me on the three example systems and the additional expressions were written correctly.

@Betristor , merge this if you're happy to proceed.

@Betristor Betristor merged commit 24482e8 into main Feb 16, 2023
@Betristor
Copy link
Collaborator Author

@RuaridhMacd I merged the PR.

@Betristor Betristor deleted the track_power_expressions branch February 16, 2023 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOLPHYN structure How DOLPYHN manages sector coupling and model formulation DOLPHYN UX DOLPHYN User Experience enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants