Handling of local parameters
At the moment, local parameters cannot be directly estimated within PEtab, as this requires unique parameter Ids. One would need to make them global parameters. Maybe instead we could use a unique naming scheme like in AMICI (${reaction_id}_${local_par_id}) to also allow for local parameters
https://github.com/PEtab-dev/PEtab/blob/8b03c8f20c8042c5375adabfe23bab19c3a649b0/petab/sbml.py#L115 ?
https://github.com/PEtab-dev/PEtab/blob/8b03c8f20c8042c5375adabfe23bab19c3a649b0/petab/sbml.py#L115 ?
Good catch. So far unused here. Legacy... And from before I knew that libsbml already implements that same functionality.
Question is mostly if we want to handle local parameters that way.
Is there a disadvantage with this and would there be another good option?
Is there a disadvantage with this and would there be another good option?
Disadvantage of allowing for local parameters: They don't necessarily have a unique ID. It's a per-reaction namespace. In PEtab we'd need globally identifiable parameter IDs. The common way is using ${reaction_id}_${local_par_id}, but this is still not necessarily unique.
Okay, but this is a problem of local parameters in general but not the suggested implementation. As we want to support available SBML models, we should in my opinion also support local parameters.
The common was sounds good and we should then be check for uniqueness.
The changes proposed in #538 also provide a means to handle local parameters.