Skip to content

rebaseIndex

This function is used for rebasing. It designates the variable that contains this function as the index for the rebase operation.

Signature

rebaseIndex(
    indexAfterRebase,
    indices=array(1,2,...,t)
)

Arguments

indexAfterRebase
The value of the index variable after the rebase operation has completed.
indices
A list of indices at which to rebase. Defaults to every time step of the current projection node. The first value must be 1.

Limitations

  • This function may not have any parents. I.e., it must be the outermost function in a formula.
    • rebaseIndex(...)
    • func(rebaseIndex(...))
    • rebaseIndex(...) + 1
  • This function may only be used inside a scalar projection node variable.
  • This function may be called at most once per projection node.
  • If rebaseIndex is used in a projection node, rebaseValue must be used at least once in the same projection node to fully define the rebase operation.

Examples

Say the current projection node has time steps t ∈ {1,2,3,4,5}.

rebaseIndex(0) is equivalent to rebaseIndex(0, array(1,2,3,4,5)), which means: Rebase at every time step, and set the index to 0 after the rebase operation.

rebaseIndex(5, array(1,3,5)) means: Rebase at time steps 1, 3, and 5, and set the index to 5 after the rebase operation.