1 | ////////////////////////////////////////////////////////////////////////////// |
---|
2 | // File: datasets.tol |
---|
3 | // Purpose: It creates a set of useful generic datasets |
---|
4 | ////////////////////////////////////////////////////////////////////////////// |
---|
5 | |
---|
6 | |
---|
7 | ////////////////////////////////////////////////////////////////////////////// |
---|
8 | // Includes |
---|
9 | ////////////////////////////////////////////////////////////////////////////// |
---|
10 | |
---|
11 | Set Include("C:/Users/lmperez.BAYESFORECAST/Desktop/functions.tol"); |
---|
12 | |
---|
13 | ////////////////////////////////////////////////////////////////////////////// |
---|
14 | // Functions |
---|
15 | ////////////////////////////////////////////////////////////////////////////// |
---|
16 | |
---|
17 | ////////////////////////////////////////////////////////////////////////////// |
---|
18 | Set Add.Standard.Variables(MMS::@DataSet DS.I, Set variables) |
---|
19 | ////////////////////////////////////////////////////////////////////////////// |
---|
20 | { |
---|
21 | Set EvalSet(variables,Anything (Set idef) |
---|
22 | { |
---|
23 | Anything DS.I::ReplaceVariable([[ |
---|
24 | Text _.name = Name(idef->X); |
---|
25 | Text _.type = "Serie"; |
---|
26 | Text _.description = ""; |
---|
27 | Text _.expression = "Standard.Variables::"+_.name |
---|
28 | ]]) |
---|
29 | }) |
---|
30 | }; |
---|
31 | |
---|
32 | ////////////////////////////////////////////////////////////////////////////// |
---|
33 | // Standard Inputs |
---|
34 | ////////////////////////////////////////////////////////////////////////////// |
---|
35 | |
---|
36 | Set Standard.Festives = Build.Festives.Struct(Festive.National("Brazil"),6); |
---|
37 | Set Standard.Christmas = Build.Weekly.HolidayStruct(D(1)*M(12),6); |
---|
38 | Set Standard.Summer = Build.Weekly.HolidayStruct(D(1)*M(7),6); |
---|
39 | |
---|
40 | ////////////////////////////////////////////////////////////////////////////// |
---|
41 | // Datasets |
---|
42 | ////////////////////////////////////////////////////////////////////////////// |
---|
43 | |
---|
44 | MMS::@DataSet DS.I.Standard.Festives = MMS::Container::ReplaceDataSet([[ |
---|
45 | Text _.name = "Standard.Festives"; |
---|
46 | Text _.description = "Set of standard input festive variables" |
---|
47 | ]]); |
---|
48 | |
---|
49 | MMS::@DataSet DS.I.Standard.Christmas = MMS::Container::ReplaceDataSet([[ |
---|
50 | Text _.name = "Standard.Christmas"; |
---|
51 | Text _.description = "Set of standard input Christmas variables" |
---|
52 | ]]); |
---|
53 | |
---|
54 | MMS::@DataSet DS.I.Standard.Summer = MMS::Container::ReplaceDataSet([[ |
---|
55 | Text _.name = "Standard.Summer"; |
---|
56 | Text _.description = "Set of standard input summer variables" |
---|
57 | ]]); |
---|
58 | |
---|
59 | Set Add.Standard.Variables(DS.I.Standard.Festives, Standard.Festives); |
---|
60 | Set Add.Standard.Variables(DS.I.Standard.Christmas, Standard.Christmas); |
---|
61 | Set Add.Standard.Variables(DS.I.Standard.Summer, Standard.Summer); |
---|
62 | |
---|
63 | |
---|
64 | ////////////////////////////////////////////////////////////////////////////// |
---|
65 | // End |
---|
66 | ////////////////////////////////////////////////////////////////////////////// |
---|