Motivation / Current Behaviour
Flow-based simulations repeatedly evaluate the difference between the current cumulative flows and the flows at the most recent base point. This expression currently creates a temporary dynamically sized vector during every RHS evaluation and again when compartment outputs are reconstructed.
A reusable flow-difference vector should be allocated once per simulation and used for both right-hand-side evaluations and compartment reconstruction.
Enhancement description
This does not change the numerical formulation or simulation results.
Additional context
No response
Checklist
Motivation / Current Behaviour
Flow-based simulations repeatedly evaluate the difference between the current cumulative flows and the flows at the most recent base point. This expression currently creates a temporary dynamically sized vector during every RHS evaluation and again when compartment outputs are reconstructed.
A reusable flow-difference vector should be allocated once per simulation and used for both right-hand-side evaluations and compartment reconstruction.
Enhancement description
This does not change the numerical formulation or simulation results.
Additional context
No response
Checklist