【Lua 代码】计算机组成本

来源:互联网 发布:淘宝网男装潮款 编辑:程序博客网 时间:2024/05/17 03:14
  1. risk = 0
  2. eff = 1
  3. csi_steam = 70 -- 单位电能标准燃价:元/MWh--推荐70元/MWh
  4. csi_hydro = csi_steam --also small-hydro
  5. csi = csi_hydro
  6. a1=0.982
  7. a2=0.407
  8. b0=17
  9. installprice = 6178
  10. cost_a = risk + a2 / eff
  11. cost_b = a1 * csi / eff
  12. cost_c = b0 / eff + installprice * 0.002313
  13. print("成本系数:",cost_a, cost_b, cost_c)
  14. bidrule = 1 -- 1:等微增率 0:等报价
  15. factor = 2
  16. if bidrule ~= 1 then bidrule = 1 end
  17. transfee = 30 -- default
  18. expGain = 0 -- 期望收益
  19. bid_a = factor * cost_a
  20. bid_b = cost_b + cost_c + transfee + expGain
  21. p_test = 200
  22. p_max = 800
  23. print("成交量:", p_test)
  24. print("报价系数(合同和现货):", bid_a, bid_b)
  25. print("成交价:", bid_a * p_test + bid_b)
  26. print("成本:", cost_a * p_test ^ 2 + (cost_b + transfee) * p_test + cost_c * p_max)
  27. new_a = cost_a
  28. new_b = cost_b + transfee
  29. new_c = cost_c * p_max
  30. print("新成本系数:", new_a, new_b, new_c)
  31. new_bidb = new_b + new_c / p_max + new_a * p_max
  32. print("新竞标系数:", new_bidb)
  33. -- print("成交额:", (bid_a * p_test + bid_b) * p_test) -- 单一市场时