Though we plan to bundle all this together in the future, for now, to use PSST, you must install:
Python 2.7 or 3.5+ (preferably the distribution from Continuum Analytics)GitPSST source codeGraphviz and ScipyPython is a free, open source language that can be downloaded from Python.org. Python comes with a package manager called Pip which allows you to download pacages to gain extended functionality.
However, we recomend that you do not use the default distribution of Python, but rather, install the Miniconda (or Anaconda) distribution from Continuum Analytics.
Why? Many of the Python packages used for scientific applications, like Numpy and Scipy, are written in a mixture of pure Python plus other, lower-level languages, like C or Fortran. Anaconda comes with many of these packages already installed. You don't need all of them, which is why we recomend Miniconda instead of Anaconda. Both Anaconda and Miniconda come with an alternative package manager,
conda,which lets you install them with greater ease and reliability than when usingpip.For packages written entirely in Python, you should still usepipto install.
Python 2 or Python 3?
PSST should be fully compatible with Python 2.7, but we recomend Python 3 as it is faster, cleaner, more robust, and, well, the future!
Open a command line console ("command prompt" on Windows or "Terminal" on Mac/ Ubuntu) and type:
which pythonwhere pythonYou should see output like:
/home/username/miniconda3/bin/pythonC:\Miniconda3\python.exeYou should also be able trun python from the command line by simply typing python or python3.
You should see something like this:
If this isn't working, you might still need to add the Miniconda distribution to your system "Path" or place it before an existing installation of Python in your path.
Look at your path from the command line by typing:
echo $PATHecho %PATH%Here are some tips from docs.continuum.io/:
The process is similar if you're on Windows. Try uninstalling and reinstalling, or manually add the Miniconda executable to your path, by going into Computer > Properties > Advanced System Settings > Environment Variables and then adding the path to your miniconda installation (something like c:\.....\anaconda) near the front of your PATH variable.
If you don't already have Git installed on your computer, you should install it. This is version control software, which will make it easier to install and update your version of PSST.
On Windows
You can use this application in place of the default command line console, 'Command Prompt.' It gives you access not only to git commands (like
git cloneandgit bashbut also to most folder navigation commands that macOS/linux users have access to. That is,pwdto see the current directory,cdto change directory,lsto see the files and folders you can access from your current directory, and more.
On macOS/ Linux
Open your command prompt console (Terminal on linux/macOS or Git Bash on Windows)
Navigate to the directory in which you want to store the code. You may wish to create a GitRepos directory in an easy-to-reach directory. For instance:
cd ~
mkdir GitRepos
cd GitRepos
Enter following to clone the project, then install it.
git clone https://github.com/power-system-simulation-toolbox/psst.git
cd psst
pip install -e .
A few packages/libraries don't get installed with the previous command, you will have to add them manaully. These code include:
conda install scipy
conda install jupyter
On Windows
pip install graphviz
On Mac
brew install graphviz --with-gts
pip install graphviz
pip install pygraphviz
On Ubuntu
To install Graphviz with gts:
conda uninstall graphviz. (If you did not install with Conda, you might need to do sudo apt purge graphviz and/or pip uninstall graphviz).sudo apt install libgts-devsudo pkg-config --libs gtssudo pkg-config --cflags gtstar -xvf graphviz-2.40.1.tar.gz (or newer whatever the download is named.)cd into extracted folder (ie cd graphviz-2.40.1) and run sudo ./configure --with-gtssudo make in the foldersudo make install in the folderpip install graphvizNote: It is possible you will get an error pertaining to strings vs. bytes. If so, you can edit a file in the graphviz pacakge by hand.
Finally, you need a linear programming (LP) and mixed integer programming (MIP) solver to solve optimization problems. Any one will due. You can install multiple, and specify which you want to use in the psst code.
There are some install instructions here. These procedures seem to work best:
On Windows
Install the most recent binary of COIN-OR from this list, ie
Add :/c/Program Files (x86)/COIN-OR/1.8.0/win32-msvc12/bin to the computer's path.
On MacOS
brew tap coin-or-tools/coinor
brew install cbc
On Ubuntu
conda install -c conda-forge coincbc
On Ubuntu
sudo apt-get install glpk-doc glpk-utils libglpk-dev
On MacOS
brew install glpk
In [ ]: