Activity output types
Activity outputs can be of five different types:
sund.CONSTANT
Activity outputs of this type are always have a constant value for all time points.
For instance, the following activity output named test_output always have the value f = 2
:
activity = sund.Activity(time_unit = "s")
activity.add_output(sund.CONSTANT, "test_output", f = 2)
sund.PIECEWISE_CONSTANT
Activity outputs of this type are have different constant values between specified time points. All activity outputs of this type always have a default value outside of specified time points.
For instance, the following activity output named test_output has the default value f = 2
prior
to the specified time points and the value f = 1
from time point t = 1
and the value f = 3
from time point t = 2
and the value f = 2.5
from the time point t = 3
:
activity = sund.Activity(time_unit = "s")
activity.add_output(sund.PIECEWISE_CONSTANT, "test_output", t = [1, 2, 3], f = [2, 1, 3, 2.5])
sund.PIECEWISE_LINEAR
Activity outputs of this type have values based on linear equations between specified values at specified time points.
For instance, the following activity output named test_output has a linearly decreasing value
from f = 2
to f = 1
between time points t = 0
and t = 1
, a linearly increasing value from
f = 1
to f = 3
between time points t = 1
and t = 2
and a linearly decreasing value from
f = 3
to f = 2.5
between time points t = 2
and t = 3
:
activity = sund.Activity(time_unit = "s")
activity.add_output(sund.PIECEWISE_LINEAR, "test_output", t = [0, 1, 2, 3], f = [2, 1, 3, 2.5])
sund.CUBIC_SPLINE
Activity output of this type have values based on natural spline interpolation, conforming to specific values at specific time points.
For instance, the following activity output named test_output has it's value as a cubic function conforming to the values f = 2
at t = 0
, f = 1
at t = 1
, f = 3
at t = 2
and f = 2.5
at t = 3
:
activity = sund.Activity(time_unit = "s")
activity.add_output(sund.CUBIC_SPLINE, "test_output", t = [0, 1, 2, 3], f = [2, 1, 3, 2.5])
sund.CUBIC_SPLINE_SLOPE
This output type is not fully supported and will be removed in a future version.