MyNixOS website logo
Description

Simple Gridlab-D GLM parser and utilities.

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

Metadata

Version

0.7.0.0

License

Executables (3)

  • bin/glm2json
  • bin/glm2props
  • bin/glm2dot

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows