Skip to content
New issue

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

Add tspan to *System #1898

Merged
merged 4 commits into from
Oct 21, 2022
Merged

Add tspan to *System #1898

merged 4 commits into from
Oct 21, 2022

Conversation

YingboMa
Copy link
Member

No description provided.

@isaacsas
Copy link
Member

Any chance to support a tspan given in terms of symbolic parameters?

@YingboMa
Copy link
Member Author

Could you give me an example?

@isaacsas
Copy link
Member

Maybe something like

@parameters T1 = 0.0 T2 = 1.0
tspan = (T1, T2)
@named sys = ODESystem(eqs, t, [x], ps; defaults = [default_u0; default_p], tspan)
...

# uses the default values or a user parameter map to set the actual numeric tspan
# via varmap_to_vars
prob = ODEProblem(sys)  

The idea would be to keep allowing as much of the system to be specified symbolically as possible by allowing parameters in tspan.

I've thought that it might be useful to do something similar with letting events store symbolic tstop parameters (or maybe that makes more sense in a system), since right now discrete events require users to still manually submit a list of numeric tstops to solve.

@YingboMa YingboMa merged commit 00590bf into master Oct 21, 2022
@YingboMa YingboMa deleted the myb/tspan branch October 21, 2022 21:14
@YingboMa
Copy link
Member Author

Yeah, it should be pretty straightforward to implement. Do you want to make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants