draeger-lab / SBSCL

The Systems Biology Simulation Core Library (SBSCL) provides an efficient and exhaustive Java implementation of methods to interpret the content of models encoded in the Systems Biology Markup Language (SBML) and its numerical solution.
https://draeger-lab.github.io/SBSCL/
GNU Lesser General Public License v3.0
20 stars 13 forks source link

Misinterpretation of function variables with parameters #45

Open hemilpanchiwala opened 4 years ago

hemilpanchiwala commented 4 years ago

This issue occurs when the bvars defined in the FunctionDefinition of the model are same as the defined ids for the parameters. The simulator misinterprets the function variables as the parameters and calculates the results by considering the values of the parameters.

This issue is encountered while running the SBML L3V2 model of the 1492 test case from the SBML Test Suite. Similar is the issue for the test case 1493.

In the test case 1492, function with id my_piecewise is defined as piecewise(x, y, z) where x, y, and z but simulator misinterprets them with the parameters defined with the same id.

Below is the screenshot of the result from the simulator for test case 1492 where z simply takes the value of parameter x (instead of some defined formula) as piecewise(x, y, z) => x if y > 0 else z.

Screenshot from 2020-06-17 00-13-15