Commit cefe1590 authored by Xuqian Yan's avatar Xuqian Yan
Browse files

Completed "Local setup" section

parent 1888dc6b
......@@ -5,7 +5,7 @@ An integrated energy systems modelling platform | `nexus-e.org <http://nexus-e.o
========================================================================================
.. toctree::
:maxdepth: 2
:maxdepth: 4
setup.md
euler_instruction.md
......
......@@ -5,6 +5,7 @@
- [Get the codes](#get-the-codes)
- [Connect with the input database](#connect-with-the-input-database)
- [Prepare software & license](#prepare-software-license)
- [Run Nexus-e](#run-nexus-e)
- [Euler setup](#euler-setup)
#### Get permissions
......@@ -49,7 +50,7 @@ The instructions here use **command lines**. If you have a GUI tool for git, you
You will be asked for your username and password for the repository and its submodules. Input your ETH username and password.
In the end, the folder will look like the following screenshot. Note: You might not see the hidden files whose names start with a dot. The `UserDBInfo.txt` file will be added in the sction [Connect with the input database](#connect-with-the-input-database).
In the end, the folder will look like the screenshot below. Note: You might not see the hidden files whose names start with a dot; the `UserDBInfo.txt` file will be added in the sction [Connect with the input database](#connect-with-the-input-database); the `Results` folder will be automatically generated when you run Nexus-e.
![](images/nexus-e-folder.png)
......@@ -79,20 +80,19 @@ An example can be found in `Shared/connectionInfoPSL.txt`.
- Click the button `Test Connection`. You will be asked to input your database password. Then you will see a seccess message:
![](images/mysql-workbench-3.png)
```eval_rst
|:warning:| By default, everyone has write permission to the database.
|:warning:| By default, everyone has write permission to the database. Therefore, to be safe, always make a local copy of the database before playing with it - i.e., first “Dump” it to a local folder, then import it to your personal MySQL account. These can be done in this window:
```
Therefore, to be safe, always make a local copy of the database before playing with it - i.e., first “Dump” it to a local folder, then import it to your personal MySQL account. These can be done in this window:
![](images/mysql-workbench-4.png)
##### 3. Prepare software & license
- Matlab (2018a or higher)
- **Matlab** (2018a or higher)
- Set up database connector
- Download the **MySQL connector** from [here](https://dev.mysql.com/downloads/connector/j/).
Or, if you have access to the Nexus-e polybox, use the `mysql-connector-java-8.0.18.zip` provided in the folder `02_Model/02_02_Model_Setup_Instruction`(**Unzip** the file before the next step).
Or, if you have access to the Nexus-e polybox, use the `mysql-connector-java-8.0.18.zip` provided in the folder `02_Model/02_Model_Setup_Instruction`(**Unzip** the file before the next step).
- Copy the MySQL connector folder (e.g. mysql-connector-java-8.0.18) into a folder at your preference.
We recommend to put it into the **Matlab preferences folder**, which you can find by typing in Matlab Command Window ```prefdir```.
......@@ -110,18 +110,42 @@ An example can be found in `Shared/connectionInfoPSL.txt`.
isopen(conn)
```
- **Python** (3.x)
```eval_rst
|:warning:| Note: we are now in the phase of transferring from python 2.x to python 3.x. Therefore, it is recommended to use python 3.x locally and identify potential issues for the transfer.
-
```
- Python packages: install the required packages listed in `requirements.txt`.
- Gurobi (9.x): get a free Gurobi academic license <https://www.gurobi.com/academia/academic-program-and-licenses>
- Python path: If you use Mac or if you want to run Nexus-e in a python virtual environment, you need to configure Python path in Matlab. Otherwise, you could skip this step.
- Make a copy of `user_path_example_conf.m` in the folder `Run_Nexuse`. Name the copy as `user_path_conf.m`. (Note: You should only work with the local copy, because the original `xxx_example_conf.m` will be synchronized to git and it shouldn't be changed.)
- Find out your python path (it varies largely depending on your PC's operating system and how you installed python). Uncomment and adapt the variable `PATH_PYTHON` in `user_path_conf.m` accordingly.
- If you have a python virtual environment, you could configure it following the instructions in `user_path_conf.m`.
- **GAMS**
- Download from [here](https://www.gams.com/download/)
- Set GAMS License
- Use the `gamslice.txt` provided in polybox `02_Model/02_Model_Setup_Instruction`.
- Install the license: [here](https://support.gams.com/installation:how_do_i_install_a_license_file) or [here](https://www.youtube.com/watch?v=vSe3YGkUVoc) or (for MacOS) [here](https://www.gams.com/latest/docs/UG_MAC_INSTALL.html).
- GAMS path
- If you haven't done so, make a copy of `user_path_example_conf.m` in the folder `Run_Nexuse`. Name the copy as `user_path_conf.m`. (Note: You should only work with the local copy, because the original `xxx_example_conf.m` will be synchronized to git and it shouldn't be changed.)
- Find out your GAMS path (it varies largely depending on your PC's operating system and the version of GAMS). Uncomment and adapt the variable `PATH_GAMS` in `user_path_conf.m` accordingly.
##### 4. Run Nexus-e
- Connect to ETH VPN (in order to connect with the database)
- Open Matlab
- Run the script `run_Nexuse.m` in the `Run_Nexuse` folder
- You could change the variables `scen`, `tpRes`, and `limDifference` as instructed in the script
- Consult Blazhe Gjorgiev (gblazhe@ethz.ch) if you want to run other scripts in the `Run_Nexuse` folder.
#### Euler setup
1. Join the usergroup
1. Get the codes
1. Prepare software & license
1. Connect with the input database
1. Run Nexus-e
##### 1. Join the usergroup
##### 2. Get the codes
##### 3. Prepare software & license
##### 4. Connect with the input database
##### 5. Run Nexus-e
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment