# Using solution of DDE model as history for another (larger) DDE problem

**URL:** <https://discourse.julialang.org/t/using-solution-of-dde-model-as-history-for-another-larger-dde-problem/102435>\
**Category:** Numerics\
**Tags:** question, diffeq, differentialequation\
**Created:** [August 3, 2023, 7:43am UTC](https://discourse.julialang.org/t/using-solution-of-dde-model-as-history-for-another-larger-dde-problem/102435 "2023-08-03T07:43:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jewh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jewh/32/28586_2.png) [@jewh](https://discourse.julialang.org/u/jewh)\
**Post date:** [August 3, 2023, 7:43am UTC](https://discourse.julialang.org/t/using-solution-of-dde-model-as-history-for-another-larger-dde-problem/102435/1 "2023-08-03T07:43:51Z")

</div>

I want to study effects on a DDE model when I add another component to the system.

Using `resize!` and callbacks [doesn’t work](https://discourse.julialang.org/t/unable-to-change-system-size-in-dde-problem-using-differentialequations-jl/102103/7).

Therefore I want to solve the DDE model for n components across some time span, then use this as the initial condition and system history for a second DDE problem with n + 1 components. (The history of the n+1 component would be also defined here, probably something constant).

However it is not clear to me how to use the output of `solve(prob, alg)` to define the history function `h(p, t)` to achieve this, as `solve` returns a vector with (often) variable timesteps between values.

From reading the DifferentialEquations.jl docs, it looks like `h` is assumed to be a continuous function, so presumably the internal mechanisms in `solve` create some continuous interpolation between solved values as a proxy for `h`? If this is true I’d like to replicate this as close as possible.

Does anyone have any suggestions?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [August 5, 2023, 10:56pm UTC](https://discourse.julialang.org/t/using-solution-of-dde-model-as-history-for-another-larger-dde-problem/102435/2 "2023-08-05T22:56:41Z")

</div>

> [@jewh](#):
>
> However it is not clear to me how to use the output of `solve(prob, alg)` to define the history function `h(p, t)` to achieve this, as `solve` returns a vector with (often) variable timesteps between values.

The output of `solve` is a `sol(t)` function so `h(p,t) = sol(t)` just works.
