Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding depreciation values isn't working #64

Closed
arnaud-leroy opened this issue Aug 11, 2017 · 3 comments
Closed

Overriding depreciation values isn't working #64

arnaud-leroy opened this issue Aug 11, 2017 · 3 comments

Comments

@arnaud-leroy
Copy link

Hello,

I try to overwrite the plant_life and monetary.interest for a technology but it isn't changing the cost-result for that technology.

locations.yaml:

locations:
    L1:
        techs: [
         'supply_power',
         'demand_power',
         'unmet_demand_power'
         ]
        override:
            demand_power.constraints.r: -10
            supply_power.depreciation.plant_life: 4
            supply_power.depreciation.interest.monetary: 0.5

techs.yaml:

techs:
    supply_power:
        name: 'Electricity import'
        parent: supply
        carrier: power
        constraints:
            r: inf
            e_cap.max: inf
        costs:
            monetary:
                e_cap: 10
                om_fuel: 1 # €/MWh electricity price
        depreciation:
            plant_life: 20  # Lifetime of a plant (years)

    demand_power:
        name: 'Electrical demand'
        parent: demand
        carrier: power

    unmet_demand_power:
        name: 'Unmet electrical demand'
        parent: unmet_demand
        carrier: power
@brynpickering
Copy link
Member

I have noticed that the calculation of the deprecation rate is location agnostic here:

def depreciation_getter(option_getter_func):
    def get_depreciation_rate(y, k):
        interest = option_getter_func(
            y + '.depreciation.interest.' + k,
            default=y + '.depreciation.interest.default')
        plant_life = option_getter_func(y + '.depreciation.plant_life')
        if interest == 0:
            dep = 1 / plant_life
        else:
            dep = ((interest * (1 + interest) ** plant_life)
                   / (((1 + interest) ** plant_life) - 1))
        return dep
    return get_depreciation_rate

I'll update it for the 0.5.3 release. For now you should be able to change these settings at a technology level, just without the location-specific override.

@arnaud-leroy
Copy link
Author

Thanks!
Yes, Putting it for each technology is working.

brynpickering added a commit that referenced this issue Aug 11, 2017
@brynpickering
Copy link
Member

Fixed in 77a0930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants