generated from arras-energy/gridlabd-old
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
- Loading branch information
David P. Chassin
authored
Apr 16, 2024
1 parent
22f6be4
commit b65b3c2
Showing
21 changed files
with
786 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[[/Module/Pypower/Geodata]] -- PyPower geodata object | ||
|
||
# Synopsis | ||
|
||
~~~ | ||
class geodata | ||
{ | ||
char1024 file; // geodata file name | ||
char1024 target; // geodata target class and property, e.g., CLASS::PROPERTY or OBJECT.PROPERTY | ||
} | ||
~~~ | ||
|
||
# Description | ||
|
||
A `geodata` object can be used to apply values to properties of object | ||
according to the geographic location. The selection of the value to apply is | ||
based on the nearest location in the `geodata` file. The format of the file | ||
is a time-series, with locations encoded using geohashes in columns, e.g., | ||
|
||
~~~ | ||
timestamp,9mugye,9mupxg | ||
2018-01-01 00:00:00,10,11 | ||
2018-01-01 01:00:00,12,13 | ||
2018-01-01 02:00:00,14,15 | ||
~~~ | ||
|
||
Only double values may be applied using `geodata`. | ||
|
||
# Caveat | ||
|
||
Some object properties are updated after the `precommit` event that processes | ||
geodata. Consequently, any geodata written to these objects will be | ||
overwritten by subsequent events processed by those objects. This is notably | ||
true for `bus` and `branch` objects. If you want to change power injections, | ||
you should process geodata for the child objects that update them, e.g., `load`, | ||
`powerplant`, or `powerline`. | ||
|
||
# Example | ||
|
||
The following example applies the values in the file `geodata_load_P.csv` to the | ||
values of `P` is all object of class `load`. | ||
|
||
~~~ | ||
object pypower.geodata | ||
{ | ||
file "geodata_load_P.csv"; | ||
target "load::P"; | ||
} | ||
~~~ | ||
|
||
# See Also | ||
|
||
* [[Module/Pypower]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#define CASE=14 | ||
#ifexists "../case.glm" | ||
#define DIR=.. | ||
#endif | ||
|
||
// #set debug=TRUE | ||
#set suppress_repeat_messages=FALSE | ||
|
||
module pypower | ||
{ | ||
maximum_timestep 3600; | ||
save_case TRUE; | ||
} | ||
|
||
#include "${DIR:-.}/case.glm" | ||
|
||
modify pp_bus_2.latitude 38.5; | ||
modify pp_bus_2.longitude -122.5; | ||
|
||
object pypower.load | ||
{ | ||
name "load_2"; | ||
parent "pp_bus_2"; | ||
latitude 38.5; | ||
longitude -122.5; | ||
Vn 12.5 kV; | ||
status ONLINE; | ||
} | ||
|
||
object pypower.geodata | ||
{ | ||
file "${DIR:-.}/test_case14_geodata_P.csv"; | ||
target "load_2.P"; | ||
} | ||
|
||
module tape | ||
{ | ||
csv_header_type NAME; | ||
} | ||
|
||
object tape.recorder | ||
{ | ||
parent "load_2"; | ||
file "test_case14_geodata_load_2_record.csv"; | ||
property "P"; | ||
} | ||
|
||
#ifexists "../test_case14_geodata_load_2_record.csv" | ||
#on_exit 0 diff ../test_case14_geodata_load_2_record.csv test_case14_geodata_load_2_record.csv > gridlabd.diff | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
timestamp,9q8vk6,9qbgh2 | ||
2020-01-01 00:00:00,10,11 | ||
2020-01-01 01:00:00,12,13 | ||
2020-01-01 02:00:00,14,15 |
4 changes: 4 additions & 0 deletions
4
module/pypower/autotest/test_case14_geodata_load_2_record.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
timestamp,P | ||
2020-01-01 00:00:00 PST,+11+0i | ||
2020-01-01 01:00:00 PST,+13+0i | ||
2020-01-01 02:00:00 PST,+15+0i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.