Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
condynet
PyPSD
Commits
7fcb2c02
Commit
7fcb2c02
authored
Mar 29, 2017
by
Paul Schultz
Browse files
removed sim data
parent
8d0bf09e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
PSD/__psdcache__/compile_function.py
View file @
7fcb2c02
This diff is collapsed.
Click to expand it.
PSD/complex_current_and_nodes.py
View file @
7fcb2c02
...
...
@@ -209,7 +209,7 @@ def network_rhs_numba(y, t):
text_file
.
write
(
"indptr=np.array({})"
.
format
(
indptr
.
tolist
()))
text_file
.
write
(
"
\n
"
)
text_file
.
write
(
"indices=np.array({})"
.
format
(
indices
.
tolist
()))
text_file
.
write
(
"
\n
"
)
text_file
.
write
(
"
\n
\n
"
)
text_file
.
write
(
def_network_rhs_string
)
from
__psdcache__.compile_function
import
network_rhs_numba
...
...
@@ -220,14 +220,14 @@ if __name__ == "__main__":
node_list
=
list
()
node_list
.
append
(
SwingEquationNode
(
3
,
infeed
=
1.
))
node_list
.
append
(
SwingEquationNode
(
3
,
infeed
=-
1
.1
))
node_list
.
append
(
SwingEquationNode
(
3
,
infeed
=-
1
))
Y
=
-
8.j
*
np
.
ones
((
2
,
2
),
dtype
=
np
.
complex128
)
Y
[
0
,
0
]
*=
-
1.
Y
[
1
,
1
]
*=
-
1.
rhs
=
define_network_rhs
(
node_list
,
Y
)
n
rhs
=
define_network_rhs_codegen
(
node_list
,
Y
)
#
rhs = define_network_rhs(node_list, Y)
rhs
=
define_network_rhs_codegen
(
node_list
,
Y
)
#
# for i in range(10):
# ic = np.random.rand(6)
...
...
PSD/microgrid_frequency_dynamics.py
View file @
7fcb2c02
...
...
@@ -3,7 +3,7 @@
import
numpy
as
np
from
numba
import
njit
import
os
from
complex_current_and_nodes
import
SwingEquationNode
,
define_network_rhs
,
define_network_rhs_codegen
,
define_root_rhs
from
complex_current_and_nodes
import
SwingEquationNode
,
define_network_rhs
,
define_network_rhs_codegen
,
define_root_rhs
_omega
try
:
import
baobap
as
bao
...
...
@@ -39,7 +39,7 @@ def define_gen_rc(brp, rhs, init=None, method="krylov"):
init
=
np
.
ones
(
3
*
system_size
,
dtype
=
np
.
float64
)
*
0.5
def
generate_run_conditions
(
batch
,
run
):
root_rhs
=
define_root_rhs
(
2
*
system_size
,
rhs
)
root_rhs
=
define_root_rhs
_omega
(
2
*
system_size
,
rhs
)
from
scipy.optimize
import
root
print
"start root"
result
=
root
(
root_rhs
,
init
,
method
=
"{}"
.
format
(
method
))
...
...
@@ -117,7 +117,7 @@ def main(sim_dir=default_dir, create_test_data=True, run_test=True, flag_baobab=
fig
=
plt
.
figure
()
ax
=
fig
.
gca
(
projection
=
'3d'
)
for
k
in
range
(
3
):
for
k
in
range
(
brp
.
system_dimension
):
ax
.
plot
(
states
[:,
k
],
states
[:,
brp
.
system_dimension
+
k
],
states
[:,
2
*
brp
.
system_dimension
+
k
])
ax
.
set_xlabel
(
r
"$\Re$ V"
)
ax
.
set_ylabel
(
r
"$\Im$ V"
)
...
...
PSD/simulation_data/microgrid/figures/batch_0_run_0.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_1.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_2.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_3.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_4.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_5.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_6.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_0_run_7.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
PSD/simulation_data/microgrid/figures/batch_2_run_0.pdf
deleted
100644 → 0
View file @
8d0bf09e
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment