Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Release beauharnois-20 #883

Merged
merged 12 commits into from
May 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,6 @@ gridlabd-core.*
documents/gridlabd.md
documents/gridlabd.pdf
openfido.err
test_*.html
gldcore/converters/autotest/IEEE-123.html
gldcore/converters/autotest/solver_nr_profile.csv
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ The following projects are actively contributing to HiPAS GridLAB-D at this time

# User quick start

The preferred method for running HiPAS GridLAB-D is to download the SLAC master image from docker hub (see https://cloud.docker.com/u/gridlabd/repository/docker/gridlabd/slac-master). You must install the docker daemon to use docker images. See https://www.docker.com/get-started for details.
The preferred method for running HiPAS GridLAB-D is to download the SLAC master image from docker hub (see https://hub.docker.com/repository/docker/slacgismo/gridlabd). You must install the docker daemon to use docker images. See https://www.docker.com/get-started for details.

Once you have installed docker, you may issue the following commands to run GridLAB-D at the command line:
~~~
host% docker run -it -v $PWD:/model gridlabd/slac-master gridlabd -W /model [load-options] [filename.glm] [run-options]
host% docker run -it -v $PWD:/model slacgismo/gridlabd:latest gridlabd -W /model [load-options] [filename.glm] [run-options]
~~~
On many systems, an alias can be used to make this a simple command that resemble the command you would normally issue to run a host-based installation:
On many systems, an alias can be used to make this a simple command that resembles the command you would normally issue to run a host-based installation:
~~~
host% alias gridlabd='docker run -it -v $PWD:/model gridlabd/slac-master gridlabd -W /model'
host% alias gridlabd='docker run -it -v $PWD:/tmp slacgismo/gridlabd:latest gridlabd'
~~~
Note that this alias will interfere with the host-based installation.
Note that this alias will interfere with any host-based installation. You should use the `gridlabd docker` command to manage the use of docker images concurrently with host-based installations.

# Developer quick start

Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ dnl m4 magic from Eric Blake <e...@byu.net>
dnl autoconf 2.63 does not have m4_esyscmd_s
m4_define([m4_chomp_all],
[m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
/], [/ ]), [/*$]), [$1])])
/], [/ ]), [/*$]), [$1])])

m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))])
m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))])


m4_define([sbuild_m4_chomp],
Expand Down Expand Up @@ -491,11 +491,11 @@ AS_IF([test -n "$DX_DOXYGEN"],
AM_CONDITIONAL([HAVE_DOXYGEN], [test ! "x$HAVE_DOXYGEN" = "xno"])

# Check for mysql
AS_IF([test -f /usr/local/include/mysql.h -a /usr/local/lib/libmysqlclient.a ],
AS_IF([test -f /usr/local/include/mysql/mysql.h -a /usr/local/lib/libmysqlclient.a ],
[MYSQL="/usr/local"],
[MYSQL="no"])
AS_IF([test "x$MYSQL" != "xno"],
[MYSQL_CPPFLAGS="'-I$MYSQL/include'"
[MYSQL_CPPFLAGS="'-I$MYSQL/include/mysql'"
AS_CASE([$host],
[*mingw*], [MYSQL_LDFLAGS="'-L$MYSQL/lib'"
MYSQL_LIBS="-lmysql"],
Expand Down Expand Up @@ -579,7 +579,7 @@ AC_MSG_RESULT([

HiPAS GridLAB-D Automatic configuration:

Package: .................... $PACKAGE
Package: .................... $PACKAGE
Version: .................... $VERSION
Branch: ..................... $PACKAGE_ORIGIN
Install prefix: ............. ${DSTDIR/^$PWD/.}
Expand Down
62 changes: 62 additions & 0 deletions docs/Converters/Output/Html_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[[/Converters/Output/Html_files]] -- HTML document converter

# Synopsis

~~~
#output "filename.html" [options]
~~~

# Description

The HTML output converter generates an interactive `folium` map in HTML.

## Options

### `-c|--cluster`

Disables marker clustering.

### `-g|--glyphs`

Selects the icon family from which glyphs are selected. Valid values are `fa` and `glyphicon`.

### `-s|--show`

Immediately open the HTML file in the default browser.

### `-t|--tiles TILES`

Specifies which background tiles are to be used. Valid values are `street`, `terrain`, `lineart`,

### `-z|--zoomlevel LEVEL`

Specify the initial zoomlevel. The default is `auto`.

# Example

The following example converts the single node to an interactive map and opens it in the default browser.

~~~
class node
{
string address;
}
object node
{
address "2575 Sand Hill Rd., Menlo Park CA";
latitude "37.4205";
longitude "-122.2047";
}
#output "test_json2html.html" --show
~~~

The following example compiles the IEEE-123 model into an interactive map and opens it in the default browser:

~~~
$ gridlabd -W gldcore/converters/autotest -I IEEE-123.glm -o /tmp/IEEE-123.html -D html_save_options="--show --cluster"
~~~

# See also

* [[/Subcommand/Geodata]]

10 changes: 4 additions & 6 deletions docs/Module/Powerflow/Global/Solver_ml_config.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
[[/Module/Powerflow/Global/Solver_ml_config]] -- Powerflow module ML solver configuration
[[/Module/Powerflow/Global/solver_ml_config]] -- Powerflow module ML solver configuration

# Synopsis

~~~
module powerflow
{
solver_ml_config "<pathname>";
solver_ml_config "pathname";
}
~~~

# Description

The `solver_ml_config` module global is used to specify the `<pathname>` to a non-standard ML solver configuration to use instead of the system default installed in `/usr/local/share/gridlabd/solver_ml.conf`.
The `solver_ml_config` module global is used to specify a non-standard ML solver configuration to use instead of the system default installed in `/usr/local/share/gridlabd/solver_ml.conf`.

# See also

* [[/Module/Powerflow/Solver_ml.conf]]
* [[/Module/Powerflow/Solver_configuration]]
97 changes: 28 additions & 69 deletions docs/Module/Powerflow/Solver configuration.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,67 @@
[[/Module/Powerflow/Solver_ml.conf]] -- Machine learning powerflow solver configuration
[[/Module/Powerflow/solver_ml.conf]] -- Machine learning powerflow solver configuration

# Synopsis

/usr/local/share/gridlabd/solver_ml.conf:

~~~
maximum_metric <real>
method [none|basic]
busdump <filename>
branchdump <filename>
on_dump <event-handler>
logfile <filename>
loglevel <integer>
import_path <path>
import python:<module>
on_dump [python:]<command>
maximum_metric <real>
method [none|basic]
busdump <filename>
branchdump <filename>
on_dump <event-handler>
logfile <filename>
loglevel <integer>
import_path <path>
import python:<module>
on_dump [python:]<command>
~~~

# Description

The main Newton-Raphson (NR) powerflow solver can be matched with a secondary machine learning (ML) solver that models and mimics how the NR solver functions. When the ML solver sees a problem that is "close" to problems it has learned, it proposes a solution to that problem and skips running the NR solver. The [[/solver_ml.conf]] configuration controls how the machine learning solver behaves.
The main Newton-Raphson (NR) powerflow solver can be matched with a secondary machine learning (ML) solver that models and mimics how the NR solver functions. When the ML solver sees a problem that is "close" to problems it has learned, it proposes a solution to that problem and skips running the NR solver. The [[solver_ml.conf]] configuration controls how the machine learning solver behaves.

The most basic method saves each observed solution for future use. Any new problem is compared to previous problems using a distance metric, and the solution to the closest problem is used if the distance metric is less than the `maximum_metric`. If no solution is found, the new solution is saved for future use.

## maximum_metric

~~~
maximum_metric <real>
~~~

The `maximum_metric` parameter control how "close" the new problem must be to one of the existing known solutions before it requests a new solution.

## method
## maximum_metric *real*

~~~
method [none|basic]
~~~
The `maximum_metric` parameter control how "close" the new problem must be from one of the existing known solution before it proposes a solution.

The `method` parameter controls which machine learning method is applied. The current valid values are `none` to disable the machine learning solver, and `basic` to enable the simple solution copying method.
## method [none|basic]

## busdump
The `method` parameter control which machine learning method is applied. The current valid values are `none` to disable the ML solver, and `basic` to enable the simple solution copying method.

~~~
busdump <filename>
~~~
## busdump *filename*

The `busdump` parameter sets the bus dump filename when `on_dump` is enabled.

## branchdump

~~~
branchdump <filename>
~~~
## branchdump *filename*

The `branchdump` parameter sets the branch dump filename when `on_dump` is enabled.

## on_dump

~~~
on_dump <event-handler>
~~~

The `on_dump` parameter enables external calls when a problem is presented to the formal solver. The bus and branch dumps are performed before the `on_dump` command is executed.
## on_dump *event-handler*

## logfile
The `on_dump` parameter enables external calls when a problem is presented to the NR solver. The bus and branch dumps are performed before the `on_dump` command is executed.

~~~
logfile <filename>
~~~
## logfile *filename*

The `logfile` parameter sets the name of the file that contains the ML solver log. By default this is `/usr/local/var/gridlabd/solver_ml.log`.

## loglevel

~~~
loglevel <integer>
~~~
## loglevel *integer*

The `loglevel` parameter sets the level of log message recorded in the log. This value can range from 0 to 9, with 0 being the least logging and 9 the most logging.

## import_path

~~~
import_path <path>
~~~
## import_path *path*

Add `path` to the module import search path.

## import

~~~
import <module>
~~~

Loads `module`. If loading a Python module, use the syntax `import python:filename`.
## import *module*

## on_dump
Load `module`. If loading a Python module, use the syntax `import python:filename`.

~~~
on_dump <command>
~~~
## on_dump *command*

Call the method `command` when a bus/branch dump is performed. If the command is defined in a Python module, use the syntax `on_dump python:command`.

# See also

* [[/Module/Powerflow]]
* [[/Module/Powerflow/Global/solver_ml_config]]
64 changes: 0 additions & 64 deletions docs/Solver_ml.conf.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/Solver_ml_config.md

This file was deleted.

10 changes: 8 additions & 2 deletions docs/Subcommand/Convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
# Synopsis

~~~
bash$ gridlabd convert [-v|--verbose] [-f|--from TYPE1] FILE1 [-t|--to TYPE2] FILE2 [OPTIONS]
bash$ gridlabd convert [[-i|--input] INPUTFILE] [[-o|--output] OUTPUTFILE] [-v|--verbose] [-f|--from INPUTTYPE] [-t|--to OUTPUTTYPE] [OPTIONS]
~~~

# Description

The `convert` subcommand performs the file conversions used by the automatic input and output file converters in GridLAB-D.
The `convert` subcommand performs the file conversions used by the automatic input and output file converters in GridLAB-D.

If `INPUTFILE` is not specified, then `/dev/stdin` is used. If `OUTPUTFILE` is not specified, then `/dev/stdout` is used.

If `INPUTTYPE` is not specified, then `INPUTFILE` must be specified and the `INPUTTYPE` is the extension of `INPUTFILE`. The same applies to `OUTPUTTYPE`. If `/dev/stdin` or `/dev/stdout` are used then the respective file type must be specified.

All other arguments are passed through to the converter as follows using the `NAME[=VALUE]` syntax. If `NAME` is provided without a value, then the value `None` is provided to the converter.

# See also

Expand Down
4 changes: 4 additions & 0 deletions gldcore/autotest/check_dotted_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import sys
with open('out.csv') as f:
if '2021-02-01 11:50:00 PST,+500' not in f.read():
raise TypeError("Modify did not execute")
Loading