We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error:
ModelException: Invalid control function for var: 0. Control functions should be of the form: 0 = f(t, x, dx/dt)
from BondGraphTools import * #%% model = new(name= 'RC') #%% C = new("C", value= 1) R = new("R", value= 1) KCL = new("0") #%% add(model, R, C, KCL) connect(R, KCL) connect(KCL, C) #%% Sf = new("Sf") add(model, Sf) connect(Sf, KCL) draw(model) #%% timespan = [0, 5] x0 = {'x_0':1} step_fn = {'u_0': 't < 1 ? 1 : 0'} # if t < 0 then 1 else 0 t, x = simulate(model, timespan=timespan, x0=x0, control_vars= step_fn) plot(t,x)
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error:
ModelException: Invalid control function for var: 0.
Control functions should be of the form:
0 = f(t, x, dx/dt)
Thanks
The text was updated successfully, but these errors were encountered: