Opened 20 years ago
Closed 20 years ago
#212 closed defect (invalid)
Problema con series en minutal
Reported by: | maarranz | Owned by: | danirus |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | TimeSetAlgebra | Version: | head |
Severity: | normal | Keywords: | |
Cc: |
Description
el resultado de ste código no es correcto en el tol actual, pero sí funcionaba
bien en el antiguo. Puede que el problema esté en la función CalInd
TimeSet Minutal = S(0);
Serie ser1 = SubSer(CalInd(C,Minutal),y2004m01d01,y2004m01d02);
Serie ser2 = SubSer(CalInd(C,Diario),y2004m01d01,y2004m01d02);
Serie ser3 = InvCh(ser2, ser1);
Serie ser4 = Expand(ser3);
Real SumS(ser4);
La serie ser1 debería ser con todos los elementos iguales a 1, y la suma 1441.
El resultado obtenido es que sólo el primer y último elemento son iguales a 1.
Change History (4)
comment:1 Changed 20 years ago by
Status: | new → assigned |
---|
comment:2 Changed 20 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 20 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
There is a mistake using CalInd with "C" and "S(0)" variables.
You can resolve this situation with Tol code like this:
Serie ser1 = SubSer(CalInd(Minutal,Minutal),y2004m01d01,y2004m01d02);
Then we are not going to consider this report as a bug.
comment:4 Changed 20 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
After talk with the sender we decide this is not formerly a bug.
This bug has been just resolved. Although this is a not-bad solution for the
problem, a better approach will be ready with the next generation of Time
Algorithms.
In order to have working that code, you must use a new TimeSet Tol variable
called "WTMin" (that means "whole time in minutes") in the next way:
TimeSet Minutal = S(0);
Serie ser1 = SubSer(CalInd(WTMin,Minutal),y2004m01d01,y2004m01d02);
Serie ser2 = SubSer(CalInd(C,Diario),y2004m01d01,y2004m01d02);
Serie ser3 = InvCh(ser2, ser1);
Serie ser4 = Expand(ser3);
Real SumS(ser4);
I mean, don't use "C" TimeSet to refer to all minutes, you must use "WTMin" to
refer them.