Here's the totals I'll apparently need:
All heavy oil -> light oil
10500 light oil -> solid fuel
remaining light oil -> petroleum gas
29850 petroleum gas -> plastic bars
2325 petroleum gas -> sulfur
These are the results I have for breaking even:
Crude oil: 43680/m or 728/s
Oil Refineries: 364
Heavy Oil Cracking: 91
Light Oil Cracking: 344
For the record, here's the code I used, it isn't perfect but I think it works alright in this case:
Code: Select all
from __future__ import division
import math
def calculate_oil_needed(petrol, light, heavy):
num_refineries = 0
remaining_petrol = -1
while remaining_petrol < 0:
num_refineries += 1
heavy_processing = int(math.ceil((12 * num_refineries - heavy) / 48))
light_processing = int(math.ceil((54 * num_refineries - light + 36 * heavy_processing) / 36))
remaining_petrol = 66 * num_refineries - petrol + 24 * light_processing
return {'Refineries': num_refineries, 'Crude Oil': num_refineries * 120, 'Heavy Oil Cracking': heavy_processing, 'Light Oil Cracking': light_processing}
print calculate_oil_needed(29850 + 2325, 10500, 0)