Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integer tw_stime #58

Closed
JohnPJenkins opened this issue Aug 11, 2015 · 3 comments
Closed

integer tw_stime #58

JohnPJenkins opened this issue Aug 11, 2015 · 3 comments

Comments

@JohnPJenkins
Copy link

Another thought to document...

By having a 64-bit integer tw_stime rather than a floating-point, you can basically eliminate any precision issues while still having a very long time-frame available. For instance, if you work in picoseconds (1e-12), the max time you can have is approx 213 days. Bumping that up to nanoseconds would get you 213,000 days.

Not sure what the implications are of changing this type - I know for example the RNG is floating point. Though I would think that most uses of tw_stime in ROSS are comparisons, as the users drive event times.

@laprej
Copy link
Member

laprej commented Aug 11, 2015

Some of the OMNeT++ documentation discusses some of the benefits of having a 64-bit integer based time representation.

@gonsie
Copy link
Member

gonsie commented Aug 11, 2015

I believe that we use floating points so that users can easily add jitter (via RNG) and avoid ties. Ties would be one negative to switching to integer time-stamps.

@gonsie
Copy link
Member

gonsie commented Sep 18, 2019

resolved by #159 and the new TW_STIME API

Model developers now can use their own tw_stime types. Thus, it would be up to the model to decide if a 64-bit integer is appropriate.

@gonsie gonsie closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants