-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Is your feature request related to a problem? Please describe.
After parsing a BaseModelica file I want to automate simulation and saving of result files.
On BaseModelica.jl v1.1.0 I used the following script:
import BaseModelica
import DifferentialEquations
import DataFrames
parsed_model = BaseModelica.parse_basemodelica(base_modelica_file)
ode_problem = DifferentialEquations.ODEProblem(parsed_model)
ode_solution = DifferentialEquations.solve(
ode_problem,
tspan = (0.0, 1.0),
saveat = 0.02)
df = DataFrames.DataFrame(ode_solution)This changed with the latest version of BaseModelica.jl / ModelingToolkit.jl and I can't find how to update this in the docs.
Describe the solution you’d like
Add a short example to the documentation showcasing how to
- Parse a BaseModelica.jl file (already documented)
- Get the experiment annotation from the BaseModelica file or parsed model (currently I use OpenModelica to read the information from the BaseModelica file)
- Create an ODE problem with DifferentialEquations.jl or OrdinaryDiffEqDefault.jl or ModelingToolkit.jl
- Simulate the problem with the start values provided by the BaseModelica file and solver settings (start, stop, ...) specified by the BaseModelica file.
and keep it up-to-date with some CI running the documentation examples.
Describe alternatives you’ve considered
- Documenting how to simulate an ODE model of type
ModelingToolkit.Systemis maybe not the task of this package, but I think it is the output type ofbaseModelica_to_ModelingToolkitand dependencies change faster than I can keep up with our library test scripts.
Additional context
- I want to use BaseModelica.jl in automated scripts in https://github.com/OpenModelica/OpenModelicaLibraryTesting/blob/master/TestBaseModelica/src/TestBaseModelica.jl#L17-L76.
Metadata
Metadata
Assignees
Labels
No labels