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

Assignment rule variable not found when variable is a Parameter #945

Open
BryanRumsey opened this issue May 2, 2023 · 1 comment · May be fixed by #946
Open

Assignment rule variable not found when variable is a Parameter #945

BryanRumsey opened this issue May 2, 2023 · 1 comment · May be fixed by #946
Assignees
Labels
bug Something isn't working
Milestone

Comments

@BryanRumsey
Copy link
Contributor

Model

I used the degradation/decay model with an added assignment rule setting decayrate to 10.

Solver

Simulated using the TauHybridSolver

Error

Compute Environment: Local
2023-05-02 15:34:54,573 - GillesPy2 - ERROR - Job errors: argument 'solver=' to run() failed. Reason Given: 'decayrate' is not in list
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/gillespy2/core/model.py", line 1295, in run
return solver.run(t=t, increment=increment, timeout=timeout, **solver_args)
File "/opt/conda/lib/python3.8/site-packages/gillespy2/solvers/numpy/tau_hybrid_solver.py", line 1129, in run
raise self.has_raised_exception
File "/opt/conda/lib/python3.8/site-packages/gillespy2/solvers/numpy/tau_hybrid_solver.py", line 1138, in ___run
self.__run(curr_state, curr_time, timeline, trajectory_base, initial_state, live_grapher, t,
File "/opt/conda/lib/python3.8/site-packages/gillespy2/solvers/numpy/tau_hybrid_solver.py", line 1272, in __run
sol, curr_state[0], curr_time[0], save_times, save_index = self.__simulate(integrator_options,
File "/opt/conda/lib/python3.8/site-packages/gillespy2/solvers/numpy/tau_hybrid_solver.py", line 676, in __simulate
save_index = self.__save_state_to_output(
File "/opt/conda/lib/python3.8/site-packages/gillespy2/solvers/numpy/tau_hybrid_solver.py", line 124, in __save_state_to_output
trajectory[trajectory_index][species.index(ar.variable.name) + 1] = assignment_value
ValueError: 'decayrate' is not in list
@briandrawert briandrawert added the bug Something isn't working label May 2, 2023
@briandrawert briandrawert added this to the 1.8.3 Release milestone May 2, 2023
@briandrawert
Copy link
Member

TODO:

  • Update documentation: parameter can not be targets of assignment rules, rate rules, or events
  • Throw exception when parameter is used as target. (check in the compile-prep function, and the "add_" function)
  • Update tests
  • On SBML import, anytime a parameter is a target, convert it to a species (might be already done).
  • Update StochSS: interface should state that parameters can not be targets (suggest they change to a species)

@BryanRumsey BryanRumsey self-assigned this May 16, 2023
@BryanRumsey BryanRumsey linked a pull request May 16, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants