Skip to content

No longer working for forecast length > time interval #603

@tsmbland

Description

@tsmbland

If the forecast length is set to greater than the time interval, the model doesn't work any more (no investments).

Previously, this bit of code would get demands for the forecast year:

# > to sector timeslice
        market = self.convert_market_timeslice(
            mca_market.sel(
                commodity=self.technologies.commodity, region=self.technologies.region
            ).interp(
                year=sorted(
                    {
                        current_year,
                        current_year + time_period,
                        current_year + self.forecast,
                    }
                ),
                **self.interpolation,
            ),
            self.timeslices,
        )

I got rid of this in v1.3.0, so now demands for the forecast year are unspecified/blank unless the forecast length equals the time period. This gets interpreted as zero demands, so no investments are made. Oops (although we're changing how forecast is done anyway so maybe it's fine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions