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

More intuitive Smart Data Allocation for custom plans #235

Open
3 tasks done
lfos opened this issue Mar 25, 2024 · 2 comments
Open
3 tasks done

More intuitive Smart Data Allocation for custom plans #235

lfos opened this issue Mar 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lfos
Copy link

lfos commented Mar 25, 2024

Checklist

  • I made sure that there are no similar feature requests - open or closed.
  • I have taken the time to fill in all the required details in an appropriate descriptive way. I understand that the feature request will be dismissed otherwise.
  • This issue contains only one feature request.

Describe the Feature you'd like

Proposal:

  • For custom plans, correctly compute total plan duration, taking into account that (i) first and last day might be partial days and (ii) the total number of days is not necessarily an integer.
  • Take partial days into account when computing daily quota; i.e., allocate quota for actual days (starting/ending at midnight) but have prorated quota for first/last day of the plan.

For example, assume the custom plan starts on Jan 1 @ 10am and ends on Jan 3 @ 4pm:

  • The total duration of the plan is (14+24+16) / 24 = 2.25 days.
  • Assume the plan has 100MB, then on Jan 1, the daily quota should be 100MB * 14 / (14+24+16) ≈ 26MB.
  • Assume the plan still has 100MB left on Jan 2, the daily quota should be 100MB * 24 / (24+16) = 60MB; regardless of the time of day.
  • Assume the plan still has 100MB left on Jan 3, the daily quota should be 100MB.

Why do you want this feature?

If my understanding/observation is correct, the Smart Data Allocation currently computes remaining days based on the time delta to the end date/time (thereby making the exact meaning of "daily quota" slightly counterintuitive) and doesn't take into account that the total duration of a custom plan might be a fraction.

Additional context

Strictly speaking not a feature request -- but I felt this bug type was a slightly better fit than a bug report.

@itsdrnoob
Copy link
Owner

The initial concept behind Smart Data Allocation for a custom plan was to evenly distribute the data across each day, and rollover of any unused data to the following day.

doesn't take into account that the total duration of a custom plan might be a fraction.

Since the data is currently equally distributed among each day, even days with less than 24 hours are treated as full days.

That being said, distributing the plan based on the remaining hours is a viable solution and will definitely look closely into it. Thanks for the proposal.

@lfos
Copy link
Author

lfos commented Apr 1, 2024

@itsdrnoob - Thanks! Somewhat relatedly, the rollover computation seems to have a bug; since only tangential to this FR, I opened a separate issue #238.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants