GithubHelp home page GithubHelp logo

gridlabd-tutorials / lesson-1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 4.0 19 KB

Use GridLAB-D on GitHub Actions to plot the voltage profile of the IEEE 123 model

License: BSD 3-Clause "New" or "Revised" License

gridlabd ieee123 simulation

lesson-1's Introduction

Simulation

Lesson 1 - Getting Started

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.

  1. How to setup a GitHub project using GitHub Actions to run a GridLAB-D simulation.

  2. How to use caching to avoid repeating steps that are network or compute intensive.

  3. How to run a GridLAB-D simulation.

  4. How to save artifacts from a simulation so they can be downloaded later.

Running GridLAB-D using GitHub Actions

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.

Model Purpose

The purpose of this model is to plot IEEE-123 feeder voltage profile.

Workflow

The gridlabd simulation is started by the workflow file. There are four important parts to this file

  1. The on step determines when the simulation is run. It currently specifies that the simulation will run when a change is made to a file on the main or develop branches, or when a file is changed on a branch that has an open pull request to the main or develop branches.

  2. The cache step checks to see whether the specified file(s) have been downloaded during a previous run and reuses them if possible. In this case, the 123.glm file is cached to avoid downloading more often than necessary.

  3. The run step run the model files itself, the details of which are discussed below.

  4. The save step makes the specified files available for download as artifacts from the Actions tab after the simulation is complete.

Model

The simulation model is defined in the file main.glm. There are three parts to this file.

  1. The #ifmissing macro checks for the existence of the 123.glm model file. If the file is not found, then the next command #model is used to get a copy of the model from the GridLAB-D models repository.

  2. The #include macro loads the 123.glm model that was downloaded (or cached). This is the only model component loaded in this example.

  3. The #output macro is used to generate the voltage profile PNG image. The file generated is used to provide the artifact saved by the save step in the workflow file.

Exercises

  1. Create a new project using the new project template.
  2. Plot the voltage profile of the IEEE 37 node model.

More Information

Next Lesson

lesson-1's People

Contributors

dchassin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.