Skip to content

Commit

Permalink
Merge pull request #149 from ModiaSim/otter_development
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
MartinOtter authored Jul 7, 2022
2 parents 5d40662 + 0adecdd commit b034baa
Show file tree
Hide file tree
Showing 16 changed files with 3,709 additions and 32 deletions.
12 changes: 6 additions & 6 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.BandedMatrices]]
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "13223ec65172b18f164e8a8338e4e95d40d54c8c"
git-tree-sha1 = "0227886a3141dfbb9fab5bfbf2133ac57677c1f9"
uuid = "aae01518-5342-5314-be14-df237901396f"
version = "0.17.2"
version = "0.17.3"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down Expand Up @@ -610,9 +610,9 @@ version = "6.18.1"

[[deps.PDMats]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
git-tree-sha1 = "ca433b9e2f5ca3a0ce6702a032fce95a3b6e1e48"
git-tree-sha1 = "9351c1a6c0e922cc862bd96822a98c9029a6d142"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.11.14"
version = "0.11.15"

[[deps.Parameters]]
deps = ["OrderedCollections", "UnPack"]
Expand Down Expand Up @@ -795,9 +795,9 @@ uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[deps.SignalTables]]
deps = ["DataFrames", "JSON", "OrderedCollections", "Pkg", "Tables", "Test", "Unitful"]
git-tree-sha1 = "b8f0cd15fe115b38eae285d9b23386e848fc7c6b"
git-tree-sha1 = "ddd51e545dc084c588ca158d773452218fdf0e9a"
uuid = "3201582d-3078-4276-ba5d-0a1254d79d7c"
version = "0.3.4"
version = "0.3.5"

[[deps.SimpleTraits]]
deps = ["InteractiveUtils", "MacroTools"]
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
authors = ["Hilding Elmqvist <[email protected]>", "Martin Otter <[email protected]>"]
name = "Modia"
uuid = "cb905087-75eb-5f27-8515-1ce0ec8e839e"
version = "0.9.0"
version = "0.9.1"

[deps]
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Expand Down Expand Up @@ -39,7 +39,7 @@ MonteCarloMeasurements = "1"
OrderedCollections = "1"
RecursiveFactorization = "0.2"
Reexport = "1"
SignalTables = "0.3.4"
SignalTables = "0.3.5"
StaticArrays = "1"
Sundials = "4"
TimerOutputs = "0.5"
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ julia> ]add SignalTablesInterface_PyPlot # if plotting with PyPlot desire
add SignalTablesInterface_GLMakie # if plotting with GLMakie desired
add SignalTablesInterface_WGLMakie # if plotting with WGLMakie desired
add SignalTablesInterface_CairoMakie # if plotting with CairoMakie desired

# might be sometimes also useful
add SignalTables
```

or call `t = getValues(instantiatedModel, "time"), y = getValues(instantiatedModel, "y")` to retrieve
Expand Down Expand Up @@ -59,9 +62,6 @@ where *phi* is the rotation angle, *omega* the angular velocity, *m* the mass, *

```julia
using Modia
@usingPlotPackage # Use plot package defined with
# ENV["SignalTablesPlotPackage"]="PyPlot" or
# usePlotPackage("PyPlot")

Pendulum = Model(
L = 0.8u"m",
Expand All @@ -82,6 +82,10 @@ simulate!(pendulum1, Tsit5(), stopTime = 10.0u"s", log=true)

showInfo(pendulum1) # print info about the result
writeSignalTable("pendulum1.json", pendulum1, indent=2, log=true)

@usingModiaPlot # Use plot package defined with
# ENV["SignalTablesPlotPackage"] = "XXX" or with
# usePlotPackage("XXX")
plot(pendulum1, [("phi", "w"); "r"], figure = 1)
```
The result is the following print output
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, Modia, SignalTables, SignalTablesInterface_PyPlot
using Documenter, Modia, Modia.SignalTables, SignalTablesInterface_PyPlot

makedocs(
#modules = [Modia],
Expand Down
Loading

0 comments on commit b034baa

Please sign in to comment.