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

[BUG]: Create Model from Equations operator treats newlines as equations #5147

Open
liunelson opened this issue Oct 11, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@liunelson
Copy link
Member

Describe the bug
When I paste in a newline-separated list of equations in Create Model from Equations, the newlines are added as blank equations.

To Reproduce

  1. Paste in this list of equations
\frac{d S}{d t} = - \beta_w I_w S - \beta_a I_a S - \beta_d I_d S + \mu N - \mu S + \eta_R R_F + \eta_R R_w + \eta_R R_a + \eta_R R_d

\frac{d V_1}{d t} = \omega_1 S - \mu V_1

\frac{d I_w}{d t} = \beta_w I_w S - \gamma_w I_w - \mu_w I_w

\frac{d I_a}{d t} = \beta_a I_a S - \gamma_a I_a - \mu_a I_a

\frac{d I_d}{d t} = \beta_d I_d S - \gamma_d I_d - \mu_a I_a

\frac{d R_w}{d t} = \gamma_w I_w - R_w \beta_{Ra} I_a - R_w \beta_{Rd} I_d - \eta_R R_w - \mu R_w 

\frac{d R_a}{d t} = \gamma_a I_a - R_a \beta_{Rw} I_w - R_a \beta_{Rd} I_d - \eta_R R_a - \mu R_a 

\frac{d R_d}{d t} = \gamma_d I_d - R_d \beta_{Rw} I_w - R_d \beta_{Ra} I_a - \eta_R R_d - \mu R_d 

\frac{d I_{Rw}}{d t} = \beta_{Rw} I_w R_a + \beta_{Rw} I_w R_d - \gamma_w I_{Rw} - \mu_V_w I_{Rw}

\frac{d I_{Ra}}{d t} = \beta_{Ra} I_a R_w + \beta_{Ra} I_a R_d - \gamma_a I_{Ra} - \mu_V_a I_{Ra}

\frac{d I_{Rd}}{d t} = \beta_{Rd} I_d R_w + \beta_{Rd} I_d R_a - \gamma_d I_{Rd} - \mu_V_d I_{Rd}

\frac{d R_F}{d t} = \gamma_w I_{Rw} + \gamma_a I_{Ra} + \gamma_d I_{Rd} - \eta_R R_F - \mu R_F
  1. Click Add
  2. Note the empty equations, one per newline character

Expected behavior

Filter out empty equation strings!

Screenshots

Image

Image

@liunelson liunelson added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant