Closed bascee closed 4 years ago
Compartments are evaluated on the basis of a global timestep, process managers within that compartment can have a smaller timestep, but if they are dependent on frequent interactions from other compartments the global timestep needs to be reduced.
The compartments are now evaluated in the order they are supplied in and the boundaries are updated in the solver post-step and thus any subsequently evaluated compartment will use the most recent information. This has obvious benefits, but the downside is that if the order of evaluation is changed (in the protocol file) the results may shift somewhat. The best order of evaluation should be first the compartment that is expected to be least affected by the other compartment. If both compartments have a high rate of change reduce the global timestep.
Not sure if this is an issue, but a compartment's process managers are all solved for the duration of the global time step, which seems to be the right way. For example, if global time step is set as 10 and a process manager at 1, then that process manager will be called 10 times within a simulation time step. Issue is with connected compartments; the solute concentrations in the connected compartment are updated 10 times within a simulation time step from within the first compartment and then the second compartment's process managers use that concentration in the solution for their first time point rather than 10th.