This is the source code of the ETM Pro: an online web app that let you create a future energy scenario for various countries, municipalities, neighbourhoods and more. This software is Open Source, so you can fork it and alter at your will.
If you have any questions, please contact us.
The ETM pro is released under the MIT License.
New users are recommended to use Docker to run ETEngine. Doing so will avoid the need to install additional dependencies.
Get a copy of ETModel. You may choose to clone the repository using Git, or download a ZIP archive from Github.
Build the ETModel image:
docker-compose build
Install dependencies and seed the database:
docker-compose run --rm web bash -c 'bin/rails db:drop && bin/setup'
This command drops any existing ETModel database; be sure only to run this during the initial setup! This step will also provide you with an e-mail address and password for an administrator account.
By default, ETModel will send requests to the beta (staging) version of ETEngine. This is used for testing purposes and is more frequently updated than the live (production) version.
If you wish to run a local copy of ETEngine, ETModel must be told where to find its API. You must first find your machine's local/private IP address; ETModel will use this to send messages directly to ETEngine, and also by your browser when you are using the ETModel application to create scenarios. To get your IP address, run:
ipconfig getifaddr en0 # on macOS
hostname -I # on Linux
ipconfig # on Windows
Create a file called config/settings.local.yml
containing:
api_url: http://YOUR_IP_ADDRESS:3000
When running ETEngine locally, be sure to use the same branch or tag for ETModel, ETEngine, and ETSource. You are likely to encounter errors if you fail to do so.
For example, if you wish to run the latest version all three should be set to the master
branch. If you wish to run the production release from March 2022, they should all use the same tag:
cd ../etengine && git checkout 2022.03
cd ../etsource && git checkout 2022.03
cd ../etmodel && git checkout 2022.03
Launch the containers:
docker-compose up
After starting application will become available at http://localhost:3001 after a few seconds. This is indicated by the message "Listening on http://0.0.0.0:3001".
Mac users should be able to install the following prerequisites with Homebrew, Ubuntu users can use apt-get
.
Pull this repository with git clone git@github.com:quintel/etmodel.git
api_url
in config.yml
. To use a local version, change the standard beta server url to http://localhost:<PORT>
based on which port you are running the Engine on.database.yml
with your own credentials.Run bundle install
and yarn install
to install all the dependencies
Create and fill local database with rake db:setup
and RAILS_ENV=test rake db:setup
Fire up your local server with rails server -p3001
Go to localhost:3001 and you should see the ETM pro!
If you want to get admin access to your own page, the easiest way to do so is to create an Admin User through the console and follow instructions:
rake db:create_admin
If you encounter a bug or if you have a feature request, you can either let us know by creating an Issue or you can try to fix it yourself and create a pull request.
The Energy Transition Model is built by Quintel. It is made possible by open source software, and assets kindly provided for free by many wonderful people and organisations.