-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
While Python, Julia and SpineOpt all handle month and year correctly for Duration parameter (in Python using dateutils.relativedelta), there are some drawbacks:
- months and years have changing duration --> most models don't know how to deal with those (user could use them and get weird behaviour)
- Python's dateutils.relativedelta (and probably Julia's equivalent) is slower than datetime.timedelta, since the latter does not deal with complex if clauses
Our options:
- keep doing as now (use relativedelta, leave it to user not to srew-up), but:
- improve documentation
- add a warning note where appropriate
- implement timedelta as the default parameter type for Duration (leave relativedelta as an option)
- speed improvement should be tested
- switch completely to timedelta
- check if anyone is using months or years as Duration in their models - and are these important use cases where the workaround is non-satisfactory
Relates to: #319