FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gridlab-d/python/modelscript.py at master · INFERLab/gridlab-d · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
INFERLab
/
gridlab-d
Public
forked from
gridlab-d/gridlab-d
Notifications
You must be signed in to change notification settings
Fork
2
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
gridlab-d
/
python
/
modelscript.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (18 loc) · 549 Bytes
Breadcrumbs
gridlab-d
/
python
/
modelscript.py
Copy path
File metadata and controls
18 lines (18 loc) · 549 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from
gridspice
import
account
,
project
,
model
,
simulation
,
result
,
element
import
sys
if
len
(
sys
.
argv
)
<
3
:
raise
ValueError
(
'please input api key and model name to create'
)
apiKey
=
sys
.
argv
[
1
]
acc
=
account
.
Account
(
apiKey
)
proj
=
acc
.
getProjects
()[
0
]
model_name
=
sys
.
argv
[
2
]
mod
=
model
.
Model
(
model_name
,
proj
)
lat
=
37.449
long
=
-
122.1960
for
x
in
range
(
1
,
4
):
nod
=
element
.
powerflow
.
powerflow_object
.
node
()
nod
.
latitude
=
repr
(
lat
+
x
*
0.001
)
nod
.
longitude
=
repr
(
long
+
x
*
0.001
)
nod
.
name
=
'node-'
+
repr
(
x
)
mod
.
add
(
nod
)
mod
.
save
()
Back
|
FazBrowse Home
|
New Git URL