def emission_objective(model):
    """
    The emission objective calculates the total emissions.
    the total emissions are equal to the amount of energy bought from which supplier * load hours * carbon emissions per MWh
    :param model: model reference
    :return: total emissions
    """
    total_emissions = []
    for year in model.YEARS:
        for supplier in model.SUPPLIER:
            for block in model.BLOCKS:
                emission = model.buy[year, supplier, block] * model.carbon_emissions[supplier] * model.load_hours[block]

                total_emissions.append(emission)

    return sum(total_emissions)