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

yet another different behavior compared to CppCode v/s PythonCode #3

Open
hrani opened this issue Sep 5, 2022 · 0 comments
Open

yet another different behavior compared to CppCode v/s PythonCode #3

hrani opened this issue Sep 5, 2022 · 0 comments
Assignees

Comments

@hrani
Copy link
Contributor

hrani commented Sep 5, 2022

Json File : eqn_with_constants.json
{ "FileType": "HillTau",
"Constants": { "molBase": 100, "KA": 1, "tau": 1.0, "eqBase":0.0002, "eqScale": 2.0},
"Groups": {
"output_g": {
"Species": {"mol": "molBase" },
"Reacs": {
"output": {"subs": ["mol", "input"],
"KA": "KA", "tau": "tau" }
},
"Eqns": { "eq": "eqBase + eqScale * input + mol + output" }
}
}
}
pytho-vs-cpp.txt
To get equation from json file, we query via e,t = modelpath.eqnInfo.items()

CppCode: returns
name = eq
mol = ['input', 'mol', 'output']
eqnstr = 0.0002 + 2.0 * input + mol + output

In cppCode the constants are replace with values in the 'eqnstr' and consts are not populated

PythonCode: returns
name = eq
mol = ['input', 'mol', 'output']
eqnstr = eqBase + eqScale * input + mol + output
consts = ['eqBase', 'eqScale']
eqnstr = returns exact equation which is written in json file and consts list is populated

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

No branches or pull requests

2 participants