Skip to content

Commit 9f467b7

Browse files
committed
maybe fix unit handling
1 parent 49a5df6 commit 9f467b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/examples/gas_network.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ Julia code from the symbolic reepresentation all units will be stripped.
220220
However since we know the times exactly, we can handle this by simply giving a list of explicit
221221
tstops to the solve command, to make sure those are hit exactly.
222222
=#
223-
load2 = (t) -> LinearInterpolation(-1*Float64[20, 30, 10, 30, 20], [0, 4, 12, 20, 24]*3600.0; extrapolation=ExtrapolationType.Constant)(t)
224-
load3 = (t) -> LinearInterpolation(-1*Float64[40, 50, 30, 50, 40], [0, 4, 12, 20, 24]*3600.0; extrapolation=ExtrapolationType.Constant)(t)
223+
load2 = LinearInterpolation(-1*Float64[20, 30, 10, 30, 20], [0, 4, 12, 20, 24]*3600.0; extrapolation=ExtrapolationType.Constant)
224+
load3 = LinearInterpolation(-1*Float64[40, 50, 30, 50, 40], [0, 4, 12, 20, 24]*3600.0; extrapolation=ExtrapolationType.Constant)
225225
ModelingToolkit.get_unit(op::typeof(load2), _) = u"m^3/s"
226226
ModelingToolkit.get_unit(op::typeof(load3), _) = u"m^3/s"
227227
nothing #hide

test/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Bonito = "824d6782-a2ef-11e9-3a09-e5662e0c26f8"
77
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
88
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
99
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
10+
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
1011
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
1112
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
1213
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
@@ -20,7 +21,6 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
2021
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
2122
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
2223
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
23-
LinearInterpolations = "b20c7882-2490-4592-a606-fbbfe9e745e8"
2424
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
2525
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
2626
NetworkDynamics = "22e9dc34-2a0d-11e9-0de0-8588d035468b"
@@ -57,6 +57,7 @@ Bonito = "≥0.0.1"
5757
CUDA = "≥0.0.1"
5858
CairoMakie = "0.13.1"
5959
Chairmarks = "1.3.1"
60+
DataInterpolations = "7"
6061
DelimitedFiles = "1.9.1"
6162
DiffEqCallbacks = "4.1.0"
6263
DifferentiationInterface = "0.6.32"
@@ -70,7 +71,6 @@ Graphs = "≥0.0.1"
7071
InteractiveUtils = "≥0.0.1"
7172
KernelAbstractions = "≥0.0.1"
7273
LinearAlgebra = "≥0.0.1"
73-
LinearInterpolations = "0.1.4"
7474
Logging = "1"
7575
ModelingToolkit = "≥0.0.1"
7676
NetworkDynamics = "≥0.0.1"

0 commit comments

Comments
 (0)