GLM: Simple Gridlab-D GLM parser and utilities.

[ language, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

Simple Gridlab-D GLM parser and utilities.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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 repo head: git clone git@github.com:sordina/GLM
Uploaded by LyndonMaydwell at 2015-10-09T03:03:05Z
Distributions NixOS:0.7.0.0
Executables glm2json, glm2dot, glm2props
Downloads 2486 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-09 [all 1 reports]

Readme for GLM-0.7.0.0

[back to package description]

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