Skip to content

Commit

Permalink
Bump MTK compat (#497)
Browse files Browse the repository at this point in the history
* Update Project.toml

* Update Project.toml

* fix initial conditions for discrete jcns
  • Loading branch information
MasonProtter authored Dec 6, 2024
1 parent 717fffe commit 99ae9c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GraphDynamics = "0.2.1"
Graphs = "1"
Interpolations = "0.14, 0.15"
MetaGraphs = "0.7"
ModelingToolkit = "9.46.0 - 9.50.0"
ModelingToolkit = "9.55.0 - 9.55"
ModelingToolkitStandardLibrary = "2"
MuladdMacro = "0.2"
OrderedCollections = "1.6.3"
Expand Down
4 changes: 2 additions & 2 deletions src/blox/discrete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct TAN <: AbstractDiscrete

function TAN(; name, namespace=nothing, κ=100, λ=1)
sts = @variables R(t)
ps = @parameters κ=κ λ=λ jcn [input=true]
ps = @parameters κ=κ λ=λ jcn=0 [input=true]
eqs = [
R ~ min(κ, κ/*jcn + sqrt(eps())))
]
Expand All @@ -79,7 +79,7 @@ struct SNc <: AbstractModulator

function SNc(; name, namespace=nothing, κ_DA=1, N_time_blocks=5, DA_reward=10, λ_DA=0.33, t_event=90.0)
sts = @variables R(t) R_(t)
ps = @parameters κ=κ_DA λ=λ_DA jcn [input=true] jcn_=0 #HACK: jcn_ stores the value of jcn at time t_event that can be accessed after the simulation
ps = @parameters κ=κ_DA λ=λ_DA jcn=0 [input=true] jcn_=0 #HACK: jcn_ stores the value of jcn at time t_event that can be accessed after the simulation

eqs = [
R ~ min(κ, κ/*jcn + sqrt(eps()))),
Expand Down

0 comments on commit 99ae9c6

Please sign in to comment.