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

@parameters and @variables are malfunctioning #646

Closed
filipepfarias opened this issue May 10, 2023 · 1 comment
Closed

@parameters and @variables are malfunctioning #646

filipepfarias opened this issue May 10, 2023 · 1 comment

Comments

@filipepfarias
Copy link

I've been trying this code of the documentation recently but stopped working:

julia> rs = @reaction_network begin
           @parameters A B
           A, ∅ → X
           1, 2X + Y → 3X
           B, X → Y
           1, X → ∅
       end


ERROR: LoadError: Malformed reaction line: @parameters A B
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] get_reactions(ex::Expr, reactions::Vector{Catalyst.ReactionStruct})
   @ Catalyst ~/.julia/packages/Catalyst/wVYbW/src/reaction_network.jl:365
 [3] get_reactions
   @ ~/.julia/packages/Catalyst/wVYbW/src/reaction_network.jl:364 [inlined]
 [4] make_reaction_system(ex::Expr, parameters::Tuple{}; name::Expr)
   @ Catalyst ~/.julia/packages/Catalyst/wVYbW/src/reaction_network.jl:260
 [5] make_reaction_system(ex::Expr, parameters::Tuple{})
   @ Catalyst ~/.julia/packages/Catalyst/wVYbW/src/reaction_network.jl:254
 [6] var"@reaction_network"(__source__::LineNumberNode, __module__::Module, ex::Expr, parameters::Vararg{Any})
   @ Catalyst ~/.julia/packages/Catalyst/wVYbW/src/reaction_network.jl:119
in expression starting at REPL[1]:1

Am I doing something wrong?

BTW, I'm also trying to define time-dependent rates as functions. Was it suppose to work defining as @variable? Because for me it is presenting the same error as above.

Thanks.

@filipepfarias
Copy link
Author

Fixed by updating 12.3.2 -> 13.3.0

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

No branches or pull requests

1 participant