This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update solver_py.cpp * Update solver_py.cpp * Added numpy array creation support * Implement MLE solver bus mapping * Fix busdata mapping errors * Change output to dataframe for improved readability * Update test_IEEE_13_MLE.glm * Update setup-Linux-amzn-2.sh * Create setup-Linux-ubuntu-20.sh * Update setup-Linux-ubuntu-20.sh * Update setup-Linux-ubuntu-20.sh * Update setup-Darwin-20.sh * Update setup-Linux-ubuntu-20.sh * Update version.sh * Update setup-Linux-amzn-2.sh * Update setup-Linux-ubuntu-20.sh * Update solver_py.cpp * Update test_IEEE_13_MLE.glm Co-authored-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
- Loading branch information
Showing
9 changed files
with
1,025 additions
and
47 deletions.
There are no files selected for viewing
Empty file.
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,83 @@ | ||
#!/bin/bash | ||
|
||
# Install needed system tools | ||
# update first | ||
apt-get -q update | ||
apt-get -q install tzdata -y | ||
|
||
# install system build tools needed by gridlabd | ||
apt-get -q install git -y | ||
apt-get -q install unzip -y | ||
apt-get -q install autoconf -y | ||
apt-get -q install libtool -y | ||
apt-get -q install g++ -y | ||
apt-get -q install cmake -y | ||
apt-get -q install flex -y | ||
apt-get -q install bison -y | ||
apt-get -q install libcurl4-gnutls-dev -y | ||
apt-get -q install libncurses5-dev -y | ||
apt-get -q install liblzma-dev -y | ||
apt-get -q install libssl-dev -y | ||
apt-get -q install libbz2-dev -y | ||
apt-get -q install libffi-dev -y | ||
apt-get -q install zlib1g-dev -y | ||
|
||
# install python 3.9 | ||
if [ ! -x /usr/local/bin/python3 -o $(/usr/local/bin/python3 --version | cut -f-2 -d.) != "Python 3.9" ]; then | ||
cd /usr/local/src | ||
curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz | ||
cd Python-3.9.6 | ||
./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC" | ||
make -j $(nproc) | ||
make altinstall | ||
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3 | ||
ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config | ||
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc | ||
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle | ||
curl -sSL https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3 | ||
fi | ||
|
||
# install python libraries by validation | ||
/usr/local/bin/python3 pip -m install --upgrade pip | ||
/usr/local/bin/python3 pip -m install mysql-connector mysql-client matplotlib numpy pandas Pillow | ||
|
||
# doxggen | ||
apt-get -q install gawk -y | ||
if [ ! -x /usr/bin/doxygen ]; then | ||
if [ ! -d /usr/local/src/doxygen ]; then | ||
git clone https://github.com/doxygen/doxygen.git /usr/local/src/doxygen | ||
fi | ||
if [ ! -d /usr/local/src/doxygen/build ]; then | ||
mkdir /usr/local/src/doxygen/build | ||
fi | ||
cd /usr/local/src/doxygen/build | ||
cmake -G "Unix Makefiles" .. | ||
make | ||
make install | ||
fi | ||
|
||
# mono | ||
apt-get -q install curl -y | ||
if [ ! -f /usr/bin/mono ]; then | ||
cd /tmp | ||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | ||
echo "deb http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0 main" | tee /etc/apt/sources.list.d/mono-official.list | ||
apt-get -q update -y | ||
apt-get -q install mono-devel -y | ||
fi | ||
|
||
# natural_docs | ||
if [ ! -x /usr/local/bin/natural_docs ]; then | ||
cd /usr/local | ||
curl https://www.naturaldocs.org/download/natural_docs/2.0.2/Natural_Docs_2.0.2.zip > natural_docs.zip | ||
unzip -qq natural_docs | ||
rm -f natural_docs.zip | ||
mv Natural\ Docs natural_docs | ||
echo '#!/bin/bash | ||
mono /usr/local/natural_docs/NaturalDocs.exe \$*' > /usr/local/bin/natural_docs | ||
chmod a+x /usr/local/bin/natural_docs | ||
fi | ||
|
||
# converter support | ||
/usr/local/bin/python3 pip -m install networkx | ||
apt-get -q install mdbtools -y |
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,23 @@ | ||
# comments are helpful | ||
solver enable | ||
|
||
logfile ./solver_mle.log | ||
loglevel 9 | ||
|
||
import_path .. | ||
|
||
import solver_py | ||
|
||
busdata name,type,phases,volt_base,mva_base,VAr,VAi,VBr,VBi,VCr,VCi,SAr,SAi,SBr,SBi,SCr,SCi,YAr,YAi,YBr,YBi,YCr,YCi,IAr,IAi,IBr,IBi,ICr,ICi | ||
branchdata phases,from,to,lnk_type,v_ratio,YfromAr,YfromAi,YfromBr,YfromBi,YfromCr,YfromCi,YtoAr,YtoAi,YtoBr,YtoBi,YtoCr,YtoCi,YSfromAr,YSfromAi,YSfromBr,YSfromBi,YSfromCr,YSfromCi,YStoAr,YStoAi,YStoBr,YStoBi,YStoCr,YStoCi | ||
|
||
#learndata powerflow_values | ||
#learndata powerflow_values.deltaI_NR,powerflow_values.BA_diag,powerflow_values.Y_offdiag_PQ,powerflow_values.Y_diag_fixed,powerflow_values.Y_diag_update,powerflow_values.Y_Amatrix | ||
learndata powerflow_values.deltaI_NR,powerflow_values.Y_offdiag_PQ,powerflow_values.Y_diag_fixed,powerflow_values.Y_diag_update | ||
|
||
profiler solver_py.csv | ||
|
||
option dump=dataframe | ||
|
||
mle_data_only true | ||
|
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
Oops, something went wrong.