Error or bug in SimBiology: creating custom kinetic laws.
이전 댓글 표시
I am building a model that requires a user defined kinetic law. My code:
Mobj = sbiomodel('u_PA_parameter_generation'); %create model object
comp_obj = addcompartment(Mobj, 'plasma'); %create compartment object
Robj2 = addreaction(Mobj, 'PLS + Pro_u_PA -> PLS + u_PA'); %create reaction object
abskineticlawObj2 = sbioabstractkineticlaw('reaction_2','PLS*Pro_u_PA^ci*keff_PLS'); %create kinetic law
sbioaddtolibrary(abskineticlawObj2) %add kinetic law to the library.
The last line above is the causing my problem. In the absence of sbioaddtolibrary function I get an error:
'Error using SimBiology.Reaction/addkineticlaw The kinetic law named 'abskineticlawObj2' does not exist in the user-defined library. Use SBIOADDTOLIBRARY to add to the library before using it.'
...and when I do as the error suggests (adding the sbioaddtolibrary line above) I get a different error:
'Error using SimBiology.Root/addtolibrary The kinetic law 'reaction_2' already exists as a user-defined. Rename by changing the Name property or re-create by using SBIOABSTRACTKINETICLAW.'
Since these errors are basically a paradox I was wondering if anyone knew if this is a problem with the software or is there a problem with my code. The rest of the reaction is listed below:
Kobj2= addkineticlaw(Robj2, 'abskineticlawObj2');
Pobj2a = addparameter(Kobj2, 'keff_PLS',40); %This rate needs a hill coefiscient!!!
Pobj2b = addparameter(Kobj2, 'ci',2);
set(Kobj2, 'ParameterVariableNames','keff_PLS');
set(Kobj2, 'ParameterVariableNames','ci')
Thanks
채택된 답변
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: SimBiology Community
카테고리
도움말 센터 및 File Exchange에서 Extend Modeling Environment에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!