• 723 views | 11 messages Discussion: LEAP
    Topic: expression building Subscribe | Previous | Next
  • Argiro Roinioti 4/27/2011

    2442 Views

    Hello,


    I have been trying to build an Interpolation function, but an error occurs.
    In the Final Energy Intensity section, I always divide the energy consumption to the Activity level.

    In the Scenario I am currently building I am trying to insert this function:

    Interp(2020,0.01 Million/Demand\Transport\Railway:Activity Level[Million pass-km]),
    but the programme cannot accept it.The units are Toe per passenger-km.
    The activity level of course is not constant and is also changing in the future.

    Is it possible to express this somehow in LEAP?

    Thank you in advance.


    Sincerely,

    Argiro
  • Tory Clark 4/27/2011
      Best Response

    2441 Views

    Hi Argiro,

    I wonder if the issue is related to units. It looks like you are entering the energy consumption in manually (i.e. 0.01 million). Instead of doing this, I recommend creating a user variable called Total Energy that contains this data in toe. Then you will easily be able to create a formula for final energy intensity to look something like the following:

    Total Energy/Activity Level

    or

    Total Energy/Total Activity

    Best,

    Tory
  • Argiro Roinioti 4/27/2011
      Best Response

    2436 Views

    Hello Tory,

    I appreciate your responding so quickly.
    If I have 3 different projected levels of each fuel (let's say reference, optimistic and pessimistic), does this mean I have to create 3 seperate user variables - levels at the Key Assumptions branch, for each fuel in the Demand section?


    Best Regards,

    Argiro
  • Tory Clark 4/28/2011
      Best Response

    2430 Views

    It sounds like your 3 projected levels should be scenarios, meaning that you would only have to make 1 user variable.

    Note that user variables are different than key assumptions:

    User Variables: http://tinyurl.com/6c5doth

    Tory
  • Argiro Roinioti 4/28/2011
      Best Response

    2428 Views

    Hello again,

    I don't quite understand how I could use user variables for this purpose. However, it finally accepted the expression written like this:

    Interp(2020, 0.01 Million)/Demand\Transport\Railway:Activity Level[Million pass-km]


    Argiro
  • Argiro Roinioti 4/29/2011
      Best Response

    2420 Views

    Tory,

    Hello again. I am still having trouble inserting some expressions in the Final Energy Intensity. As I have already mentioned, in the Final Energy Intensity I am always diving the total energy consumption of the particular fuel/branch to the total activity of the branch (e.g. railway:passengers/km).

    I want to link the growth of electricity consumption to the growth of GDP. However, when I insert the following function the final energy intensity becomes zero.

    GrowthAs(Key\GDP\GDP ref,1)/Demand\Transport\Railway:Activity Level[pass-km]

    The GDP series if from an excel file I have linked to LEAP, and there seems to be no problem with that. Have you got any suggestions?


    Thank you in advance.


    Argiro
  • Tory Clark 4/29/2011
      Best Response

    2418 Views

    Hi Argiro,

    In response to your question above (from 4/28) I was suggesting that you create a new variable to enter your total energy consumption rather than entering it in manually as you are doing now. It is not necessarily better, it is just more transparent to someone using your model and it allows you more flexibility in the variables you can change in future scenarios.

    I have posted a simple example of this in an area named "Total Energy User Variable Example" You can get it from the Area: Install: Install from Internet menu.

    The equation that you have entered is a bit confusing. It should be a valid equation (i.e. it should not show up red), but it is possible that the value that is seemingly zero because you are dividing a final energy intensity by total passenger kilometers (to check this just increase the decimal places on the table view). If you want to project energy consumption into the future, then I highly recommend you create a user variable for it. Then you will be able to project activity level separately from energy consumption if you choose.

    In the example I posted I only projected activity level into the future and assumed final energy intensity remained the same in future years. Remember that final energy consumption is calculated as an (activity level) * (final energy intensity).

    Best,

    Tory


  • Tory Clark 4/29/2011
      Best Response

    2418 Views

    If the install from internet option does not work, you can also access the file from the link below.

    ftp://energycommunity.org/areas/TotalEnergyUserVariableExample.leap
  • Argiro Roinioti 5/1/2011
      Best Response

    2413 Views

    Hello Tory,

    Thank you for the example, it has been really helpful.
    I have one more question, if my total energy is expressed in diffent units for some demand branches, do I need to create a different user variables for total energy?

    Thank you!



    Best Regards,

    Argiro
  • Tory Clark 5/1/2011
      Best Response

    2412 Views

    Hi Argiro,

    Each user variable can only have one associated unit. For transparency, I recommend converting all of your total energy inputs to one common unit (outside of LEAP) and using one Total Energy User Variable. This will allow someone looking at your model to better understand your approach.

    Best,

    Tory
  • Argiro Roinioti 5/2/2011
      Best Response

    2410 Views

    Tory,

    Thank you, your help is very much appreciated.


    Sincerely,

    Argiro