Skip to content

Commit

Permalink
Merge branch 'readthedocs' of https://github.com/pypsa/pypsa into rea…
Browse files Browse the repository at this point in the history
…dthedocs
  • Loading branch information
fneum committed Jun 3, 2019
2 parents ae7cf61 + 27758cb commit 5f94e27
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 103 deletions.
Binary file added doc/img/ac_dc_meshed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/elec_s_256_lv1.09_Co2L-3H.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/img/euro-pie-pre-7-branch_limit-1-256.png
Binary file not shown.
Binary file removed doc/img/legend-flat.png
Binary file not shown.
Binary file removed doc/img/line-loading.png
Binary file not shown.
Binary file removed doc/img/lmp.png
Binary file not shown.
Binary file added doc/img/lmp_and_line-loading.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/load-distribution.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/img/meshed-ac-dc.png
Binary file not shown.
Binary file modified doc/img/reactive-power.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/scigrid-curtailment.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/stacked-gen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/stacked-gen_and_storage-scigrid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/storage-scigrid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 22 additions & 17 deletions doc/introduction.rst
Expand Up @@ -59,36 +59,41 @@ What PyPSA does and does not do (yet)
Screenshots
===========

Results from a PyPSA simulation can be converted into an interactive
online animation using `PyPSA-animation
<https://github.com/PyPSA/PyPSA-animation>`_, see the `PyPSA-Eur-30
example <https://www.pypsa.org/animations/pypsa-eur-30/>`_.

Another showcase for PyPSA is the `SciGRID example
<https://pypsa.org/examples/scigrid-lopf-then-pf-plotly.html>`_ which
demonstrates interactive plots generated with the `plotly
<https://plot.ly/python/>`_ library.
* `PyPSA-Eur <https://github.com/PyPSA/pypsa-eur>`_ optimising capacities of generation, storage and transmission lines (9% line volume expansion allowed) for a 95% reduction in CO2 emissions in Europe compared to 1990 levels

.. image:: img/elec_s_256_lv1.09_Co2L-3H.png
:align: center
:width: 700px


* `SciGRID model <https://power.scigrid.de/>`_ simulating the German power system for 2015. Interactive plots also be generated with the `plotly <https://plot.ly/python/>`_ library, as shown in this `Notebook <https://pypsa.org/examples/scigrid-lopf-then-pf-plotly.html>`_

.. image:: img/line-loading.png
.. image:: img/stacked-gen_and_storage-scigrid.png
:align: center

.. image:: img/lmp_and_line-loading.png
:align: right

.. image:: img/lmp.png

.. image:: img/reactive-power.png
:align: center
:width: 600px

.. image:: img/stacked-gen.png

.. image:: img/storage-scigrid.png
* Small meshed AC-DC toy model

.. image:: img/scigrid-curtailment.png
.. image:: img/ac_dc_meshed.png
:align: center
:width: 400px

.. image:: img/meshed-ac-dc.png
All results from a PyPSA simulation can be converted into an interactive
online animation using `PyPSA-animation
<https://github.com/PyPSA/PyPSA-animation>`_, for an example see the `PyPSA-Eur-30
example <https://www.pypsa.org/animations/pypsa-eur-30/>`_.


Optimised capacities of generation and storage for a 95% reduction in CO2 emissions in Europe compare to 1990 levels:

.. image:: img/euro-pie-pre-7-branch_limit-1-256.png
.. image:: img/legend-flat.png


What PyPSA uses under the hood
Expand Down
26 changes: 19 additions & 7 deletions examples/ac-dc-meshed/ac-dc-lopf.py
Expand Up @@ -4,22 +4,33 @@
from __future__ import print_function, division
from __future__ import absolute_import


import pypsa,os

import pandas as pd

import pypsa, os
import numpy as np

from itertools import chain
import cartopy.crs as ccrs
import matplotlib.pyplot as plt

network = pypsa.Network()

folder_name = "ac-dc-data"
network.import_from_csv_folder(folder_name)


network.lopf(network.snapshots)

fig, ax = plt.subplots(subplot_kw={'projection': ccrs.EqualEarth()},
figsize=(5,5))
line_colors = network.lines.bus0.map(network.buses.carrier)\
.replace({'AC': 'indianred', 'DC': 'limegreen'})
network.plot(bus_colors='grey', ax=ax,
margin=.5, line_widths={'Line':2., 'Link':0},
line_colors=line_colors,
geomap='10m', title='Mixed AC-DC (red - green) network',
# flow='mean',
color_geomap=True)
fig.canvas.draw(); fig.tight_layout()
fig.savefig('ac_dc_meshed.png')


for sn in network.sub_networks.obj:
print(sn,network.sub_networks.at[sn.name,"carrier"],len(sn.buses()),len(sn.branches()))

Expand Down Expand Up @@ -70,3 +81,4 @@

if True:
network.export_to_csv_folder(results_folder_name)

0 comments on commit 5f94e27

Please sign in to comment.