The GLM package

[Tags:library, mit, program, test]

Simple Gridlab-D GLM parser and utilities.


[Skip to Readme]

Properties

Versions 0.3.0.0, 0.5.0.0, 0.7.0.0
Dependencies aeson, base (<=5), bytestring, GLM, interpolate, lens, mtl, parsec, pureMD5, QuickCheck, test-framework, test-framework-quickcheck2, test-framework-th, transformers [details]
License MIT
Author Lyndon Maydwell
Maintainer maydwell@gmail.com
Category Language
Home page http://github.com/sordina/GLM
Source repository head: git clone git@github.com:sordina/GLM
Uploaded Fri Oct 9 03:03:05 UTC 2015 by LyndonMaydwell
Distributions NixOS:0.7.0.0
Downloads 282 total (5 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2015-10-09 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for GLM

Readme for GLM-0.7.0.0

GLM

A small GridLab-D markup parser.

Currently incomplete, but does work for simple files.

Includes the executables:

  • glm2props - List properties found in file
  • glm2dot - Output a Dot file for use with GraphViz
  • glm2json - Convert GLM format to JSON format

Library functions are also exposesd under:

  • GLM.Dot
  • GLM.Nesting
  • GLM.Parser2
  • GLM.Tokenizer
  • GLM.JSON

Library

The main library interface can be found in GLM.Parser.

glm2dot

Usage:

    Usage: glm2dot [-h|--help] [-e|--edges] [-f|--flatten] [FILE]*

    --flatten    creates new linked nodes for nested nodes
    --edge       only renders nodes that are connected to others

Also accepts GLM format on STDIN.

glm2json

glmprops

Links

Hackage: https://hackage.haskell.org/package/GLM

Downloads:

Example:

    bash-3.2$ head IEEE_4_node.glm
    // Exercise 4.1.1

    clock {
        timestamp '2000-01-01 0:00:00';
        timezone EST+5EDT;
    }

    module powerflow {
        solver_method NR;
    }

    bash-3.2$ glm2dot IEEE_4_node.glm

    digraph {
        // Missed entry ["clock"] - noname
        // Missed entry ["module","powerflow"] - powerflow
        "460bc4159" [label="overhead_line_conductor100"];
        "f98a57e6e" [label="overhead_line_conductor101"];
        "3ae695a1a" [label="line_spacing200"];
        "125c9f13f" [label="line_configuration300"];
        "6666bc20c" [label="transformer_configuration400"];
        "164546f60" [label="node1"];
        "89b8519c3" [label="overhead_line"];
        "164546f60" -> "78882aaeb"; // node1 -> node2
        "78882aaeb" [label="node2"];
        "72f1da2f1" [label="transformer23"];
        "78882aaeb" -> "1315e07dc"; // node2 -> node3
        "1315e07dc" [label="node3"];
        "ff93d9775" [label="overhead_line:34"];
        "1315e07dc" -> "6bf7ab42e"; // node3 -> load4
        "6bf7ab42e" [label="load4"];
    }

Graphical output:

    glm2dot -e IEEE_37node.glm | dot -Tpng -o blah.png && open blah.png

Rendered GLM