| | 17 | |
| | 18 | '''Código en MMS_0.5''' |
| | 19 | |
| | 20 | {{{ |
| | 21 | #!java |
| | 22 | // Se crea el objeto previsión: |
| | 23 | Real MMS::CreateForecast([[ |
| | 24 | Text _.name = <nombre>; |
| | 25 | @MMS.Estimation _.estimation = estimation; |
| | 26 | @MMS.SettingsEstimate _.settings = [[ |
| | 27 | Real _.showTraces = False |
| | 28 | ]] // -> Previsión puntual |
| | 29 | ]]); |
| | 30 | @MMS.Forecast forecast = MMS::GetForecast([[ |
| | 31 | estimation::GetModel(?)::GetName(0), |
| | 32 | estimation::GetModel(?)::GetVersion(0), |
| | 33 | <nombre> |
| | 34 | ]]); |
| | 35 | |
| | 36 | //Se definen los intervalos de previsión |
| | 37 | Real forecast::SetForecastInterval( |
| | 38 | ?, // para todos los outputs |
| | 39 | <firstForecast>, // fecha inicial |
| | 40 | <lastForecast> // fecha final |
| | 41 | ); |
| | 42 | |
| | 43 | //Se ejecuta la previsión |
| | 44 | Real forecast::Execute(?) |
| | 45 | }}} |
| | 46 | |
| | 47 | '''Código en MMS_0.6''' |
| | 48 | |
| | 49 | {{{ |
| | 50 | #!java |
| | 51 | // Se crea el objeto previsión: |
| | 52 | MMS::@Forecast forecast = MMS::Container::CreateForecast([[ |
| | 53 | Text _.name = <nombre>; |
| | 54 | MMS::@Estimation _.estimation = estimation; |
| | 55 | // Settings: |
| | 56 | Text _.mode = "Point"; // -> Previsión puntual |
| | 57 | // Intervalos de previsión: |
| | 58 | Set _.fIntervals = [[ |
| | 59 | Set [["*", <firstForecast>, <lastForecast>]] // para todos los submodelos |
| | 60 | ]] |
| | 61 | ]]); |
| | 62 | |
| | 63 | //Se ejecuta la previsión |
| | 64 | Real forecast::Execute(?) |
| | 65 | }}} |