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

待ち時間計算を修正 #145

Open
Harineko0 opened this issue Nov 9, 2023 · 0 comments
Open

待ち時間計算を修正 #145

Harineko0 opened this issue Nov 9, 2023 · 0 comments

Comments

@Harineko0
Copy link
Contributor

案1

待ち時間計算の修正案

aを初期値0の整数として、aは注文追加ごとに参照、DBに保存する

待ち時間 = 最も長い待ち時間 + 平均制作時間 * 切り上げ{ (a + 商品合計数) / バリスタ数 }
a = (a + 商品数合計) % バリスタ数

例) バリスタ3人

  • 1番注文: 5分が1個
    待ち時間 = 0 + 5 * 切り上げ{(0 + 1) / 3} = 5分
    a = (0 + 1) % 3 = 1

  • 2番注文: 5分が2個
    待ち時間 = 5 + 5 * 切り上げ{ (1 + 2) / 3 } = 15分

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

1 participant