close Warning: Can't synchronize with repository "(default)" (/var/svn/mms does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 13 years ago

Closed 13 years ago

#839 closed defect (fixed)

Problemas con GetDependences_ToLevel en nivel 3

Reported by: atorre Owned by: Pedro Gea
Priority: blocker Milestone: Release 0.6
Component: Variables Keywords: variables, dependencias, niveles
Cc: prcoco.bbvasp@…

Description

Hola MMS,
Por favor, revisar la función GetDependences_ToLevel. Creo que no funciona correctamente cuando hay varios niveles.

Lo podéis ver en el siguiente código que parte de un DataSet auxliar ya creado:

NameBlock ds = MMS::Container::GetDataSet(1);

Set For(1, 8, NameBlock(Real n)
{
  NameBlock ds::CreateVariable([[
    Text _.type = "Serie";
    Text _.name = "Var000"+ IntText(n);
    Text _.description = "";
    Text _.expression = "Serie CalVar(Diario, Mensual)"
  ]])
});


Set For(1, 4, NameBlock(Real n)
{
  NameBlock ds::CreateVariable([[
    Text _.type = "Serie";
    Text _.name = "Var00"+ IntText(n) +"0";
    Text _.description = "";
    Text _.expression = "Serie %1+%2";
    Set _.dependences = SetOfText("Var000"+IntText(n), "Var000"+IntText(n+1))
  ]])
});

NameBlock Var0100 = ds::CreateVariable([[
  Text _.type = "Serie";
  Text _.name = "Var0100";
  Text _.description = "";
  Text _.expression = "Serie %1+%2";
  Set _.dependences = SetOfText("Var0010", "Var0020")
]]);

NameBlock Var0200 = ds::CreateVariable([[
  Text _.type = "Serie";
  Text _.name = "Var0200";
  Text _.description = "";
  Text _.expression = "Serie %1+%2";
  Set _.dependences = SetOfText("Var0030", "Var0040")
]]);

NameBlock Var1000 = ds::CreateVariable([[
  Text _.type = "Serie";
  Text _.name = "Var1000";
  Text _.description = "";
  Text _.expression = "Serie %1+%2";
  Set _.dependences = SetOfText("Var0100", "Var0200")
]]);

Set DepN1 = Var1000::GetDependences_ToLevel(1);
Set DepN2 = Var1000::GetDependences_ToLevel(2);
Set DepN3 = Var1000::GetDependences_ToLevel(3);
Set DepN4 = Var1000::GetDependences_ToLevel(4);
Set DepN_ = Var1000::GetDependences_ToLevel(?);

El conjunto DepN3 no contiene todas las variables Var0001, Var0002, ..., Var0008, sólo contiene a Var0001 y a Var0005.

Change History (3)

comment:1 Changed 13 years ago by Pedro Gea

Milestone: Development 1ARelease 0.6
Status: newaccepted

comment:2 Changed 13 years ago by Pedro Gea

Se trata de un bug en la función interna del álgebra de conjuntos encargada de hacer la diferencia de conjuntos para el caso en el que éstos presentan elementos repetidos.

comment:3 Changed 13 years ago by Pedro Gea

Resolution: fixed
Status: acceptedclosed

(In [2848]) Se corrige la función Difference_Eq para evitar problemas con conjuntos con elementos repetidos.
Closes #839

Note: See TracTickets for help on using tickets.