Integration Methods

Bristlecone supports model systems defined in discrete or continuous time. For continuous-time model systems - defined as ordinary differential equation(s) - Bristlecone applies numerical integration to calculate changes in the modelled properties through time.

Note. Currently only fixed timesteps are supported, but variable timestep support (e.g. for sediment core data) is planned for a future release.

Included integration methods

The following integration functions are included within the Bristlecone.Integration namespace:




Runge-Kutta 4 (MathNet Numerics)


A fourth-order Runge Kutta method to provide approximate solutions to ODE systems.

Runge-Kutta 547M (Open Solving Library for ODEs - Microsoft Research)


A method based on classic Runge-Kutta, but with automatic error and step size control. See the documentation.

Adding a custom integration method

You can add a custom integration routine by wrapping your integration function to match the EstimationEngine.Integration type signature as follows:

open Bristlecone

let myCustomIntegrator : EstimationEngine.Integrate<'data,'time> =
    fun writeOut tInitial tEnd tStep initialConditions externalEnvironment model ->
        invalidOp "Doesn't actually do anything!"

let engine =
    |> Bristlecone.withContinuousTime myCustomIntegrator

When defining a custom integration routine, you may wish to use the Base.solve function from the Bristlecone.Integration namespace. This is used to arrange the equations into a form suitable for a simple integration routine.

namespace Bristlecone
val myCustomIntegrator : writeOut:EstimationEngine.WriteOut -> tInitial:'time -> tEnd:'time -> tStep:'time -> initialConditions:CodedMap<'data> -> externalEnvironment:CodedMap<Time.TimeIndex.TimeIndex<'data>> -> model:CodedMap<EstimationEngine.ODE> -> CodedMap<'data []>
module EstimationEngine from Bristlecone
type Integrate<'data,'time> = EstimationEngine.WriteOut -> 'time -> 'time -> 'time -> CodedMap<'data> -> CodedMap<Time.TimeIndex.TimeIndex<'data>> -> CodedMap<EstimationEngine.ODE> -> CodedMap<'data []>
val writeOut : EstimationEngine.WriteOut
val tInitial : 'time
val tEnd : 'time
val tStep : 'time
val initialConditions : CodedMap<'data>
val externalEnvironment : CodedMap<Time.TimeIndex.TimeIndex<'data>>
val model : CodedMap<EstimationEngine.ODE>
val invalidOp : message:string -> 'T
<summary>Throw a <see cref="T:System.InvalidOperationException" /> exception</summary>
<param name="message">The exception message.</param>
<returns>The result value.</returns>
val engine : EstimationEngine.EstimationEngine<float,float>
Multiple items
module Bristlecone from Bristlecone

namespace Bristlecone
val mkContinuous : EstimationEngine.EstimationEngine<float,float>
<summary> A standard `EstimationEngine` for ordinary differential equation models. </summary>
val withContinuousTime : t:EstimationEngine.Integrate<'a,'b> -> engine:EstimationEngine.EstimationEngine<'a,'b> -> EstimationEngine.EstimationEngine<'a,'b>
<summary> Use a custom integration method </summary>