Optimize a big model containing modules with different stiffness

Hello people! I have a few modules that I connected together as a big model. The modules have different stiffness. For example, module A is not stiff but runs very slowly for each time step (it has a delay component), but module B is very stiff but runs relatively fast for each time step. I am wondering if there’s anyway to solve them together in a fast way (like computing module A every 50 time steps of B?). By the way, module A only feeds into B and does not get feedback from B, but there is need to connect them together instead of running them separately. Attached are the computational time / time step metrics for each module, and the number of time steps each module needs.


Then just solve model A first, and then use its continuous solution in model B.

What’s the most efficient way to use model A’s continuous solution in model B? Do I do something like modelAsolution(time, idxs=1) for the different indices at each time-step?

yes