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

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#418 closed defect (fixed)

Errors loading initial TOL file ./initlibrary/_inittol.tol

Reported by: abroncano Owned by: Víctor de Buen Remiro
Priority: highest Milestone:
Component: TimeSetAlgebra Version: head
Severity: major Keywords:
Cc: César Pérez Álvarez

Description

For instance, it fails with

Serie LunesDelMes_ = CalVar(WD(1), Mensual);

ERROR: [28] Unknown date found while TimeSet $tmp$ cache building as successor ofUnknown
Calculations will be interrumped.

Change History (8)

comment:1 Changed 19 years ago by danirus

Owner: changed from danirus to Víctor de Buen Remiro

Hi Alicia,

Victor is taking care about all bugs related with TimeSet and Series.
Meanwhile we will keep an eye on them.

Cheers, Daniel

comment:2 Changed 19 years ago by Víctor de Buen Remiro

Status: newassigned

This bug was due to a temporary wrong CVS status that was uploaded to last-night version but I think it's already solved. Probably there is a problem of updating of last-night version.
We are working about this bug
Thanks to report it

comment:3 Changed 19 years ago by Víctor de Buen Remiro

Cc: César Pérez Álvarez added

* Bug 421 has been marked as a duplicate of this bug. *

comment:4 Changed 19 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: assignedclosed

CVS version was wrong during just a few minutes but last-night Version was not updated until 2006-07-19 due to the coincidence with the TOL-project web server migration.

Please update your last-night version

comment:5 Changed 19 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: closedreopened

Another problem has been detected about these expressions. The number of mondays along year 2006 is 52 but this code

Serie s1 = SubSer(CalVar(WD(1), Mensual),y2006m01d01,y2006m12d31);
Real n1 = SumS(s1);

returns n1 as 54. Comparing month by month the values of s1 with the true values we can see that april and december have an extra false monday

Mensual thruth s1
y2006m01d01 5 5
y2006m02d01 4 4
y2006m03d01 4 4
y2006m04d01 4 5
y2006m05d01 5 5
y2006m06d01 4 4
y2006m07d01 5 5
y2006m08d01 4 4
y2006m09d01 4 4
y2006m10d01 5 5
y2006m11d01 4 4
y2006m12d01 4 5

52 54

Couriously, the next day of both months, y2006m05d01 and y2007m01d01 are monday. Problem can be reproduce for each CalVar(T1,T2) and fail allways when the next date in T2 is too in T1. So we can think taht there is a frontier problem in CalVar function.

comment:6 Changed 19 years ago by Víctor de Buen Remiro

Bug has been fixed in CVS HEAD.

In btol/serie_type/tsrgrav.cpp, line 251, at function

BDat BTsrCalendary::GetDat(const BDate& dte)

right limit of interval was taken as

BDate next = dte + Dating();

butis needed to scape the frontier that is not a sumable date in a CalVar.

A simple solution is to move a second to past:

next.IncSecond(-1);

comment:7 Changed 19 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: reopenedclosed

Problem has been fixed in CVS.
A best solution is to check if right limit has been counted and then to decrease the returned value.

comment:8 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000418
Note: See TracTickets for help on using tickets.