actionrwd.segment
actionrwd.segment(..) 🡒 ranvar, process
The function returns a ranvar that represents the probabilistic demand over a specified probabilistic segment. The function actionrwd.segment()
is intended as a support function for actionrwd.reward()
to visualize the demand trajectories internally used by the action reward function.
table P = extend.range(20)table S = extend.range(3) S.Start = dirac(2)S.Duration = poisson(S.N + 1) S.D = actionrwd.segment( TimeIndex: P.N BaseLine: P.5 Dispersion: 1.0 Alpha: 0.3 Start: S.Start Duration: S.Duration) show table "Segments" a1e5 with S.D1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Using FixedStart
table P = extend.range(264) P.Start = poisson(1)P.BL = 256.90P.FS = floor(P.N / 2) P.D = actionrwd.segment( TimeIndex: P.N BaseLine: P.BL Start: P.Start Dispersion: 2.0 Alpha: 0 FixedStart: P.FS Duration: dirac(1)) show table "Segments" with P.D P.N P.BL1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
See actionrwd.reward.
Function signature
/// Returns a ranvar that represents the integrated demand - over the segment -/// associated to the trajectories as generated by 'actionrwd.reward'.call actionrwd.segment<Items, Periods, Segments>( /// Defines a non-ambiguous ordering per item (i.e. distinct values required). Periods.TimeIndex: number as "TimeIndex", /// The baseline of the average demand over each period. Periods.Baseline: number as "Baseline", /// The dispersion parameter (variance divided by mean) of the demand for each item. Items.Dispersion: number as "Dispersion", /// The update speed parameter of the ISSM model for each item. Items.Alpha: number as "Alpha", /// The inclusive start of the segment expressed in periods (zero indexed). Segments.Start: ranvar as "Start", /// The length of the segment expressed in number of periods. Segments.Duration: ranvar as "Duration", /// Number of trajectories used to evaluate the cumulative demand. /// The parameter has to be defined within [1, 10'000]. Default: 2'500. scalar.Samples?: number as "Samples", /// Seed used for the trajectory generator. scalar.Seed?: number as "Seed", /// The inclusive start of the segment, expressed as a pure number. /// If provided, 'Start' will be interpreted as a 'variation' around /// 'FixedStart'. Segments.FixedStart?: number as "FixedStart", Items -> Periods, Items -> Segments) : Segments.ranvar as "actionrwd.segment"1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26