The Componentized WEAP and Componentized LEAP are RESTful frameworks written in NodeJS for the Water Evaluation and Planning (WEAP) and the Low Emissions Analysis Platform (LEAP) Systems.
The nexus between the water (Componentized WEAP) and energy (Componentized LEAP) models can be modeled and simulated with the WEAP-KIB-LEAP framework. More information is available here.
Componentized WEAP
and Componentized LEAP
Installation Steps
Computing platforms: Windows 10 OS (see WEAP) and LEAP).
- Download & Install NodeJS (use MSI with default choices)
- Download & Install Python 2.7 (use MSI with default settings), and add python path to the “Environment Variables” of the Windows OS (add to system variables)
- Open command line (cmd) in windows and run:
npm install npm –globalnpm install typescript –globalnpm install node-gyp –global - Open Windows PowerShell (run as administrator) and run the following command.
This step may take time and further require multiple runs.npm install –global –production windows-build-tools - Download & Install Visual C++ from here if there is any error in executing step 4.
IDE Installation
Any IDE can be used for programming, but we recommend VS-Code. In the following, the required extensions and configurations are mentioned to run the Componentized WEAP and Componentized LEAP frameworks.
- Download & Install VS-Code (choose user installer)
- Download & Install Git
- Install TSLint extension in VS-Code (open VS-Code, go to the extension page, type TSLint, and click on install button)
Execution Policy
Note: The execution policy in the Windows Client must be change to RemoteSigned to be able to run scripts. For more information see About Execution Policy and Set Execution Policy. So, open Windows PowerShell (run as administrator), and run:
- Set-ExecutionPolicy RemoteSigned
Running Componentized WEAP and Componentized LEAP in VS Code
To run the Componentized WEAP framework in the VS Code, follow these steps:
- Open VS-Code
- Press CTRL+SHIFT+P (View/Command Palette…) and type “git:clone“
- Enter the Componentized WEAP git URL (https://github.com/comses/ComponentizedWEAP.git) or Componentized LEAP git URL (https://github.com/comses/ComponentizedLEAP)
- Select the folder for the project to be uploaded
- Open VS-Code terminal (right click on the project and select Open in Terminal) and run the following command to update the required packages.
npm install - Press CTRL+SHIFT+P and type
tasks:run build task(to rebuild the JavaScript code) - Run the project (using launch.json)
Licensing and copyright
These are proprietary software. For more information on licensing visit https://www.weap21.org/index.asp?action=217 and https://leap.sei.org/default.asp?action=license.
Copyright: The Componentized WEAP and Componentized LEAP software are developed at ACIMS/ASU with GNU General Public License version 3.0 (GPLv3).