Example

- Example command line option

Synopsis
host% gridlabd --example module:class

The --example command line option outputs a GLM snapshot of a newly created object of the class specified. Normally, the properties given in the example are the default, although some defaults may change based on other properties set by the modeler in the GLM file.

Example
host% gridlabd --example climate:weather object weather:0 { // header properties rank 0; clock INIT; flags NONE; // weather properties temperature +0 degF; humidity +0 %; solar_dir +0 W/sf; solar_diff +0 W/sf; solar_global +0 W/sf; wind_speed +0 mph; rainfall +0 in/h; snowdepth +0 in; month 0; day 0; hour 0; minute 0; second 0; } = Caveat =

Note that the output is generated after object_create and object_init are called but without user values being set. As a result, the values that are output are considered "default defaults" and not the final defaults that would be set by object_init after user inputs are considered. The only way to observe what the final defaults are given changed input values is to create an object in a simple GLM file, set the values you wish to base the defaults on and save the output to a file.

= History =

This feature was implemented in /2972 based on /555 and is be available as of.

= See also =


 * Modules
 * Class
 * Command options