Skip to content

valid ways to write equations using the DSL #1044

Closed
@vyudu

Description

@vyudu

Might be worth thinking about allowing more complicated derivative expressions on the left side of differential equations.

@reaction_network begin
    @variables A(t) B(t)
    @equations D(A) + D(B) ~ A
end

f(A, t) = 2*A*t
@reaction_network begin
    @variables A(t) B(t)
    @equations f(A, t)*D(A) ~ A + B
end

This latter one may be complicated since we probably want to escape the f(A, t) but not the D(A)? @TorkelE would it be easy to change the DSL code to allow for stuff like this?

I assume we want both of the following to work?

f(A, t) = 2*A*t
@reaction_network begin
    @variables A(t) B(t)
    @equations f(A, t) ~ A + B
end

@reaction_network begin
    @variables A(t) B(t)
    @equations A + B ~ f(A, t)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions