Skip to content

Commit

Permalink
Merge pull request #29 from openego/features/release0.1
Browse files Browse the repository at this point in the history
RTD fix
  • Loading branch information
WolfBunke authored Mar 22, 2018
2 parents e30cca8 + 84968f8 commit 970b677
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 41 deletions.
4 changes: 4 additions & 0 deletions ego/tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,7 @@ def series_results(name, column, session, meta_args, result_id, ormclass):
print('Done')
logger.info('Imported eTraGo results of id = %s ', result_id)
return network


if __name__ == '__main__':
pass
8 changes: 4 additions & 4 deletions ego/tools/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
if not 'READTHEDOCS' in os.environ:
from etrago.tools.plot import (plot_line_loading, plot_stacked_gen,
Expand All @@ -30,6 +29,7 @@
from egoio.db_tables.model_draft import EgoGridMvGriddistrict
from egoio.db_tables.grid import EgoDpMvGriddistrict
from tools.results import eGo
import matplotlib.pyplot as plt

import logging
logger = logging.getLogger('ego')
Expand Down Expand Up @@ -314,10 +314,10 @@ def total_power_costs_plot(eTraGo):
"""
import matplotlib.pyplot as plt
#import matplotlib.pyplot as plt
plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt
#import numpy as np
#import matplotlib.pyplot as plt


fig, ax = plt.subplots()
Expand Down
79 changes: 42 additions & 37 deletions ego/tools/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,33 @@
__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)"
__author__ = "wolfbunke"


import io
import pandas as pd
import numpy as np
import os
import logging
logger = logging.getLogger('ego')

if not 'READTHEDOCS' in os.environ:
import pandas as pd
import numpy as np
from etrago.tools.plot import (plot_line_loading, plot_stacked_gen,
curtailment, gen_dist,
storage_distribution,
plot_voltage,plot_residual_load)

class egoBasic():
"""
eGo basics class.
"""
eGo basics class.
Parameters
----------
Parameters
----------
eTraGo : Network
Network container of eTraGo based on PyPSA
eDisGo : Network
Network container of eDisGo based on PyPSA
args : dict
Dict of the scenario_setting.json
"""
eTraGo : Network
Network container of eTraGo based on PyPSA
eDisGo : Network
Network container of eDisGo based on PyPSA
args : dict
Dict of the scenario_setting.json
"""

def __init__(self, eTraGo, *args, **kwargs):

Expand All @@ -60,21 +59,21 @@ def __repr__(self):


class eTraGoResults(egoBasic):
"""eTraGo Results
"""eTraGo Results
This module contains all results of eTraGo for eGo.
This module contains all results of eTraGo for eGo.
Example:
--------
The module can be used by ``etg = eTraGoResults(eTraGo=network)``
Example
--------
The module can be used by etg = eTraGoResults(eTraGo=network)
See Also
--------
`The eTraGo documentation on Extensions
<http://etrago.readthedocs.io/en/latest/api/etrago.html>`_
See Also
--------
`The eTraGo documentation on Extensions
<http://etrago.readthedocs.io/en/latest/api/etrago.html>`_
"""
"""

def __init__(self,eTraGo, *args, **kwargs):
super().__init__(eTraGo, *args, **kwargs)
Expand Down Expand Up @@ -108,15 +107,15 @@ def __init__(self,eTraGo, *args, **kwargs):


class eDisGoResults(egoBasic):
""" eDisGo Results
""" eDisGo Results
This module contains all results of eDisGo for eGo.
This module contains all results of eDisGo for eGo.
ToDo:
add eDisGo
add iteration for multiple ding0 grids
ToDo:
add eDisGo
add iteration for multiple ding0 grids
"""
"""
def __init__(self,eDisGo):
super().__init__(eDisGo)
self.edisgo = pd.DataFrame()
Expand All @@ -125,18 +124,20 @@ def __init__(self,eDisGo):


class eGo(eTraGoResults):
"""Main eGo module which including all results and main functionalities.
"""Main eGo module which including all results and main functionalities.
Parameters
----------
eTraGo : Network
eDisGo : Network
Parameters
----------
eTraGo : Network
eDisGo : Network
ToDo:
ToDo:
add eDisGo
"""
"""
def __init__(self,eTraGo, scn_name):
super().__init__(eTraGo, scn_name)
#super().__init__(eDisGo)
Expand Down Expand Up @@ -466,3 +467,7 @@ def create_etrago_results(network,scn_name):
etrago = etrago.assign(investment_costs=result_invest['carrier_costs'])

return etrago


if __name__ == '__main__':
pass

0 comments on commit 970b677

Please sign in to comment.