pyPESTO
pyPESTO copied to clipboard
How to check whether amici preequilibration is required
In pypesto.objectiv.AmiciObjective.init_preequilibration_edata
:
Currently, len(fixed_parameters) == 0 is used as an indicator of requiring no preequilibration. However, when there are events (which amici cannot deal with yet in python), the situation can occur that there are no fixed_parameters, but events that are omitted in the preequilibration run.
At least when using PEtab, this should be pretty straight-forward, right? There, we can simply check whether a simulation condition also has a preequilibration condition... In all other cases: I would personally leave it to the user to define a preequilibration condition, rather than doing this in an automated fashion... (?)
the context has changed a bit: Now it's in https://github.com/ICB-DCM/pyPESTO/blob/master/pypesto/objective/amici_objective.py#L172, where also self.amici_solver.getNewtonPreequilibration()
is taken as a check whether to do preeq, if I get that correctly.
This sounds reasonable... If the preequilibration condition in amici is not empty, one probably wants to use it. But actually, getNewtonPreequilibration() should even be sufficient...
But this is just about guessing the steady state iteratively in pypesto. The preeq itself has changed to amici I think. Maybe if len(edata.fixedParametersPreequilibration) or self.amici_solver.getNewtonPreequilibration()
can be changed to amici.require_preeq(edata, solver)
or something like that, but apart I think this ussue can then be closed.
Agreed, amici should offer a simple interface function to query this information.
Is this still an issue @yannikschaelte ?