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

Commit

Permalink
Merge pull request #968 from slacgismo/develop
Browse files Browse the repository at this point in the history
Release beauharnois-26
  • Loading branch information
aivanova5 authored Aug 26, 2021
2 parents e373b2c + f933985 commit e7309b2
Show file tree
Hide file tree
Showing 99 changed files with 3,065 additions and 1,073 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,4 @@ gldcore/converters/autotest/table2glm_input_noname.glm
gldcore/converters/autotest/table2glm_input.glm
gldcore/geodata/docs/geodata.conf
gldcore/gridlabd.in
geodata.conf
21 changes: 21 additions & 0 deletions docs/Command/Library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[/Command/Library]] -- Load a GridLAB-D library

# Synopsis

~~~
bash$ gridlabd -l|--library FILENAME
~~~

# Description

Loads a GridLAB-D library from the library folder.

# Example

~~~
bash$ gridlabd -l wood_pole.glm
~~~

# See also

* [[/Subcommand/Library]]
5 changes: 2 additions & 3 deletions docs/Command/Pstatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# Synopsis

~~~
bash$ gridlabd --pstatus
bash$ gridlabd --pstatus[=json]
~~~

# Description

Prints the process list.

Prints the process list. If `=json` is included the output is formatted as a JSON file. Otherwise the output is in tabular form.
10 changes: 8 additions & 2 deletions docs/Converters/Import/Table_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Any arbitrary objects can be listed in a CSV file and convertered to GLM-formatt

class | name | tilt_angle | tilt_direction | weather | configuration | equipment_area | equipment_height | install_year | repair_time | latitude | longitude | phases | nominal_voltage | tmyfile
--- | --- | --- | --- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |---
pole | pole1 | 5 deg | 270 | weather | WOOD-C-45/5 | | | 1990 | 1 h | 37.4275 | 122.1697 | ABC | 12470
pole | pole2 | 8 deg | 270 | weather | WOOD-C-45/5 | | | 2000 | 8 h | 37.127 | 122.1646 | ABC | 12470
powerflow.pole | pole1 | 5 deg | 270 | weather | WOOD-C-45/5 | | | 1990 | 1 h | 37.4275 | 122.1697 | ABC | 12470
powerflow.pole | pole2 | 8 deg | 270 | weather | WOOD-C-45/5 | | | 2000 | 8 h | 37.127 | 122.1646 | ABC | 12470
climate | weather | | | | | | | | | | | | | CA-Chino_Airport.tmy3

Sample usage within GLM
Expand All @@ -30,6 +30,12 @@ The object names can be omitted and the function will autopopulate the object in

This will generate an "input_file.glm" and automatically include the objects within the model.

Note, for the module definition to be included in the converter output, the class definition has to contain the module name before the class as
~~~
powerflow.pole
~~~


# See also

* [[/Converters/Import/Csv_files]]
27 changes: 27 additions & 0 deletions docs/Global/Country.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[/Global/Country]] -- Country code to use when location support files

# Synopsis

GLM:

~~~
#set country=US
~~~

Shell:

~~~
bash$ gridlabd -D country=US
bash$ gridlabd --define country=US
~~~

# Description

The country code is used to location support files such a libraries and templates files.

# See also

* [[/Command/Library]]
* [[/Global/Organization]]
* [[/Global/Region]]
* [[/Command/Template]]
27 changes: 27 additions & 0 deletions docs/Global/Organization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[/Global/Organization]] -- Organization code to use when location support files

# Synopsis

GLM:

~~~
#set organization=US
~~~

Shell:

~~~
bash$ gridlabd -D organization=US
bash$ gridlabd --define organization=US
~~~

# Description

The organization code is used to location support files such a libraries and templates files.

# See also

* [[/Global/Country]]
* [[/Command/Library]]
* [[/Global/Region]]
* [[/Command/Template]]
27 changes: 27 additions & 0 deletions docs/Global/Region.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[/Global/Region]] -- Region code to use when location support files

# Synopsis

GLM:

~~~
#set region=US
~~~

Shell:

~~~
bash$ gridlabd -D region=US
bash$ gridlabd --define region=US
~~~

# Description

The region code is used to location support files such a libraries and templates files.

# See also

* [[/Command/Library]]
* [[/Global/Country]]
* [[/Global/Organization]]
* [[/Command/Template]]
18 changes: 18 additions & 0 deletions docs/Module/Powerflow/Overhead_line_conductor.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ GLM:
rating.summer.emergency "<decimal> A";
rating.winter.continuous "<decimal> A";
rating.winter.emergency "<decimal> A";
weight "<decimal> lb/ft";
strength "<decimal> lb";
}
~~~

Expand Down Expand Up @@ -78,6 +80,22 @@ Continuous winter amp rating

Emergency winter amp rating

### `weight`

~~~
double rating.winter.emergency[A];
~~~

Cable weight per lineal foot

### `strength`

~~~
double rating.winter.emergency[A];
~~~

Cable strength

# Example

~~~
Expand Down
151 changes: 151 additions & 0 deletions docs/Subcommand/Plot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[[/Subcommand/Plot]] -- GridLAB-D plot subcommand

# Synopsis

Shell:

~~~
$ gridlabd plot OPTIONS
~~~

GLM:

~~~
#plot OPTIONS
~~~

or

~~~
#on_exit CODE gridlabd plot OPTIONS
~~~

# Description

The 'gridlabd plot' command uses pandas and matplotlib to create PNG files from
CSV files.

## Options

The following options are available:

### `-d|--debug`

Enable debug output (if any)

### `-e|--exception`

Enable raising of exception instead of printing exception message and exiting with error code 3.

### `--figure:OPTIONS[=VALUE]`

Specify matplotlib pyplot figure option. See [Matplotlib *figure*](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figure.html) for details.

- *figsize* (tuple): Specify figure width and height in inches. Default is `6.4,4.8`.
- *dpi* (float): Specify plot resolution in dots per inch. Default is `100.0`.
- *facecolor* (str): Specify the background color. See [Matplotlib colors](https://matplotlib.org/stable/gallery/color/named_colors.html) for details. Default is `white`.
- *edgecolor* (str): Specify the border color. See [Matplotlib colors](https://matplotlib.org/stable/gallery/color/named_colors.html) for details. Default is `white`.
- *frameon* (bool): Enable visibility of the figure frame. Default is `True`.
- *tight_layout* (bool): Enable adjustment of the padding to fit plot elements. Default is `False`.

### `-h|--help|help`

Display this help information

### `-i|--input=PATH`

Specify the input CSV pathname

### `-o|--output=PATH`

Specify the output PNG pathname (default is input with ".png")

### `-q|--quiet`

Disable error output (if any)

### `-s|--show`

Show the output

### `--plot:OPTIONS[=VALUE]`

The following [Pandas DataFrame *plot*](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html) options are available. In addition, many [Matplotlib *plot*](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html) options may be used.

- *x* (str or int): Specify the x data. Default is `None`.
- *y* (str, int, of list of str or int): Specify the y data. Default is `None`
- *kind* (str): specify the kind of plot, i.e., "line", "bar", "barh", "hist", "box", "kde", "density", "area", "pie", "scatter", "hexbin". Default is "line".
- *subplots* (bool): Plot y data on separate subplots. Default is `False`.
- *sharex* (bool): Share x axis when using `subplots`.
- *sharey* (bool): Share y axis when using `subplots`.
- *layout* (tuple): Specify `(rows,columns)` when using `subplots`.
- *figsize* (tuple): Specify `(width,height)` of figure in inches.
- *use_index* (bool): Specify the use of the row index as ticks. Default is `True`.
- *title* (str or list of str): Specify the (sub)plot title(s). Defualt is `None`.
- *grid* (bool): Enable plotting of the grid. Default is `False`.
- *legend* (bool): Enable plotting of the legend. Default is `False`.
- *style* (str): Specify the list style. Default is `-`.
- *logx* (bool): Enable plotting *x* axis on a logarithmic scale. Default is `False`.
- *logy* (bool): Enable plotting *y* axis on a logarithmic scale. Default is `False`.
- *loglog* (bool): Enable plotting both axes on a logarithmic scale. Default is `False`.
- *xticks* (sequence): Specify *x*-tick values. Default is automatic.
- *yticks* (sequence): Specify *y*-tick values. Default is automatic.
- *xlim* (tuple): Specify *x* limits. Default is `None`.
- *ylim* (tuple): Specify *y* limits. Default is `None`.
- *xlabel* (str): Specify the *x* axis label. Default is *x* field name.
- *ylabel* (str): Specify the *y* axis label. Default is *y* field name.
- *rot* (int): Specify the rotation for tick labels. Default is 0.
- *fontsize* (int): Specify the tick label font size. Default is 10.
- *position* (float): Specify the relative alignment of bars, i.e., 0 for left/bottom to 1 for top/right. Default is 0.5 (center).
- *colormap* (str): Specify the color map to use when *colorbar* is enabled.
- *colorbar* (bool): Enable the colorbar (only for *scatter* and *hexbin* plots).
- *table* (bool): Enable placement of a data table below the plot. Default is `False`.
- *xerr* (str): Field to use for *x* error bars. Default is `None`.
- *yerr* (str): Field to use for *y* error bars. Default is `None`.
- *stacked* (bool): Enable stacked *line*, *area* and *bar* plots. Default is `False` for *line* and *bar* plots, and `True` for *area* plots.
- *sort_columns* (bool): Enable sorting of column names when ordering the plot. Default is `False`.
- *secondary_y* (bool): Enable plotting of *y* values on secondary axis if multiple *y* fields are specified. Default is `False`.
- *mark_right* (bool): Enable marking with `(right)` secondary *y*-axis fields. Default is `False`.
- *include_bool* (bool): Enable inclusion of Boolean values in plot. Default is `False`.

### `-v|--verbose`

Enable verbose output (if any)

### `-w|--warning`

Disable warning output (if any)

# Example

The following example illustrates how to generate a plot of two fields generated
by a recorder.

~~~
module tape
{
csv_header_type NAME;
}
clock
{
timezone "PST+8PDT";
starttime "2020-01-01 00:00:00 PST";
stoptime "2020-01-02 00:00:00 PST";
}
class test {
randomvar x[MW];
randomvar y[MWh];
}
object test
{
x "type:normal(100,10); min:0; max:200; refresh:1h";
y "type:normal(100,10); min:0; max:200; refresh:1h";
object recorder
{
property "x,y";
interval -1;
file ${modelname/glm/csv};
};
}
#on_exit 0 gridlabd plot -i=${modelname/glm/csv} --plot:x=timestamp --plot:y=x,y --plot:rot=90 --plot:grid --plot:legend --figure:tight_layout=True
~~~
Loading

0 comments on commit e7309b2

Please sign in to comment.