Open
Description
Hello thank you for implementing this library!
I have a variable that depends on the time step, called aircon_power. It should take in the time step that the ode is currently at, and return the respective aircon_power.
def aircon_power(tstep):
if tstep<0:
return 0
elif tstep>len(merged_dataset["temp_1"].values):
return 544.9
else:
spl = interp1d(range(len(x)), x, kind = 'cubic')
return spl(tstep)
I intend to then embed the aircon_power within the ordinary differential equations.
dT1 = - n_out[0, 0] * aircon_power(t) + (T1)*n_out[0, 1]
However, this returns an error because t is a symbolic Tensor.
NotImplementedError: Cannot convert a symbolic Tensor (tstep:0) to a numpy array.
Do you have any alternative method to introduce such a variable?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels