GridLAB-D
A simulation platform for future electricity distribution power systems.
https://github.com/arras-energy/gridlabd
Category: Energy Systems
Sub Category: Grid Analysis and Planning
Keywords
agent-based gridlabd powerflow simulation
Keywords from Contributors
grid-simulation power-simulator power-systems power-systems-analysis smartgrid transactive-energy transforms measur archiving compose
Last synced: about 1 hour ago
JSON representation
Repository metadata
Arras Energy simulator
- Host: GitHub
- URL: https://github.com/arras-energy/gridlabd
- Owner: arras-energy
- License: other
- Created: 2023-09-22T17:41:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-15T15:11:00.000Z (12 days ago)
- Last Synced: 2025-04-17T21:29:19.441Z (10 days ago)
- Topics: agent-based, gridlabd, powerflow, simulation
- Language: C++
- Homepage: https://www.arras.energy/
- Size: 177 MB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 72
- Releases: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
This is the last release of HiPAS GridLAB-D before it is transferred to LF Energy's Arras Energy project.
Repository | Build | Deploy |
---|---|---|
GridLAB-D | ||
Templates | ||
Weather | ||
Library | ||
Models | ||
Benchmarks | Manual test (see README.md) | |
Examples | Manual test (see README.md) |
The documentation for this project is located at http://docs.gridlabd.us/.
This respository contains the source code to HiPAS GridLAB-D, which is being developed by SLAC National Accelerator Laboratory for the California Energy Commission under grant EPC-17-046. This version of GridLAB-D is intended to be a commercial-grade version of the US Department of Energy's research version of GridLAB-D developed by Pacific Northwest National Laboratory.
Note: This fork of GridLAB-D does not support MS Windows directly. You must use docker or a virtual machine running linux.
Quick start using Docker
The preferred method for running HiPAS GridLAB-D is to download the master image from docker hub (see https://hub.docker.com/repository/docker/arras-energy/gridlabd). You must install the docker daemon to use docker images. See https://www.docker.com/get-started for details.
Once you have installed docker, you may issue the following commands to run GridLAB-D at the command line:
docker run -it -v $PWD:/model arras-energy/gridlabd:latest gridlabd -W /model [LOADOPTIONS] [FILENAME.EXT] [RUNOPTIONS]
On many systems, an alias can be used to make this a simple command that resembles the command you would normally issue to run a host-based installation:
alias gridlabd='docker run -it -v $PWD:/tmp arras-energy/gridlabd:latest gridlabd'
Note that this alias will interfere with any host-based installation. You may use the gridlabd docker
command to manage the use of docker images concurrently with host-based installations.
Downloading pre-built images
Installation from downloads may require sudo
priviledges and always requires curl
. The install
script will automatically download and install the latest production image for your system if you use the following command:
curl -sL http://install.gridlabd.us/install.sh | [sudo] sh
You can download the latest development image using the command:
curl -sL http://install-dev.gridlabd.us/install.sh | [sudo] sh
If you must use sudo
, then don't forget to grant user permission to access the build and runtime virtual environments created by the installer, e.g.,
sudo chmod -R g+rwx ~root /usr/local
sudo adduser $USER root
If you want to use a more secure approach to sharing the install among multiple users, see install/README.md.
The installer recognizes the following environment variables:
Variable | Default | Description |
---|---|---|
INSTALL_SOURCE |
http://install.gridlabd.us |
URL from which image is downloaded |
INSTALL_TARGET |
/usr/local/opt |
Folder in which image is installed |
INSTALL_STDERR |
/dev/stderr |
File to which error messages are sent |
INSTALL_STDOUT |
/dev/stdout |
File to which output messages are sent |
GRIDLABD_IMAGE |
varies | Install image name, e.g., $OSNAME_$VERMAJOR-$MACHINE |
This procedure may also be used in AWS EC2 instances and Docker containers.
If you have installed the AWS CLI, you can use the following command to get a list of available images:
aws s3 ls s3://install.gridlabd.us | grep tarz
Note that the installer only works with image name that conform to the name pattern VERSION-BUILD-BRANCH-SYSTEM-MACHINE.tarz
.
Build from source
The prerequesites for building HiPAS GridLAB-D from source include git
and curl
. In general you can use the setup.sh
script to verify and update your system so that the prerequesites are satisifed.
On most systems, the process is as follows:
git clone https://code.gridlabd.us/ [-b BRANCH] gridlabd
cd gridlabd
./setup.sh --local
./build.sh --system --validate
If you want to clone an alternate repository, use the following git
command instead:
git clone https://github.com/ORG/REPO [-b BRANCH] gridlabd
If you do not specify the --local
then by default the setup.sh
source will match the git
repository origin and branch if any. Otherwise the default source will be arras-energy/gridlabd/master
. If you want to setup from a different origin, use the command export GRIDLABD_ORIGIN=ORG/REPO/BRANCH
to specify an alternate source for setup.sh
. The build.sh
will also match the current git
repository.
Do not run the setup.sh
and build.sh
scripts with sudo
, as that will usually create a broken install. If necessary, you should give yourself permission to write /usr/local
and brew
's install folder. If you have not already done so, add brew
to your path.
To upload the image to the AWS installer you must install the AWS CLI, and obtain credentials to access the installer's S3 buckets before using the command:
./build.sh --upload
To make the image the latest release, use the command:
./build.sh --release
When you are working in a master branch, these command will update install.gridlabd.us
, otherwise the upload will go to install-dev.gridlabd.us
.
Docker
Developers should use the following command to build GridLAB-D in a Docker container:
docker/build.sh
Note that Docker will build the currently checked out branch from the repository rather than from your local code.
To push the docker image to your personal Dockerhub, use the command:
docker/build.sh --push
The Dockerhub account is assumed to match the name of your GitHub account.
To release the docker image, use the command:
docker/build.sh --release
AWS EC2
The latest development and master builds of HiPAS gridlabd are available as community AMIs.
Simply launch an ec2, browse the community AMIs and search for HiPAS Gridlabd
If you want to build gridlabd yourself, use the AWS Ubuntu AMI on AWS EC2 using the commands
git clone https://code.gridlabd.us/ [-b BRANCH] gridlabd
cd gridlabd
./setup.sh --local
./build.sh --system --validate
Windows WSL
Generally, running HiPAS GridLAB-D on Docker is preferred because it is usually faster. Building, running and installing Gridlabd in WSL is not that different from a normal linux installation. You can follow Microsoft's instructions on setting up WSL and adding/changing distro's here. These instructions work for both cases on supported operating systems, which you can find in the build-aux directory.
- Open PowerShell as administrator or run the WSL (Ubuntu) from the start menu to open a dedicated terminal
- Run
wsl
(Using Ubuntu) - Follow the Linux build procedure above.
Manual Build
You can build HiPAS GridLAB-D manually by running following commands in the top level repository folder:
- Create the target folder:
mkdir -p /usr/local/opt/gridlabd
- Activate the python build environment
. $HOME/.gridlabd/bin/activate
- Create the configuration script
autoreconf -isf
- Run the configuration script
./configure
- Compile everything
make
- Install everything
make install
- Validate the install
make validate
- Release install to all users
make system
Pro Tips
- If you accumulate a lot of local branches that no longer exist on the remote repo, you can use the following command to purge them:
host% git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
-
You can manage multiple installs using the
gridlabd version
command. Seegridlabd version help
for details -
You can prevent
./configure
using the configure cache by deleting theconfig.cache
folder. -
You can start a clean build using
--clean
option with./build.sh
. Note that this will delete any new files not added withgit add
. -
You can change the install prefix using the
--prefix FOLDER
option with./build.sh
.
Citation
If you use this fork of GridLAB-D for a publication you are required to cite it, e.g.,
Chassin, D.P., et al., "GridLAB-D Version major.minor.patch-build (branch) platform", (year) [online]. Available at url, Accessed on: month day, year.
You may use the --cite
command option to obtain the correct citation for your version:
host% gridlabd --cite
Chassin, D.P., et al. "GridLAB-D 4.2.0-191008 (fix_python_validate) DARWIN", (2019) [online]. Available at https://source.gridlabd.us/commit/dfc392dc0208419ce9be0706f699fdd9a11e3f5b, Accessed on: Oct. 8, 2019.
This will allow anyone to identify the exact version you are using to obtain it from GitHub.
US Government Rights
This version of GridLAB-D is derived from the original US Department of Energy version of GridLAB-D developed at Pacific Northwest National Laboratory. The US Government retains certain rights as described in the original GridLAB-D license.
Contributions
Please see https://source.gridlabd.us/blob/master/CONTRIBUTING.md for information on making contributions to this repository.
Owner metadata
- Name: arras-energy
- Login: arras-energy
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/118282969?v=4
- Repositories: 1
- Last ynced at: 2023-05-12T15:27:50.053Z
- Profile URL: https://github.com/arras-energy
GitHub Events
Total
- Create event: 25
- Release event: 3
- Issues event: 23
- Watch event: 4
- Delete event: 24
- Member event: 1
- Issue comment event: 5
- Push event: 199
- Pull request review comment event: 13
- Pull request review event: 16
- Pull request event: 83
- Fork event: 1
Last Year
- Create event: 25
- Release event: 3
- Issues event: 23
- Watch event: 4
- Delete event: 24
- Member event: 1
- Issue comment event: 5
- Push event: 199
- Pull request review comment event: 13
- Pull request review event: 16
- Pull request event: 83
- Fork event: 1
Committers metadata
Last synced: 5 days ago
Total Commits: 17
Total Committers: 2
Avg Commits per committer: 8.5
Development Distribution Score (DDS): 0.059
Commits in past year: 6
Committers in past year: 1
Avg Commits per committer in past year: 6.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
David P. Chassin | d****n@s****u | 16 |
Alyona Teyber | I****5@g****m | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 141
Total pull requests: 281
Average time to close issues: 5 months
Average time to close pull requests: 24 days
Total issue authors: 15
Total pull request authors: 9
Average comments per issue: 0.35
Average comments per pull request: 0.12
Merged pull request: 210
Bot issues: 0
Bot pull requests: 0
Past year issues: 33
Past year pull requests: 84
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 6 days
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.06
Past year merged pull request: 63
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- dchassin (83)
- aivanova5 (30)
- Thistleman (9)
- MitchellAV (3)
- catzzz (3)
- ftuffner (2)
- jewelnewman (2)
- stephcd (2)
- MateusGheorghe (1)
- Plavit (1)
- AllisonBrand (1)
- yeyanzhu (1)
- johnsonhsiung (1)
- jo-hal (1)
- ebalogun01 (1)
Top Pull Request Authors
- dchassin (209)
- Thistleman (30)
- aivanova5 (22)
- MitchellAV (13)
- AllisonBrand (3)
- xiefuhong (1)
- xwang78su (1)
- catzzz (1)
- ftuffner (1)
Top Issue Labels
- bug (106)
- enhancement (32)
- build (3)
- duplicate (2)
- documentation (2)
- question (1)
Top Pull Request Labels
- enhancement (46)
- bug (41)
- documentation (16)
- build (15)
- validate (4)
- deprecate (2)
- deploy (2)
Dependencies
- actions/checkout v3 composite
- aws-actions/configure-aws-credentials v2 composite
- docker/build-push-action v2 composite
- docker/login-action v1 composite
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- actions/checkout v3 composite
- aws-actions/configure-aws-credentials v2 composite
- aws-actions/configure-aws-credentials v1 composite
- docker/build-push-action v2 composite
- docker/login-action v1 composite
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- ubuntu 22.04 build
- numpy >=1.22.2
- pandas >=1.3.5
- psycopg2-binary *
- CensusData ==1.15
- Fiona ==1.8.22
- PYPOWER ==5.1.16
- Pillow ==9.3.0
- Shapely ==1.8.4
- address ==0.1.1
- boto3 ==1.26.115
- build ==0.9.0
- cfo ==1.0.1
- control ==0.9.2
- docker ==4.4.4
- elevation ==1.1.3
- flask ==3.0.3
- flask-restful-swagger ==0.20.1
- folium ==0.12.1
- geocoder ==1.38.1
- geopandas ==0.12.2
- geopy ==2.1.0
- haversine ==2.3.0
- imageio ==2.31.5
- ipinfo ==4.2.1
- ipykernel ==5.5.5
- ipyplot ==1.1.1
- ipython ==8.10.0
- matplotlib_inline ==0.1.6
- metar ==1.9.0
- networkx ==2.8.8
- numpy ==1.24.4
- openpyxl ==3.1.0
- pandas ==2.2.2
- pandas_access ==0.0.1
- pymysql ==1.0.2
- pyproj ==3.4.0
- pyrlu ==0.2.0
- pysolar ==0.9
- rasterio ==1.3.6
- scipy ==1.13.1
- simplekml ==1.3.6
- timezonefinder ==5.2.0
- xlrd ==2.0.1
Score: 5.099866427824199