Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Jul 13, 2024
1 parent e6ff110 commit 7075c5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)


A parser for the [Base Modelica](https://github.com/modelica/ModelicaSpecification/tree/MCP/0031/RationaleMCP/0031) format. Contains utilities to parse Base Modelica model files in to Julia objects, and to convert Base Modelica models to [ModelingToolkit](https://docs.sciml.ai/ModelingToolkit/stable/) models.

So far only very simple Base Modelica models are supported. Only models with real parameters, real variables, and equations consisting of simple arithmetic equations and first order derivatives are supported. Support for the rest of the BaseModelica specification is planned to be added in the future.
So far only very simple Base Modelica models are supported. Only models with real parameters, real variables, and equations consisting of simple arithmetic equations and first order derivatives are supported. Support for the rest of the BaseModelica specification is planned to be added in the future.

## Installation

Expand All @@ -25,6 +24,7 @@ Pkg.add("BaseModelica");
```

# Example

A Base Modelica model is in the file `ExampleFirstOrder.mo`. Inside of the file is a Base Modelica model specifying a simple first order linear differential equation:

```
Expand Down
2 changes: 1 addition & 1 deletion src/evaluator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ end

function baseModelica_to_ModelingToolkit(package::BaseModelicaPackage)
eval_AST(package)
end
end
2 changes: 1 addition & 1 deletion src/scratch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,4 @@ parse_one("= x", modification)
x = only(parse_one("Real 'm' = 25.0;", component_clause))
x.component_list[1].declaration.modification[1].expr[1].val

x = only(parse_one("Real 'm';", component_clause))
x = only(parse_one("Real 'm';", component_clause))
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ if GROUP == "All" || GROUP == "Core"
@test parse_basemodelica("testfiles/NewtonCoolingBase.mo") isa ODESystem
end
end
end
end

0 comments on commit 7075c5c

Please sign in to comment.