Splits step

We want to make sure that the step calculation in the split does not violate the ReferenceTimeWindowEnd

Definitions:

  • B B = equals EffectiveBegin

  • E E = equals ReferenceTWEnd

  • SS SS = equals StepSize

  • SPi SP sub i = equals Split i i

  • MD MD = equals Min Duration\

  • n n = equals Number of splits

Step size is computed as:

SS SS = equals (E-B-MD)n-1 the fraction with numerator open paren E minus B minus MD close paren and denominator n minus 1

The time window end of a specific split i i can be computed as:

B+SS B plus SS * (i-1) open paren i minus 1 close paren + plus MD MD

Therefore, the time window end of the last split is:

B+SS B plus SS * (n-1) open paren n minus 1 close paren + plus MD MD

If we replace the SS SSby its formula,

B+(E-B-MD)n-1 B plus the fraction with numerator open paren E minus B minus MD close paren and denominator n minus 1 * (n-1) open paren n minus 1 close paren + plus MD MD

We can simplify the (n-1) open paren n minus 1 close paren division and multiplication:

B+(E-B-MD) B plus open paren E minus B minus MD close paren + plus MD MD

And now it is easy to see that we can cancel out B B and MD MD , leaving us with the time window end of the last split equivalent to E E .