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

Centralized parameter handling #27

Open
murrayrm opened this issue Jul 28, 2017 · 2 comments
Open

Centralized parameter handling #27

murrayrm opened this issue Jul 28, 2017 · 2 comments

Comments

@murrayrm
Copy link
Contributor

Created by zoltuz on 2012-10-02

Reaction Rate Parameters

In simbiology there's two ways to introduce parameters to the reactions

  1. Parameter object added to Kinetic Law
    * Pros: In this way parameters are local and accessible for only one reaction.
    * Cons: To handle centralized parameters the array of parameters either should be global or passed into every single function along the way.
  2. Parameter object added directly to the model object
    * Pros: All the parameters can be added at one place in the code, but there're global.
    More organized code structure.
    * Cons: The parameters values inside the code aren't protected from the end-user. (All the latter added parameters and the original ones are in the same space, this might cause parameter override, etc)

More: http://www.mathworks.com/help/simbio/ref/parameterobject.html

Rules and other parameters

  1. About the simbiology rules can be easily added, where parameters can be dynamically computer according to the given rule. (Basically, if one of the parameters is the left side of a rule, than that parameter will calculated at simulation initialization or every time parameter is needed) More: http://www.mathworks.com/help/simbio/ref/ruletype.html

  2. Temperature, pH and other experiment related variables: I think they can be added directly to the model object as parameters to avoid passing them through each function.

Please, let me know what do you think about this!

@murrayrm
Copy link
Contributor Author

murrayrm commented Jul 28, 2017

Created by Vipul - 2012-10-02
Concerning method 2 for the reaction rate parameters: as far as I can tell, MATLAB does not have a way to protect variables within a given scope (Does anyone know of a way?). We could adopt a convention where all these Model Object level reaction rate parameters are capitalized, and state in the documentation that a user should not name any variables in capitalized form, to avoid any conflicts. Users usually use camelCase or underscores anyway..

@murrayrm
Copy link
Contributor Author

Created by Richard Murray - 2012-10-03
For global parameters (temperature, pH, etc), I think we add these to the model object. But we have to think about what to do if/when there are multiple global objects in different tubes.

Choosing some naming convention for any global parameters is a good idea. We should do something simple (all caps, start with underscore, etc) to make it easy for users to avoid colliding. There are only two namespaces in simbiology I think: global to a model and local to a reaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant