﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc
244	Problemas com a função MMS::RemoveEstimations()	Daniel Noce da Silva		"1-

Considere uma estimação e sua respectiva previsão carregadas no MMS. O valor do Real MMS::RemoveEstimation(""Mat.Veh__1.0__BSR"") é 1. Quando vamos fazer o mesmo para a previsão Real MMS::RemoveEstimation(""Mat.Veh__1.0__Veh.Tur.Mat__1.0__BSR"");
retorna 0. No entanto, a previsão é removida. O mesmo acontece quando estas duas linhas sao compiladas na ordem inversa.

Text nameSubModel = ""Veh.Tur.Mat__1.0__BSR"";
Text outputName = ""Veh.Tur.Mat"";

Real MMS::CreateForecast([[
      Text _.name = nameSubModel;
      @MMS.Estimation _.estimation =  estBSR;
      @MMS.SettingsEstimate _.settings = [[
        Real _.showTraces = False
      ]]

    ]]);

    Date endEst = estBSR::GetModel_(?)::GetOutput(outputName)::GetLast(?);
    Date beginPrev = Succ(endEst,Mensual,1);
    Date endPrev = Succ(endEst,Mensual,20);

    Text name = estBSR::GetModel_(?)::GetName(?);
    Text version = estBSR::GetModel_(?)::GetVersion(?);
    @MMS.Forecast forecast =
      MMS::GetForecast([[name,version,nameSubModel]]);

    Real forecast::SetForecastInterval(?, beginPrev, endPrev);
    Real forecast::Execute(?);
    Real forecast::Store(Ois.DefRoot+""MMS/Forecast/""+forecast::GetIndex(?)+"".oza"");

// Aqui esta o problema:

MMS::RemoveEstimation(""Mat.Veh__1.0__BSR"");
MMS::RemoveEstimation(""Mat.Veh__1.0__Veh.Tur.Mat__1.0__BSR"");

2-
Há variáveis input que precisam de uma previsão. Temos uma função que carrega as previsoes e estimações para gerar estes inputs. Apos gerar os inputs estas estimações são removidas. Quando esta função é chamada dentro da estimação acontece o seguinte erro:


ERROR: [1] Corrupted method DirectFunction
Possibly this problem is due to a non standard use of OOP, if this function was assigned to a member of type Code of a NameBlock or Class instance that has been destroyed already.</E>


Mesmo quando a serie é obtida da seguinte forma:

 Serie output = Copy(results::GetOutput(submodel))


 "	defect	new	blocker		Estimation			
