CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 6
Installing and running WHAT IF
last updated: 27 February 2021 by Raphael (rapp@env.dtu.dk)
A little guide to install and run WHAT-IF step by step.
- Go on https://github.com/RaphaelPB/WHAT-IF
- Click the up right ”Clone or download” icon and then “Download ZIP”
- Unzip the downloaded folder where you want it to be
- It should look something like that inside (may vary according to version, see Code structure)
- Download Anaconda from https://www.anaconda.com/distribution/ it is a great way of managing python packages and versions
- Click on Windows, macOS or Linux according to your system and choose Python 3.7 version
- On windows, run the exe file downloaded (if it did not start on its own), choose all the default options of the installer (or customize if wanted), it takes 3.1 GB and approximately 10 min.
- You can open Anaconda
This option is in theory less reliable as if some packages were updated they might not work anymore with WHAT-IF, in practice this might just be the easiest solution !
- Look for anaconda prompt (command line version of anaconda)
- Run
conda config --add channels conda-forge
conda create -n WHATIF_py38 python=3.8.8
conda install -n WHATIF_py38 openpyxl xlsxwriter pyomo=6.1.2 pandas=1.3.3 numpy multiprocess
conda install -n WHATIF_py38 glpk ipopt=3.11.1
You might also be able to use more updated versions of these libraries If you use windows, specify ipopt=3.11.1, as in later versions no executable is created which is required by windows. For linux, it is recommended to install the latest ipopt version.
This option is in theory more reliable as you unpack an environment that has been proving to work for WHAT-IF In practice option 1 should be preferred !
- Look for anaconda prompt (command line version of anaconda)
- Run the command:
conda env create --name WHATIF_py38 –f PATH\WHATIF_py38.yml
in the example PATH = N:\WHAT-IF-master it might take 5-10 min to install all necessary libraries - This step is not unlikely to FAIL, e.g. :
Please contact us for alternatives (rapp@env.dtu.dk)
- If it worked, you should be able to see the environment from the anaconda navigator ("WHATIF_py38" if you used the previous command)
- You can activate the environment either by clicking on it in the anaconda navigator or running in the anaconda prompt:
conda activate WHATIF_py38
TIP: You need to install the environment once, but you might need to activate it each time.
Almost there, last steps:
-
Launch Spyder from anaconda or windows
from windows: make sure you select spyder with the good environment from anaconda navigator: make sure you activated the good environment (see previous point) -
Open WHATIF_main from the WHATIF folder you downloaded
-
Press the green play button and RUN
-
The results of the run will appear in a “Result” folder, you can modify the data in the “Data” folder and run your own case.
-
Now you might want to look at Configure options, Creating, running and comparing scenarios