Open nickerso opened 10 years ago
6f60c375 starts to handle the case when a variable used in an initial_value attribute resolves to a simple numerical assignment. Still need to look into other cases...
Fully solving this problem probably requires something like the partial evaluation available in PyCml!
Thanks Jonathan. A direct link to the code would be helpful.
The main driver code is at https://chaste.cs.ox.ac.uk/trac/browser/trunk/python/pycml/optimize.py#L241, although it makes use of a lot of other bits in that folder.
Currently, the model compactor code will only handle initial_value attributes with variable name values if the named variable eventually resolves into a variable with a numerical initial_value attribute. It would be a fairly simple extension to correctly interpret initial value variables with simple equations (x = 2).
Ideally, we could interpret algebraic expressions to try and determine numerical initial_value's for differential equation variables. But we need to do this independently of CCGS.