修正3电站钱书比计算

This commit is contained in:
zhbaor 2023-08-14 13:25:57 +08:00
parent 6311b892af
commit 4e25f4c31b

View file

@ -105,6 +105,8 @@ class RIICReportAnalysis:
gold_avg = 0 gold_avg = 0
exp_avg = 0 exp_avg = 0
external_gold = 5000 external_gold = 5000
external_lmb = 43483
external_exp = 36284
try: try:
exp_list += [["manual", "0"]] * (len(date_list) - len(exp_list)) exp_list += [["manual", "0"]] * (len(date_list) - len(exp_list))
@ -131,7 +133,9 @@ class RIICReportAnalysis:
overflow_gold_by_e = gold_avg - balanced_gold_by_e overflow_gold_by_e = gold_avg - balanced_gold_by_e
more_exp_by_e = overflow_gold_by_e * 0.8 more_exp_by_e = overflow_gold_by_e * 0.8
balanced_exp_by_e = exp_avg + more_exp_by_e balanced_exp_by_e = exp_avg + more_exp_by_e
lmb_exp_ratio_by_e = (lmb_avg + 43483) / (balanced_exp_by_e + 36284) lmb_exp_ratio_by_e = (lmb_avg + external_lmb) / (
balanced_exp_by_e + external_exp
)
total_by_e = lmb_avg + balanced_exp_by_e total_by_e = lmb_avg + balanced_exp_by_e
gold_by_order = order_avg * 0.2 * 500 gold_by_order = order_avg * 0.2 * 500
@ -139,8 +143,8 @@ class RIICReportAnalysis:
overflow_gold_by_order = gold_avg - balanced_gold_by_order overflow_gold_by_order = gold_avg - balanced_gold_by_order
more_exp_by_order = overflow_gold_by_order * 0.8 more_exp_by_order = overflow_gold_by_order * 0.8
balanced_exp_by_order = exp_avg + more_exp_by_order balanced_exp_by_order = exp_avg + more_exp_by_order
lmb_exp_ratio_by_order = (lmb_avg + 43483) / ( lmb_exp_ratio_by_order = (lmb_avg + external_lmb) / (
balanced_exp_by_order + 36284 balanced_exp_by_order + external_exp
) )
total_by_order = lmb_avg + balanced_exp_by_order total_by_order = lmb_avg + balanced_exp_by_order
@ -160,19 +164,18 @@ class RIICReportAnalysis:
output += f"钱书比例:{lmb_exp_ratio_by_order:.2f}\n" output += f"钱书比例:{lmb_exp_ratio_by_order:.2f}\n"
output += f"调平总和:{total_by_order:.0f}\n\n" output += f"调平总和:{total_by_order:.0f}\n\n"
if power_plants == 3: if power_plants == 3:
if exp_avg != 0: output += f"钱书比例:{(lmb_avg + external_lmb) / (exp_avg + external_exp):.2f}"
output += f"钱书比例:{lmb_avg / exp_avg:.2f}"
else:
output += f"钱书比例:正无穷"
else: else:
balanced_gold = lmb_avg - external_gold balanced_gold = lmb_avg - external_gold
overflow_gold = gold_avg - balanced_gold overflow_gold = gold_avg - balanced_gold
more_exp = overflow_gold * 0.8 more_exp = overflow_gold * 0.8
balanced_exp = exp_avg + more_exp balanced_exp = exp_avg + more_exp
if power_plants == 2: if power_plants == 2:
lmb_exp_ratio = (lmb_avg + 43483) / (balanced_exp + 36284) lmb_exp_ratio = (lmb_avg + external_lmb) / (
balanced_exp + external_exp
)
else: else:
lmb_exp_ratio = (lmb_avg + 43483) / (exp_avg + 36284) lmb_exp_ratio = (lmb_avg + external_lmb) / (exp_avg + external_exp)
total = lmb_avg + balanced_exp total = lmb_avg + balanced_exp
output += "====计算结果====\n" output += "====计算结果====\n"