ソースを参照

Fix excel export and optimization tests

Eren Yilmaz 1 年間 前
コミット
eedd1a290f
2 ファイル変更10 行追加0 行削除
  1. 0 0
      Code/README.md
  2. 10 0
      tool_lib/price_estimator.py

+ 0 - 0
Code/README.md


+ 10 - 0
tool_lib/price_estimator.py

@@ -0,0 +1,10 @@
+from math import log
+
+
+def price(num_operators: int, base_price=15, discount_per_doubling=0.9):
+    return base_price * num_operators * discount_per_doubling ** log(num_operators, 2)
+
+
+if __name__ == '__main__':
+    for i in [1, 2, 3, 5, 10, 20, 40, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000]:
+        print(f'{i} operators: {price(i):,.2f} €')