1. Introduction
The purpose of this Developer’s Manual is to provide an understanding of the internal design of MATPOWER for users who wish to help with the development of MATPOWER or for those who would like to customize, modify or add to the functionality of MATPOWER in any way.
The MATPOWER User’s Manual, on the other hand, is your starting point if you simply want to use MATPOWER without modification or customization.
For reference documentation on each class and function in MATPOWER, see the MATPOWER Reference Manual.
1.1. Development Environment
MATPOWER is implemented in the Matlab language, designed for scientific computing. It requires either MATLAB®, a commercial product from The MathWorks, or the free, open-source GNU Octave to run.
MATPOWER and its related software packages are developed as open-source projects on GitHub under the MATPOWER Development GitHub organization. Some projects are included in others using git subrepo.
Table 1.1 provides an overview of the various repositories and their relationships to each other. Note that the main matpower repository contains all of the others as subrepos, except for matpower-extras, which is, however, included when you download the ZIP file for a numbered MATPOWER release.
Repository |
Description |
---|---|
Main MATPOWER repository. Depends on mptest , mips, and mp-opt-model, which are included as subrepos, along with most, and mp-docs-shared. |
|
Functions for implementing unit testing in MATLAB or Octave, with generalized mechanism for testing for optional functionality and corresponding versions, i.e. |
|
MATPOWER Interior Point Solver (MIPS), a nonlinear primal-dual interior point solver used as the default solver for AC OPF problems. Also includes a wrapper function for several linear equation solvers. Depends on mptest. |
|
MP-Opt-Model, an easy-to-use, object-oriented interface for building and solving mathematical programming and optimization problems. Also includes a unified interface for calling numerous LP, QP, mixed-integer and nonlinear solvers, with the ability to switch solvers simply by changing an input option. Depends on mptest and mips. |
|
MATPOWER Optimal Scheduling Tool (MOST), a framework for solving generalized steady-state electric power scheduling problems. Depends on mptest, mp-opt-model and matpower. |
|
MATPOWER Extras, a collection of contributed and/or unsupported MATPOWER-related functions and packages. Note that some of the extras have their own separate repositories and are actually included here as subrepos. Depends on mptest and matpower. |
|
Defines common resources used for the Sphinx documentation and included as a subrepo in |
In general, each repository has two permanent branches, master
and release
, where release
points to the latest stable release and master
contains any unreleased but hopefully stable updates. Each numbered release also has an associated git tag.
1.2. Conventions
Because MATPOWER is intended to run unmodified on either MATLAB or GNU Octave, it is important to stick to syntax and functionality that are supported by both.
We use classdef
syntax supported by both to define classes and, in methods, we use obj
as the variable name representing the object. Most of the classes are defined in the mp
package/namespace.
All classes, methods, properties, and functions include a help section that can be accessed by the help
and doc
commands and processed by Sphinx to produce HTML and PDF reference documentation. For a class, it summarizes the purpose and overall functionality provided by the class along with lists of the properties and methods. For a function or method, it describes the inputs, outputs and what the function or method does. The run_mp()
function and the mp.task
class provide examples of this reference documentation. Hint: Click the GitHub icon in the upper right corner of the reference manual page to see the source.
All functionality should be covered by at least one of the automated tests.
See the MATPOWER Contributors Guide for more information on contributing to the MATPOWER project.