Improve Default Interval when using simulateCS #258
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if the user doesnt pass
saveat
ordt
tosimulateCS
, we fall back todt=1e-3
, which is a decent default value for short Simulations, but leads to really long simulation times for longer timespans (t_stop-t_start>10
). When not provided with any arguments, i would expect the simulation environment to pick a more sensible default value. Both Dymola and FMPy do this by picking adt
so that the number of saved values is 500 (Dymola) or 500-1000 (FMPy). This PR copies the behaviour from FMPy.As we dont have any other Files apart from
sim.jl
, i addedauto_interval
in there. Maybe it would make sense to put it in a new file likeutils.jl
orhelpers.jl
?This could possibly be considered breaking because it somewhat changes the default behaviour?