TimeShift Constant

Input
  • inputVariable, the time series which has to shift a certain number of time steps
Options

direction: Direction can be "forward" or "backward". This can also be a reference to a location attribute between '@' signs. The referenced location attribute must contain a valid direction.

numberOfTimeSteps: Integer number of time steps to shift input time series. This can also be a reference to a location attribute between '@' signs. The referenced location attribute must contain an integer.

Output
  • outputVariable, the shifted time series.
Description

The option numberOfTimeSteps defines the number of time steps the transformation has to shift. A positive value will shift the time series in the specified direction ("forward" shifts to the future and "backward" shifts to the past, default is "backward"). A negative value will shift the time series in the opposite direction (as opposed to the specified direction).

Configuration examples

In the following example the input time series will be shifted backwards 1 time step to create the output time series.

<transformation id="TimeShiftConstant">
	<timeShift>
		<constant>
			<inputVariable>
				<variableId>input</variableId>
			</inputVariable>
			<direction>backward</direction>
			<numberOfTimeSteps>1</numberOfTimeSteps>
			<outputVariable>
				<variableId>shiftedInput</variableId>
			</outputVariable>
		</constant>
	</timeShift>
</transformation>

In the following example direction and numberOfTimeSteps refer to location attributes of locations in the locationSet of the output variable. So the amount of shift can be different for different output locations.

<transformation id="TimeShiftConstantWithLocationAttributes">
	<timeShift>
		<constant>
			<inputVariable>
				<variableId>input</variableId>
			</inputVariable>
			<direction>@direction@</direction>
			<numberOfTimeSteps>@nr_steps@</numberOfTimeSteps>
			<outputVariable>
				<variableId>output</variableId>
			</outputVariable>
		</constant>
	</timeShift>
</transformation>
  • No labels