<jupyter_start><jupyter_text>Watoto Village Case study using PyEPLANThis is an example of using PyEPLAN to design a Microgrid on Watoto Village in Uganda.It is designed to be ran on Google Colab.<jupyter_code>!rm -r sample_data
!rm -r wat_inv
!apt-get install -qq subversion
!svn export https://github.com/apetros/pyeplan/trunk/examples/wat_inv
!apt-get install -y -qq glpk-utils
!apt-get install -y -qq coinor-cbc
!pip install gurobipy
!pip install -q pyeplan
!pip install git+git://github.com/apetros/pyeplan@master
import pyeplan as pe<jupyter_output><empty_output><jupyter_text>Designing the feeder network<jupyter_code>rousys = pe.rousys('wat_inv')
rousys.min_spn_tre()<jupyter_output>/usr/local/lib/python3.7/dist-packages/mplleaflet/mplexporter/exporter.py:263: MatplotlibDeprecationWarning: 
The get_offset_position function was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
  offset_order = offset_dict[collection.get_offset_position()]<jupyter_text>Obtaining the PV generation profiles<jupyter_code>datsys = pe.datsys('wat_inv', lat=0.251148605450955, lon=32.404833929733, year=2016)
datsys.data_extract()<jupyter_output><empty_output><jupyter_text>Obtaining representative days<jupyter_code>datsys.kmeans_clust()<jupyter_output>/usr/local/lib/python3.7/dist-packages/sklearn/utils/validation.py:1677: FutureWarning: Feature names only support names that are all strings. Got feature names with dtypes: ['time']. An error will be raised in 1.2.
  FutureWarning,
/usr/local/lib/python3.7/dist-packages/sklearn/utils/validation.py:1677: FutureWarning: Feature names only support names that are all strings. Got feature names with dtypes: ['time']. An error will be raised in 1.2.
  FutureWarning,
/usr/local/lib/python3.7/dist-packages/sklearn/utils/validation.py:1677: FutureWarning: Feature names only support names that are all strings. Got feature names with dtypes: ['time']. An error will be raised in 1.2.
  FutureWarning,<jupyter_text>Optimising investment and operational costs<jupyter_code>inosys = pe.inosys('wat_inv', ref_bus = 260)
inosys.solve(solver = 'cbc', onlyopr = False)<jupyter_output>Welcome to the CBC MILP Solver 
Version: 2.9.9 
Build Date: Aug 21 2017 

command line - /usr/bin/cbc -printingOptions all -import /tmp/tmprll78dx5.pyomo.lp -stat=1 -solve -solu /tmp/tmprll78dx5.pyomo.soln (default strategy 1)
Option for printingOptions changed from normal to all
Presolve 9797 (-50197) rows, 12786 (-26317) columns and 46606 (-119867) elements
Statistics for presolved model


Problem has 9797 rows, 12786 columns (5102 with objective) and 46606 elements
There are 2425 singletons with objective 
Column breakdown:
828 of type 0.0->inf, 1104 of type 0.0->up, 120 of type lo->inf, 
6197 of type lo->up, 576 of type free, 0 of type fixed, 
0 of type -inf->0.0, 48 of type -inf->up, 3913 of type 0.0->1.0 
Row breakdown:
2427 of type E 0.0, 0 of type E 1.0, 0 of type E -1.0, 
3985 of type E other, 288 of type G 0.0, 0 of type G 1.0, 
0 of type G other, 2257 of type L 0.0, 0 of type L 1.0, 
0 of type L other, 0 of type Range 0.0->1.0, 840 of type Range other, 
0 of type Free 
Preso[...]<jupyter_text>Results  Total Investment and Operational Costs<jupyter_code>import pandas as pd
inosys.resCost()<jupyter_output><empty_output><jupyter_text>Number and capacity of battery units installed<jupyter_code>inosys.resBat()<jupyter_output><empty_output><jupyter_text>Number and capacity of solar units installed<jupyter_code>inosys.resSolar()<jupyter_output><empty_output><jupyter_text>Number and capacity of diesel units installed<jupyter_code>inosys.resConv()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09791552386176632, 'fraction_numerical': 0.05924300603400987, 'mean_word_length': 5.432098765432099, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 42, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '157780', 'license': 'Apache-2.0', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1260, 'n_words': 384, 'path': 'examples/Watoto_Village_Case_Study.ipynb', 'repo_name': 'SPS-L/Watoto-Village-Microgrid-data', 'size': '3646'}