MATLAB: Simbiology Desktop: Why the parameter is not recognized in the EventFcns (I would like to change its value at a precise timepoint)

events ruleSimBiology

I would like to create an event in Simbiology Desktop that modify a parameter ( a production constant) value but it seems that it is not recognized when writing its name in the EventFcns. The parameter has been defined inside a reaction (ReactionRate in the Reaction properties). I've also tried to write 'reaction1.kp' (where kp is the name of the parameter) but it still doesn't works. The EventFcn I would like to apply is: kp = kpI 'kpI' is a parameter defined in the model and it is recognised as a 'Qauntity Used by Event' in the simbiology Desktop but 'kp' isn't. the error displayed is 'The left-hand side of the EventFncs is not valid'
Could you help me?

Best Answer

Hi Raphaelle,
SimBiology allows you to create 2 kinds of parameters: model-scoped and reaction-scoped. Reaction-scoped parameters can only be used inside of the reaction they're associated with. Therefore, if you want to modify a parameter using an event, the parameter must be model-scoped. You can easily change the scope of a parameter in the SimBiology Desktop by right-clicking on it and selecting the "Change Scope" option.