other representation of time?

Description

Dear Michał,

re possible other representations of time in matsim: we have thought about that multiple times. There seem to be several options:

(1) leave as is (as primitive type)

(2) change to Double (as object type)

(3) change to some class that extends Number (Double itself is final)

(4) change to some "Time" class that exists in the java library

It seems that you can do arithmetic computations only with (1), since there is no overloading of the +, -, *, / operators in Java.

With (2) (and maybe with (3)???) one would at least have autoboxing support. It seems that this addresses most if not all of the problems with arithmetics inside MATSim (I just tried) ... it seems to me that this was different several years back when I tried this before. So this might just be slow.

Todo:

(a) make prototypical change to (2) and test for computational speed

(b) investigate if (3) supports autoboxing. If so, consider decision between (2) and (3)

(c) maybe investigate if a transitition to (4) might be possible without too much blood-shedding. If so, make prototypical change and investigate computational speed.

(d) decide and implement

Any other thoughts?

Best wishes

Kai
[Created via e-mail received from: "Nagel, Kai, Prof. Dr." <nagel@vsp.tu-berlin.de>]

Environment

None

Assignee

Michal Maciejewski

Reporter

Kai Nagel

Labels

None

Priority

Major
Configure