Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. def get_income_oil(targets, depth):
  2. price = 4.15
  3. rho = 860
  4. S = 100
  5. porosity = 0.7
  6. diff = np.concatenate([np.asarray([0.0895]) ,np.diff(depth)])
  7. return porosity*price*rho*S*np.sum(targets*diff)
  8.  
  9. def get_expected_income_oil(probs, depth):
  10. price = 4.15
  11. rho = 860
  12. S = 100
  13. porosity = 0.7
  14. diff = np.concatenate([np.asarray([0.0895]) ,np.diff(depth)])
  15. return porosity*price*rho*S*np.sum(probs*diff)
  16.  
  17. def get_costs_research(features, depth):
  18. costs = {'bk': 2450,
  19. 'GZ1':2050,
  20. 'GZ2':2050,
  21. 'GZ3':2050,
  22. 'GZ4':2050,
  23. 'GZ5':2050,
  24. 'GZ7':2050,
  25. 'DGK':1300,
  26. 'NKTD':2050,
  27. 'NKTM':2050,
  28. 'NKTR':2050,
  29. 'ALPS':1150}
  30. cost = 0
  31. diff = np.diff(depth)
  32. for fea in features:
  33. cost += costs[fea]
  34. return np.sum(cost*diff)
  35.  
  36. def get_check_costs(depth, cost):
  37. diff = np.diff(depth)
  38. return np.sum(cost*diff)
  39.  
  40. def get_overall_income(goals, depth, features, cost):
  41. research_costs = get_costs_research(features, depth)
  42. oil_income = get_income_oil(goals, depth)
  43. check_costs = get_check_costs(depth, cost)
  44. income = oil_income - check_costs - research_costs
  45. return income
  46.  
  47. def get_decision(probs, depth, feature_names, cost):
  48. research_costs = get_costs_research(features, depth)
  49. decision
  50. oil_income = get_income_oil(decision, depth)
  51. check_costs = get_check_costs(depth, cost)
  52. return oil_income
  53.  
  54. def get_overall_expected_income(probs, depth, features, cost):
  55. research_costs = get_costs_research(features, depth)
  56. oil_income = get_expected_income_oil(probs, depth)
  57. check_costs = get_check_costs(depth, cost)
  58. income = oil_income - check_costs - research_costs
  59. return income
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement