Closed ziyinyuan closed 8 months ago
Yes, this makes sense. u_trains
and t
need to be the same length. That is, if your model includes control inputs, you need to supply them for every time point.
I have
u_test = [u_trains for _ in range(len(t))]
sim = model.simulate(y0, t, u_test)
The error this time shows: ValueError: Could not reshape control input to match the input data.
yeah, so check y0.shape
and np.array(u_test).shape
. y0
should be (n_time, n_features)
and u_test
should be (n_time, n_control_features)
.
thank you! it works!
I got the model out, but I am not sure how to simulate it. Can anyone help me with this? Here's my code
All good up to this part, but when I want to simulate the model, it run into the value error: x and y arrays must be equal in length along interpolation axis.