-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create execute model and sub modules for market and grid optimization
- Loading branch information
1 parent
5de4712
commit 7165782
Showing
3 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016-2023 Flensburg University of Applied Sciences, | ||
# Europa-Universität Flensburg, | ||
# Centre for Sustainable Energy Systems, | ||
# DLR-Institute for Networked Energy Systems | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation; either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# File description | ||
""" | ||
Defines the market optimization within eTraGo | ||
""" | ||
import os | ||
|
||
if "READTHEDOCS" not in os.environ: | ||
import logging | ||
import time | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
__copyright__ = ( | ||
"Flensburg University of Applied Sciences, " | ||
"Europa-Universität Flensburg, " | ||
"Centre for Sustainable Energy Systems, " | ||
"DLR-Institute for Networked Energy Systems" | ||
) | ||
__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" | ||
__author__ = ( | ||
"ulfmueller, ClaraBuettner, CarlosEpia" | ||
) | ||
|
||
|
||
def grid_optimization(self): | ||
|
||
add_redispatch_generators(self) | ||
|
||
self.network.lopf( | ||
solver_name=self.args["solver"], | ||
solver_options=self.args["solver_options"], | ||
pyomo=True, | ||
extra_functionality=extra_functionality(), | ||
formulation=self.args["model_formulation"], | ||
|
||
) | ||
|
||
|
||
def add_redispatch_generators(self): | ||
"""Add ramp up and ramp down generators | ||
Returns | ||
------- | ||
None. | ||
""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016-2023 Flensburg University of Applied Sciences, | ||
# Europa-Universität Flensburg, | ||
# Centre for Sustainable Energy Systems, | ||
# DLR-Institute for Networked Energy Systems | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation; either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# File description | ||
""" | ||
Defines the market optimization within eTraGo | ||
""" | ||
import os | ||
|
||
if "READTHEDOCS" not in os.environ: | ||
import logging | ||
import time | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
__copyright__ = ( | ||
"Flensburg University of Applied Sciences, " | ||
"Europa-Universität Flensburg, " | ||
"Centre for Sustainable Energy Systems, " | ||
"DLR-Institute for Networked Energy Systems" | ||
) | ||
__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" | ||
__author__ = ( | ||
"ulfmueller, ClaraBuettner, CarlosEpia" | ||
) | ||
|
||
|
||
def market_optimization(self): | ||
|
||
build_market_model() | ||
|
||
self.market_model.lopf( | ||
solver_name=self.args["solver"], | ||
solver_options=self.args["solver_options"], | ||
pyomo=True, | ||
extra_functionality=extra_functionality(), | ||
formulation=self.args["model_formulation"], | ||
|
||
) | ||
|
||
|
||
def build_market_model(): | ||
"""Builds market model based on imported network from eTraGo | ||
- import market regions from file or database | ||
- Cluster network to market regions | ||
-- consider marginal cost incl. generator noise when grouoping electrical | ||
generation capacities | ||
Returns | ||
------- | ||
None. | ||
""" | ||
# Not useful, just for demonstration | ||
self.market_model = self.network.copy() | ||
|
||
|
||
|
||
def extra_functionality(): | ||
"""Placeholder for extra functionalities within market optimization | ||
Returns | ||
------- | ||
None. | ||
""" | ||
|
||
return None |