• 82 views | 2 messages Discussion: LEAP
    Topic: Interp problem in LEAP 2015Subscribe | Previous | Next
  • Gregers Larsen 11/9/2015

    673 Views

    Hello all!

    I have some problems with the interp() function after changing LEAP version to 2015 versions.

    As shown in the picture, the input runs amok the year after my base year, increasing results about a factor 100 or more. This has also happened in my Key Assumptions and has nothing to do with the data input, as it only occurs in a year between data points. It influences results, what can I do?

    Gregers

    Udklip.PNG
  • Taylor Binnington 11/13/2015
      Best Response

    672 Views

    Hi Gregers,

    In general, you should be careful about using time-series functions like Interp() embedded in other expressions. The value in the base year is implicitly taken as the Interp() function's starting point, from which it interpolates forward.

    http://www.energycommunity.org/WebHelpPro/Expressions/Interp.htm

    This means that when entered in a scenario other than Current Accounts, an expression such as:

    Interp(2030, Z)

    ...should be interpreted as "a straight line from the value of the variable in the base year, through the value of Z in 2030". With this in mind, it is clear that the following two expressions are actually different for LEAP, even if (at first) they appear mathematically equivalent:

    Eqn. [1]: Interp(2030, Z * X)
    Eqn. [2]: Interp(2030, Z) * X

    Eqn. [1] is a straight line between the base year value and Z * X in the year 2030, while Eqn. [2] is a straight line between the base year value and Z, *all of which is then multiplied by the value X*.

    To get around this, you have two options:
    a) Insert the multiplicative factor X inside each of the terms in the Interp() function, or
    b) Include a year-and-value pair in the Interp() arguement for the first scenario year, which fixes the value in the from which the function will interpolate in that year.

    Hope this is useful,
    Taylor