Commit 8d0bf09e authored by Paul Schultz's avatar Paul Schultz
Browse files

cluster problem

parent df3e79f0
......@@ -164,7 +164,12 @@ from numba import njit, float64, complex128, void, int32
"""
def_network_rhs_string = """
if cache_flag:
def_network_rhs_string = "@njit(float64[:](float64[:], float64), cache=True)"
else:
def_network_rhs_string = "@njit(float64[:](float64[:], float64))"
def_network_rhs_string += """
def network_rhs_numba(y, t):
dydt = np.empty({total_length} + {length})
......@@ -185,11 +190,6 @@ def network_rhs_numba(y, t):
l_indptr=l_indptr
)
if cache_flag:
def_network_rhs_string = "@njit(float64[:](float64[:], float64), cache=True)" + def_network_rhs_string
else:
def_network_rhs_string = "@njit(float64[:](float64[:], float64))" + def_network_rhs_string
def_network_rhs_string += "".join([node.node_dynamics_string(j) for j, node in enumerate(node_list)])
def_network_rhs_string += """
......
......@@ -64,9 +64,9 @@ def main(sim_dir=default_dir, create_test_data=True, run_test=True, flag_baobab=
import time
print "start", "{0.tm_year}-{0.tm_mon}.{0.tm_mday}.-{0.tm_hour}h{0.tm_min}m.timestamp".format(time.localtime(time.time()))
# node_list, Y = load_PYPSA('microgrid_testcase.npz')
# load_flow_sol = None
node_list, Y, load_flow_sol = load_PyPSA_df("bus_admittance.npy", "bus_parameters")
node_list, Y = load_PYPSA('microgrid_testcase.npz')
load_flow_sol = None
# node_list, Y, load_flow_sol = load_PyPSA_df("bus_admittance.npy", "bus_parameters")
# rhs = define_network_rhs(node_list, Y)
rhs = define_network_rhs_codegen(node_list, Y)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment