The goal of this lesson is familiarize you with how to setup and run GridLAB-D projects on GitHub. The specific learning objectives for this lesson are the following.
-
How to setup a GitHub project using GitHub Actions to run a GridLAB-D simulation.
-
How to use caching to avoid repeating steps that are network or compute intensive.
-
How to run a GridLAB-D simulation.
-
How to save artifacts from a simulation so they can be downloaded later.
You will learn how to use a GridLAB-D subcommand to download a reference model, use the GridLAB-D powerflow solver to compute the voltage solution for the IEEE-123 model, and use the GridLAB-D output converters to generate a voltage profile PNG image that can be downloaded later for viewing.
To view the output, select Actions to show the most recent simulation runs. Select the most recent run completed, download, and view the PNG image artifact named IEEE 123 Voltage Profile.
The purpose of this model is to plot IEEE-123 feeder voltage profile.
The gridlabd simulation is started by the workflow file. There are four important parts to this file
-
The
onstep determines when the simulation is run. It currently specifies that the simulation will run when a change is made to a file on themainordevelopbranches, or when a file is changed on a branch that has an open pull request to themainordevelopbranches. -
The
cachestep checks to see whether the specified file(s) have been downloaded during a previous run and reuses them if possible. In this case, the123.glmfile is cached to avoid downloading more often than necessary. -
The
runstep run the model files itself, the details of which are discussed below. -
The
savestep makes the specified files available for download as artifacts from the Actions tab after the simulation is complete.
The simulation model is defined in the file main.glm. There are three parts to this file.
-
The
#ifmissingmacro checks for the existence of the123.glmmodel file. If the file is not found, then the next command#modelis used to get a copy of the model from the GridLAB-D models repository. -
The
#includemacro loads the123.glmmodel that was downloaded (or cached). This is the only model component loaded in this example. -
The
#outputmacro is used to generate the voltage profile PNG image. The file generated is used to provide the artifact saved by thesavestep in the workflow file.
- Create a new project using the new project template.
- Plot the voltage profile of the IEEE 37 node model.