Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding some neural mass models from the Virtual Brain for benchmarking #354

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

hstrey
Copy link
Member

@hstrey hstrey commented Jun 3, 2024

No description provided.

@hstrey
Copy link
Member Author

hstrey commented Jun 3, 2024

@MasonProtter @harisorgn I created a neural mass model with noise, but system_from_graph fails with the following error (w is my @brownian variable). Any ideas?

ERROR: ArgumentError: Variable w is not a function of independent variable t. Stacktrace: [1] check_variables(dvs::Vector{SymbolicUtils.BasicSymbolic{Real}}, iv::SymbolicUtils.BasicSymbolic{Real}) @ ModelingToolkit ~/.julia/packages/ModelingToolkit/kByuD/src/utils.jl:133 [2] ODESystem(tag::UInt64, deqs::Vector{…}, iv::SymbolicUtils.BasicSymbolic{…}, dvs::Vector{…}, ps::Vector{…}, tspan::Nothing, var_to_name::Dict{…}, ctrls::Vector{…}, observed::Vector{…}, tgrad::Base.RefValue{…}, jac::Base.RefValue{…}, ctrl_jac::Base.RefValue{…}, Wfact::Base.RefValue{…}, Wfact_t::Base.RefValue{…}, name::Symbol, systems::Vector{…}, defaults::Dict{…}, guesses::Dict{…}, torn_matching::Nothing, initializesystem::Nothing, initialization_eqs::Vector{…}, schedule::Nothing, connector_type::Nothing, preface::Nothing, cevents::Vector{…}, devents::Vector{…}, parameter_dependencies::Nothing, metadata::Nothing, gui_metadata::Nothing, tearing_state::Nothing, substitutions::Nothing, complete::Bool, index_cache::Nothing, discrete_subsystems::Nothing, solved_unknowns::Nothing, split_idxs::Nothing, parent::Nothing; checks::Bool) @ ModelingToolkit ~/.julia/packages/ModelingToolkit/kByuD/src/systems/diffeqs/odesystem.jl:187 [3] ODESystem @ ~/.julia/packages/ModelingToolkit/kByuD/src/systems/diffeqs/odesystem.jl:176 [inlined] [4] ODESystem(deqs::Vector{…}, iv::SymbolicUtils.BasicSymbolic{…}, dvs::Vector{…}, ps::Vector{…}; controls::Vector{…}, observed::Vector{…}, systems::Vector{…}, tspan::Nothing, name::Symbol, default_u0::Dict{…}, default_p::Dict{…}, defaults::Dict{…}, guesses::Dict{…}, initializesystem::Nothing, initialization_eqs::Vector{…}, schedule::Nothing, connector_type::Nothing, preface::Nothing, continuous_events::Nothing, discrete_events::Nothing, parameter_dependencies::Nothing, checks::Bool, metadata::Nothing, gui_metadata::Nothing) @ ModelingToolkit ~/.julia/packages/ModelingToolkit/kByuD/src/systems/diffeqs/odesystem.jl:266 [5] get_namespaced_sys(blox::Neuroblox.Generic2dOscillator) @ Neuroblox ~/Documents/programming/Neuroblox.jl/src/blox/blox_utilities.jl:59 [6] (::Neuroblox.BloxConnector)(bloxout::Neuroblox.Generic2dOscillator, bloxin::Neuroblox.Generic2dOscillator; kwargs::@Kwargs{…}) @ Neuroblox ~/Documents/programming/Neuroblox.jl/src/blox/connections.jl:226 [7] connector_from_graph(g::MetaDiGraph{Int64, Float64}) @ Neuroblox ~/Documents/programming/Neuroblox.jl/src/Neurographs.jl:38 [8] #system_from_graph#275 @ ~/Documents/programming/Neuroblox.jl/src/Neurographs.jl:51 [inlined] [9] top-level scope @ ~/.julia/packages/ModelingToolkit/kByuD/src/systems/abstractsystem.jl:1445 Some type information was truncated. Use show(err) to see complete types.

@hstrey
Copy link
Member Author

hstrey commented Jun 3, 2024

@MasonProtter @harisorgn I figured it out. When I define the System, I need to specify both the states and parameters. Otherwise it thinks that w is a state.

@hstrey hstrey merged commit 06278bc into master Jun 4, 2024
2 checks passed
@hstrey hstrey deleted the two2osc branch June 4, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants