#374 closed defect (fixed)
Unordered timeset problem.
Reported by: | jimarin | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | TimeSetAlgebra | Version: | 1.1.3 |
Severity: | major | Keywords: | |
Cc: |
Description
Hi all,
the following code seems buggy to us.
Set fechas = SetOfDate(y2006m03d10, y2006m03d03, y2006m03d6);
Date FecIni= y2006m03d01;
Date FecFin= y2006m03d08;
Set fechasAux = Unique(SetOfDate(FecIni)+fechas+SetOfDate(FecFin));
TimeSet Lista = DatesOfSet(fechasAux);
Set sFecRango = Dates(Lista, FecIni,FecFin);
The main problem is that the set of dates is not chronologically ordered.
A timeset built from the unordered dates set is not well behaved as it is shown in
the example by the Dates function call.
Moreover, the Dates function call gives you different results depending on the tol
version you are using (the latest ones give you a date which is out of the desired
range).
We know that a possible workaround is not to play with unordered date sets, but
we wonder if this could be a bug against the specification of timeset definition.
The main credit for tracking this bug down must go to Isabel Izquierdo.
We should give, if we had not alrady, an account to her in bugszilla.
Best regards to all,
jima
Change History (3)
comment:1 Changed 19 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:2 Changed 19 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Bug has been fixed
Dates are internally sorted at TimeSet building time. In addition, methods
Includes, Successor and Predecessor of BTmsDatesOfSet will take advantage of
this fact by using binary search.
comment:3 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000374 |
---|
We are working about this improvement.
Thanks to report it