Hi Ciaran,
The problem is that you're passing the wrong name to addkineticlaw. Instead of 'abskineticlawobj2', use 'reaction_2' with addkineticlaw. (This is the difference between the MATLAB variable name and the Name property of the kinetic law.)
However, you probably don't need to add a kinetic law to the library in the first place. There are two ways of specifying reaction rates in SimBiology. As you've learned, one is by using a kinetic law. That approach lets you create a kinetic law that serves as a template, and then you fill in the species and variable names for each particular reaction. However, you can also just directly set the ReactionRate property of the reaction as follows:
Mobj = sbiomodel('u_PA_parameter_generation');
comp_obj = addcompartment(Mobj, 'plasma');
Robj2 = addreaction(Mobj, 'PLS + Pro_u_PA -> PLS + u_PA');
Robj2.ReactionRate = 'PLS*Pro_u_PA^ci*keff_PLS';
Mobj.addparameter('ci', 1.5);
Mobj.addparameter('keff_PLS', 0.05);
The main reason to use a kinetic law instead of just setting the reaction rate is so that you can re-use sort of rate equation in multiple reactions. But in this case, it's probably not worth the extra effort.
-Arthur
Best Answer