Skip to content

Commit

Permalink
Update Model.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dchassin committed Jan 8, 2025
1 parent 4001179 commit 87810e2
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions docs/Utilities/Model.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Syntax: `gridlabd model FILENAME [COMMANDS ...] [OPTIONS ...]`

Options:

* `-s|--save=FILENAME`: save output to FILENAME
* `-s|--save=FILENAME`: save output to `FILENAME`

Commands:

Expand All @@ -14,37 +14,38 @@ Commands:

* `get=PATTERN[,PROPERTY:VALUE`: get object data

* `globals=[PATTERN|NAME][,PROPERTY:VALUE]: get/set globals
* `globals=[PATTERN|NAME][,PROPERTY:VALUE]`: get/set globals

* `copy=PATTERN[,PROPERTY:VALUE]: copy objects
* `copy=PATTERN[,PROPERTY:VALUE]`: copy objects

* `list=PATTERN[,PROPERTY:VALUE]`: list objects

* `modify=PATTERN,PROPERTY:VALUE[,...]`: modify object data

* `move=PATTERN[,PROPERTY:VALUE]: move objects
* `move=PATTERN[,PROPERTY:VALUE]`: move objects

Description:

The model editor utility allows command-line and python-based editing of models.

PATTERN is a regular expression used to match object or global names. PROPERTY
and VALUE can be regular expressions or a property name and value tuple for
get or set operations, respectively. When comma-separated patterns are
allowed, they are interpreted as `and` operations. Note that the `add`
command does not use regular expressions for NAME.
`PATTERN` is a regular expression used to match objects or global variable
names. `PROPERTY` and `VALUE` can be regular expressions or a property name
and value tuple for get or set operations, respectively. When comma-separated
patterns are allowed, they are interpreted as `and` operations. Note that the
`add` command does not use regular expressions for `NAME`, which are
interpreted literally.

Output is always generated as a CSV table with property names in the header row.
Commands that modify or delete objects or data will output the old value
(s). Output is always generated to `stdout` as a CSV table with property
names in the header row.

Commands that modify or delete objects or data will output the old value(s).

The output FILENAME format is limited to JSON.
The save `FILENAME` format is limited to JSON.

Caveat:

The model editor does not check whether the action will result in a faulty
model, e.g., deleting a node that is referened by a link, add a property that
is not valie for the class, or changing an object property to something invalid.
model, e.g., deleting a node that is referened by a link, adding a property that
is not valid for the class, or changing an object property to something invalid.

Examples:

Expand Down

0 comments on commit 87810e2

Please sign in to comment.