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

Time experiments #847

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Time experiments #847

wants to merge 2 commits into from

Conversation

RomeshA
Copy link
Contributor

@RomeshA RomeshA commented Jan 28, 2025

Work in progress branch for brainstorming ways to make working with durations/rates a bit more automatic and safer by reducing reliance on the parent dt.

API examples are currently in starsim/time.py (that file can be run directly as a demo)

Still in progress, the Time class with the time arrays and dists still need a little work before the models can be run. The current plan would be for Dist objects to have pars that retain their original units, and then to internally do conversion to their parent dt and cache the bare values for use with rvs() (so they would still return bare values for consumption by their parent module, for performance reasons. It seems like it would not be practical for Dist objects to return arrays of dur/rate/other objects). But other modules could check the dist object to access the parameter values with full duration information without having to also convert using the correct parent dt)

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

Successfully merging this pull request may close these issues.

1 participant