# 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>]

None

## Assignee

Michal Maciejewski

Kai Nagel

None

Major
Configure
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.831684410572052, "perplexity": 3490.5090864886633}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-34/segments/1596439738864.9/warc/CC-MAIN-20200812024530-20200812054530-00529.warc.gz"}