def _test_create_storage_slate_feedstock_only(): commodity_dict = {} commodity_dict["soy"] = xtot_objects.Commodity("soy", "tons") commodity_dict["corn"] = xtot_objects.Commodity("corn", "tons") commodity_dict["wheat"] = xtot_objects.Commodity("wheat", "tons") slate = xtot_objects.Storage_Slate(commodity_dict) return slate
def _test_create_commodity_slate2(): commodity_dict = {} commodity_dict["jet"] = xtot_objects.Commodity("jet", "bbl") commodity_dict["diesel"] = xtot_objects.Commodity("diesel", "bbl") commodity_dict["corn"] = xtot_objects.Commodity("corn", "tons") commodity_dict["wheat"] = xtot_objects.Commodity("wheat", "tons") c = xtot_objects.Commodity_Slate(commodity_dict) return c
def _test_create_feedstock_slate(logger, commodity_name_1, units_name_1, daily_supply_1, commodity_name_2, units_name_2, daily_supply_2): feedstock_dict = {} feedstock_dict[commodity_name_1] = (xtot_objects.Commodity(commodity_name_1, units_name_1), daily_supply_1) feedstock_dict[commodity_name_2] = (xtot_objects.Commodity(commodity_name_2, units_name_2), daily_supply_2) p_slate = xtot_objects.PreProcessor_Slate(feedstock_dict) return p_slate
def _test_create_storage_slate(): commodity_dict = {} commodity_dict["gasoline"] = xtot_objects.Commodity("gasoline", "bbl") commodity_dict["diesel"] = xtot_objects.Commodity("diesel", "bbl") commodity_dict["corn"] = xtot_objects.Commodity("corn", "tons") commodity_dict["wheat"] = xtot_objects.Commodity("wheat", "tons") slate = xtot_objects.Storage_Slate(commodity_dict) return slate
def _test_create_processor_slate_soy(): # creates 2bbl gasoline and 3 bbl diesel from 5 tons corn and 1 ton wheat output_commodity_dict = {} output_commodity_dict["gasoline"] = (xtot_objects.Commodity("gasoline", "bbl"), 3.0) output_commodity_dict["diesel"] = (xtot_objects.Commodity("diesel", "bbl"), 2.0) input_commodity_dict = {} input_commodity_dict["corn"] = (xtot_objects.Commodity("corn", "tons"), 4.0) input_commodity_dict["soy"] = (xtot_objects.Commodity("soy", "tons"), 1.0) slate = xtot_objects.Processor_Slate(input_commodity_dict, output_commodity_dict) return slate
def _test_create_feedstock_slate_2(logger): feedstock_dict = {} corn_supply = 100000 corn_units ="tons" feedstock_dict["corn"] = (xtot_objects.Commodity("corn", corn_units), corn_supply) wheat_supply = 100000 wheat_units = "tons" feedstock_dict["wheat"] = (xtot_objects.Commodity("wheat", wheat_units), wheat_supply) p_slate = xtot_objects.PreProcessor_Slate(feedstock_dict) return p_slate
def _test_create_final_destination_slate(): product_dict = {} gasoline_demand = 250000 gasoline_units ="bbl" gasoline_udp = 10 product_dict["gasoline"] = (xtot_objects.Commodity("gasoline", gasoline_units), gasoline_demand, gasoline_udp) diesel_demand = 150000 diesel_units = "bbl" diesel_udp = 10 product_dict["diesel"] = (xtot_objects.Commodity("diesel", diesel_units), diesel_demand, diesel_udp) return xtot_objects.Final_Destination_Slate(product_dict)
def _test_create_feedstock_slate_1(logger): feedstock_dict = {} gasoline_supply = 100000 gasoline_units ="bbl" feedstock_dict["gasoline"] = (xtot_objects.Commodity("gasoline", gasoline_units), gasoline_supply) diesel_supply = 100000 diesel_units = "bbl" feedstock_dict["diesel"] = (xtot_objects.Commodity("diesel", diesel_units), diesel_supply) #logger.info(feedstock_dict) p_slate = xtot_objects.PreProcessor_Slate(feedstock_dict) #logger.info(p_slate.asText()) #logger.info(p_slate) return p_slate
def _test_create_commodity(name, units): return xtot_objects.Commodity(name, units)