3.1.11.4. Ramp TimeSeries
This command is used to construct a TimeSeries object in which the load factor is a linear Ramp function. An optional -smooth flag provides an adjustable smoothness, allowing for a smooth transition at the start and end of the ramp. The default behavior provides a linear ramp from 0 to 1.0. By providing a smoothness > 0, the time series has a continuous derivative. The smoothing interval is equal to the smoothness factor times half the ramp time.
The load factor is determined as:
With: \(S = smoothness \rightarrow 0<=S<=1.0\)
- timeSeries Ramp $tag? $tStart? $tRamp? <-smooth $smoothness?> <-offset $offset?> <-factor $cFactor?>
Argument |
Type |
Description |
---|---|---|
$tag |
integer |
unique tag among TimeSeries objects. |
$tStart |
float |
starting time of non-zero load factor |
$tRamp |
float |
length of time to perform the ramp |
‘-smooth’ |
string |
optional flag to enable smooth ramp |
$smoothness |
float |
smoothness parameter (optional: 0 ≤ $smoothness ≤ 1 default = 0.0) |
‘-offset’ |
string |
optional flag to provide vertical offset |
$offset |
float |
vertical offset amount (optional: default = 0.0 |
‘-factor’ |
string |
optional flag to provide scale factor |
$cFactor |
float |
the load factor scale factor (optional: default = 1.0) |
Example 1:
The following code demonstrates how a user would create a ramp time series with a tag of 1, has a start time of $tStart = 5.0, a ramp time of $tRamp = 30.0, a $smoothness value of 0.25, an $offset of -1.0, and a scale factor of $cFactor = 2.0.
Tcl Code
timeSeries Ramp 1 5.0 30.0 -smooth 0.25 -offset -1.0 -factor 2.0
Python Code
timeSeries('Ramp', 1, 5.0, 30.0, '-smooth', 0.25, '-offset', -1.0, '-factor', 2.0)
Example 2:
The following code demonstrates how a user would create a ramp time series with a tag of 2, has a start time of $tStart = 10.0, a ramp time of $tRamp = 30.0, a $smoothness value of 0.1, an $offset of 2.0, and a scale factor of $cFactor = -2.0.
Tcl Code
timeSeries Ramp 2 10.0 30.0 -smooth 0.1 -offset 2.0 -factor -2.0
Python Code
timeSeries('Ramp', 2, 10.0, 30.0, '-smooth', 0.1, '-offset', 2.0, '-factor', -2.0)
Code Developed by: Codi McKee (Texas A&M University)