MinhHaDuong / VinaPyPSA

Open Vietnam power system analysis from an electrical engineering point of view
GNU General Public License v3.0
1 stars 0 forks source link

Reproduce a published run #2

Open MinhHaDuong opened 4 years ago

MinhHaDuong commented 4 years ago

Dinh Thanh Viet, Duong Minh Quang, Vo Van Phuong, Ma Phuoc Khanh, Chau Minh Thang, Detlev Heinemann, Bruno U. Schyska, Stefan Schramm, and Alexander Kies. 2018. “A Cost-Optimal Pathway to Integrate Renewable Energy into the Future Vietnamese Power System.” In German-Vietnamese Research Cooperation on Wind Power Initiative Final Workshop, 2018-11-16. Danang, Vietnam.

MinhHaDuong commented 4 years ago

Installing dependencies from the distro as much as possible sudo apt install python3-nose python3-ply python3-scipy python3-appdirs python3-networkx python3-cartopy glpk-utils

Installing PyPSA, the version used in our dataset

haduong@doudou:~$ pip3.7 install pypsa==0.13.2 --user
Successfully installed PyUtilib-5.7.1 pyomo-5.6.6 pypsa-0.14.1

Checking the path:

haduong@doudou:~$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print('\n'.join(sys.path))

/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/home/haduong/.local/lib/python3.7/site-packages
/usr/local/lib/python3.7/dist-packages
/usr/lib/python3/dist-packages
>>> quit()

Checking the installation:

haduong@doudou:~$ ls ~/.local/lib/python3.7/site-packages/
pyomo  Pyomo-5.6.6.dist-info  pypsa  pypsa-0.14.1.egg-info  pyutilib  PyUtilib-5.7.1.dist-info  PyUtilib-5.7.1-py3.6-nspkg.pth
MinhHaDuong commented 4 years ago

This may not be necessary if installing cartopy from the distro: PyPSA bug "cartopy dependency issues with pip #78" sudo apt-get install libgeos++ proj-bin libproj-dev

Other workarounds: conda install pypsa wait for future release

MinhHaDuong commented 4 years ago

Example 1 run. Just filed pull request to align the code of shown at: https://pypsa.readthedocs.io/en/latest/quick_start.html on the code shown at https://www.pypsa.org/examples/minimal_example_pf.html

MinhHaDuong commented 4 years ago

It works when snapshots.csv is limited to the first 24 hours. It fails to generate the model when we leave it to 2 * 8760 lines.