def carrier_production_max_milp_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier production of MILP techs that aren't conversion plus .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\leq energy_{cap, per unit}(loc::tech) \\times timestep\\_resolution(timestep) \\times \\boldsymbol{operating\\_units}(loc::tech, timestep) \\times \\eta_{parasitic}(loc::tech, timestep) \\quad \\forall loc::tech \\in loc::techs_{milp}, \\forall timestep \\in timesteps :math:`\\eta_{parasitic}` is only activated for `supply_plus` technologies """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] parasitic_eff = get_param(backend_model, 'parasitic_eff', (loc_tech, timestep)) energy_cap = get_param(backend_model, 'energy_cap_per_unit', loc_tech) return carrier_prod <= ( backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap * parasitic_eff )
def carrier_production_max_milp_constraint_rule( backend_model, loc_tech_carrier, timestep ): """ Set maximum carrier production of MILP techs that aren't conversion plus .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\leq energy_{cap, per unit}(loc::tech) \\times timestep\\_resolution(timestep) \\times \\boldsymbol{operating\\_units}(loc::tech, timestep) \\times \\eta_{parasitic}(loc::tech, timestep) \\quad \\forall loc::tech \\in loc::techs_{milp}, \\forall timestep \\in timesteps :math:`\\eta_{parasitic}` is only activated for `supply_plus` technologies """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] parasitic_eff = get_param(backend_model, "parasitic_eff", (loc_tech, timestep)) energy_cap = get_param(backend_model, "energy_cap_per_unit", loc_tech) return carrier_prod <= ( backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap * parasitic_eff )
def carrier_consumption_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier consumption for demand, storage, and transmission techs """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_con = backend_model.carrier_con[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] return carrier_con >= ( -1 * backend_model.energy_cap[loc_tech] * timestep_resolution )
def carrier_production_min_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set minimum carrier production. All technologies except conversion_plus """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] min_use = get_param(backend_model, 'energy_cap_min_use', (loc_tech, timestep)) return carrier_prod >= ( backend_model.energy_cap[loc_tech] * timestep_resolution * min_use )
def carrier_production_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier production. All technologies. """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] parasitic_eff = get_param(backend_model, 'parasitic_eff', (loc_tech, timestep)) return carrier_prod <= ( backend_model.energy_cap[loc_tech] * timestep_resolution * parasitic_eff )
def carrier_consumption_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier consumption for demand, storage, and transmission techs. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{con}}(loc::tech::carrier, timestep) \\geq -1 \\times energy_{cap}(loc::tech) \\times timestep\_resolution(timestep) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_con = backend_model.carrier_con[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] return carrier_con >= (-1 * backend_model.energy_cap[loc_tech] * timestep_resolution)
def carrier_production_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier production. All technologies. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\leq energy_{cap}(loc::tech) \\times timestep\\_resolution(timestep) \\times parasitic\\_eff(loc::tec) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] parasitic_eff = get_param(backend_model, 'parasitic_eff', (loc_tech, timestep)) return carrier_prod <= ( backend_model.energy_cap[loc_tech] * timestep_resolution * parasitic_eff )
def carrier_consumption_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier consumption for demand, storage, and transmission techs. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{con}}(loc::tech::carrier, timestep) \\geq -1 \\times energy_{cap}(loc::tech) \\times timestep\\_resolution(timestep) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_con = backend_model.carrier_con[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] return carrier_con >= ( -1 * backend_model.energy_cap[loc_tech] * timestep_resolution )
def carrier_production_min_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set minimum carrier production. All technologies except ``conversion_plus``. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\geq energy_{cap}(loc::tech) \\times timestep\\_resolution(timestep) \\times energy_{cap,min\\_use}(loc::tec) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] min_use = get_param(backend_model, 'energy_cap_min_use', (loc_tech, timestep)) return carrier_prod >= ( backend_model.energy_cap[loc_tech] * timestep_resolution * min_use )
def carrier_production_min_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set minimum carrier production. All technologies except ``conversion_plus``. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\geq energy_{cap}(loc::tech) \\times timestep\\_resolution(timestep) \\times energy_{cap,min\\_use}(loc::tec) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] min_use = get_param(backend_model, "energy_cap_min_use", (loc_tech, timestep)) return carrier_prod >= ( backend_model.energy_cap[loc_tech] * timestep_resolution * min_use )
def carrier_production_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier production. All technologies. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\leq energy_{cap}(loc::tech) \\times timestep\\_resolution(timestep) \\times parasitic\\_eff(loc::tec) """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] parasitic_eff = get_param(backend_model, "parasitic_eff", (loc_tech, timestep)) return carrier_prod <= ( backend_model.energy_cap[loc_tech] * timestep_resolution * parasitic_eff )
def export_max_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum export. All exporting technologies. .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{export}}(loc::tech::carrier, timestep) \\leq export_{cap}(loc::tech) \\quad \\forall loc::tech::carrier \\in locs::tech::carriers_{export}, \\forall timestep \\in timesteps If the technology is defined by integer units, not a continuous capacity, this constraint becomes: .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{export}}(loc::tech::carrier, timestep) \\leq export_{cap}(loc::tech) \\times \\boldsymbol{operating_{units}}(loc::tech, timestep) """ loc_tech = get_loc_tech(loc_tech_carrier) if loc_tech_is_in(backend_model, loc_tech, "loc_techs_milp"): operating_units = backend_model.operating_units[loc_tech, timestep] else: operating_units = 1 export_cap = get_param(backend_model, "export_cap", loc_tech) return ( backend_model.carrier_export[loc_tech_carrier, timestep] <= export_cap * operating_units )
def carrier_consumption_max_milp_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier consumption of demand, storage, and transmission MILP techs .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{con}}(loc::tech::carrier, timestep) \\geq -1 * energy_{cap, per unit}(loc::tech) \\times timestep\_resolution(timestep) \\times \\boldsymbol{operating\_units}(loc::tech, timestep) \\times \\eta_{parasitic}(loc::tech, timestep) \\quad \\forall loc::tech \\in loc::techs_{milp, con}, \\forall timestep \\in timesteps """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_con = backend_model.carrier_con[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] energy_cap = get_param(backend_model, 'energy_cap_per_unit', loc_tech) return carrier_con >= (-1 * backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap)
def carrier_production_min_milp_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set minimum carrier production of MILP techs that aren't conversion plus .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\geq energy_{cap, per unit}(loc::tech) \\times timestep\_resolution(timestep) \\times \\boldsymbol{operating\_units}(loc::tech, timestep) \\times energy_{cap, min use}(loc::tech) \\quad \\forall loc::tech \\in loc::techs_{milp}, \\forall timestep \\in timesteps """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] min_use = get_param(backend_model, 'energy_cap_min_use', (loc_tech, timestep)) energy_cap = get_param(backend_model, 'energy_cap_per_unit', loc_tech) return carrier_prod >= (backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap * min_use)
def carrier_consumption_max_milp_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set maximum carrier consumption of demand, storage, and transmission MILP techs .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{con}}(loc::tech::carrier, timestep) \\geq -1 * energy_{cap, per unit}(loc::tech) \\times timestep\\_resolution(timestep) \\times \\boldsymbol{operating\\_units}(loc::tech, timestep) \\times \\eta_{parasitic}(loc::tech, timestep) \\quad \\forall loc::tech \\in loc::techs_{milp, con}, \\forall timestep \\in timesteps """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_con = backend_model.carrier_con[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] energy_cap = get_param(backend_model, 'energy_cap_per_unit', loc_tech) return carrier_con >= (-1 * backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap )
def carrier_production_min_milp_constraint_rule(backend_model, loc_tech_carrier, timestep): """ Set minimum carrier production of MILP techs that aren't conversion plus .. container:: scrolling-wrapper .. math:: \\boldsymbol{carrier_{prod}}(loc::tech::carrier, timestep) \\geq energy_{cap, per unit}(loc::tech) \\times timestep\\_resolution(timestep) \\times \\boldsymbol{operating\\_units}(loc::tech, timestep) \\times energy_{cap, min use}(loc::tech) \\quad \\forall loc::tech \\in loc::techs_{milp}, \\forall timestep \\in timesteps """ loc_tech = get_loc_tech(loc_tech_carrier) carrier_prod = backend_model.carrier_prod[loc_tech_carrier, timestep] timestep_resolution = backend_model.timestep_resolution[timestep] min_use = get_param(backend_model, 'energy_cap_min_use', (loc_tech, timestep)) energy_cap = get_param(backend_model, 'energy_cap_per_unit', loc_tech) return carrier_prod >= ( backend_model.operating_units[loc_tech, timestep] * timestep_resolution * energy_cap * min_use )