Commit c311ce1
committed
Simplify type handling in non-concrete varmap
It's hard to come up with a useful example, but:
```julia
using OrdinaryDiffEq, Catalyst, DiffEqFlux, ModelingToolkit
NN(S, I, R, p) = FastChain(FastDense(3,10,tanh),FastDense(10,1))([S, I, R], p)[1]
@register NN(S, I, R, p)
rn = @reaction_network begin
β, S + I --> 2I
γ, I --> R
NN(S, I, R, p3n), I --> Q
δ, Q --> R
end β γ δ p3n
_p3n = Float64.(initial_params(FastChain(FastDense(3,10,tanh),FastDense(10,1))))
@parameters β γ δ p3n
p = [β=>1.0,γ=>1.0,δ=>1.0,p3n=>_p3n] # [α,β]
tspan = (0.0,250.0)
u0 = [999.0,0.0,1.0,0.0] # [S,I,R] at t=0
op = ODEProblem(rn, u0, tspan, p)
sol = solve(op,Tsit5())
```
is such a thing. We can try to handle this better in the future but at least for now it gives `Any` and keeps `Any`.1 parent 7876118 commit c311ce1
3 files changed
+6
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
491 | | - | |
492 | 490 | | |
493 | 491 | | |
494 | 492 | | |
495 | 493 | | |
496 | 494 | | |
497 | 495 | | |
498 | | - | |
499 | | - | |
500 | 496 | | |
501 | 497 | | |
502 | 498 | | |
503 | 499 | | |
504 | 500 | | |
505 | 501 | | |
506 | | - | |
507 | | - | |
508 | 502 | | |
509 | 503 | | |
510 | 504 | | |
| |||
515 | 509 | | |
516 | 510 | | |
517 | 511 | | |
518 | | - | |
519 | | - | |
520 | 512 | | |
521 | 513 | | |
522 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
| 274 | + | |
| 275 | + | |
276 | 276 | | |
277 | | - | |
278 | | - | |
| 277 | + | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments