To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit 247e553a authored by Xuqian Yan's avatar Xuqian Yan
Browse files

Added contents for visualization

parent 36edbfa0
......@@ -12,4 +12,5 @@ An integrated energy systems modelling platform | ` <http://nexus-e.o
\ No newline at end of file
### **Results visualization**
The simulation results from Nexus-e can be interactively viewed through a visualization tool (also called the "**webviewer**"), developed with [Python Dash](
- Repository for the tool: <>
- A frontend example: <>
This documentation only introduces the general workflow of developing the visualization tool. Detailed instructions can be found in the `` files in the associated repositories.
The visualization of the simulation results is achieved in the workflow shown in the figure. The key processes will be explained in the sub-sections below.
#### Postprocess
After a simulation finishes, selected results are **postprocessed** and uploaded to the output database. This postprocess procedure is carried out in the following two ways. The two ways are designed for different purposes and both are needed.
1. **Embedded** in the `run_Nexuse.m` script
- **Purpose**: Automatically process the results when finishing a simulation, so that the reseacher could promtly see the results of this simulation from the webviewer.
- **How it work**: After the simulation finishes, `run_Nexuse.m` calls the MATLAB script `Shared/resultPostProcess/postProcess.m`. This scripts calls other MATLAB/Python scripts to postprocess the results.
2. **Stand-alone**
- **Purpose**: Batch-process multiple simulations, fine-tune/modify/test the post-process scripts. This stand-alone process provides the final data to the webviewer.
- **How it works**: Run the `postProcess` bash script locally. This bash script loops over multiple simulations and takes configurations (e.g., which simulations to loop through and scenario names for each simulation) from the `Shared/resultPostProcess/postProcess.conf` file.
#### Output database
In the output database (host: itet-psl-s02, port: 3307), each simulation's results is stored in one **schema** named with the simulation **submission date** and the **scenario name** (e.g., the `scenShortName` variable in `run_Nexuse.m`), which looks like "01-dec-2020_baseline".
The output database can be viewed with MySQL Workbench in the same way as introduced [here](setup.html#connect-with-the-input-database).
#### Retrieve & visualize data with a URL
After the postprocessed data has been uploaded to the output database, the data can be retrieved and visualized by **provideing a URL through the webviewer**. Three types of URL are accepted.
1.**JOB-SUBMISSION-DATE_SCENARIO_NAME**, e.g., This will retrieve and visualize only the data from the **exact** MySQL schema named as "JOB-SUBMISSION-DATE_SCENARIO_NAME".
2.**JOB-SUBMISSION-DATE**, e.g. This will retrieve and visualize the data from **all** the MySQL schemas whose name start with "JOB-SUBMISSION-DATE". In other words, results from all simulations submitted on the same day will be shown on the website.
3.**MANUALLY_DEFINED_URL**, e.g. This will retrieve and visualize the results from **all** simulations associated with the MANUALLY_DEFINED_URL. This is particularly useful if we run multiple scenarios for one project. The mapping of URL and simulations is specified in the `` in the [repository for the webviewer](
#### Embed the webviewer into the homepage
The webviewer itself is plainly a Python Dash application without much Nexus-e branding. To change this, it is embedded into the homepage with [iframe]( - a html element to display a nested webpage within another webpage. By doing so, we can easily have the same header, footer and menubar for the visualization tool as in other Nexus-e webpages.
The embedding can only be done by the administrators of the homepage. If you are an administrator, you could [login]( to the homepage and check the backend of [this page]( to learn how it is done.
\ No newline at end of file
This documentation is shown on <>.
How to compile the whole documentation locally:
- install python 3.x
- create a virtual environment for better python package management. Here are example codes using conda:
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