Simbiology Error- Invalid assignment syntax or parse error for rule

2 views (last 30 days)
I am exercising on the article of Tzafriri et al(2004) titled "Analysis of compartmental models of ligand induced endocytosis" with simbiology. However I am taking the error above according to my rate rules and I don't know how to correct them. Can you please help me? The screenshots of my simbiology project are attached below.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 20 Dec 2013
Hi,
When you write a rate rule in SimBiology, you don't write the d/dt on the left-hand side of the equations. For example, the first rate should be
L = (-kf*L*Rs+kr*Cs)*(n/Nav)
Also note the red indicators to the right of the rules. These indicate a problem. If you hover your mouse over the indicator, you might get useful debugging information.
Good luck!
Arthur
  1 Comment
Arthur Goldsipe
Arthur Goldsipe on 20 Dec 2013
Cansu had some follow-up questions, which I will try to answer below:
Question 1: I have removed the left parts and have written them as in your helpful example. I suppose that once i define my species and parameters in my model i don't need to define them for rules again but my recent error says that "The name 'kf' in rule 'L = (-kf*L*Rs+kr*Cs)*(n/Nav)' does not refer to any in-scope species, parameters, or compartment". What should i do?
Answer 1: The rate rule does not create any of the species or parameters used in the rule. You must create them separately, which also allows you to specify their properties (things like their initial values, their units, and whether they are constant during a simulation).
Question 2: I also defined my parameters again. Here is my new error: "Invalid rule variable 'L' in rate rule 'L = (-kf*L.*Rs+kr*Cs)*(n/Nav)'. This object has its Constant* property set to true or is being used in a reaction or in another rule."
Answer 2: As the message says, their are two possible problems. First, take a look at where you added the variable 'L' (in the list of species or properties) and make sure you uncheck the "Constant" checkbox. A species or parameter that is constant cannot be modified by a rate rule. If the "Constant" checkbox is already unchecked, then you need to see where else you are using 'L'. If you define the dynamics of 'L' using a rate rule, normally you cannot use 'L' as a reactant or a product in any reaction. This is because a conflict is created between the dynamics defined by the reaction and the rate rule. The only way around this constraint is to enable the checkbox for the "Boundary Condition" property of this species, which tells SimBiology that the species is not affected by any reactions it appears in.

Sign in to comment.

More Answers (0)

Categories

Find more on Extend Modeling Environment in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!