• 289 views | 6 messages Discussion: LEAP
    Topic: Add Branches of Enviromental Loadings by Import Excel or other methodSubscribe | Previous | Next
  • Sebastian Cepeda 1/24/2014

    2041 Views

    Dear all,

    I have a LEAP model that has several branches of demand, and therefore I need an automized way to add the enviromental branches to each one of the fuels.

    I have tried to add branches with Import Excel, and It didn�t work. I�m have the administrative rights of the computer and the latest version of LEAP.

    Is there a way to add branches by an script?
    Is there a way to change the type of fuel in a branch by an script?

    Rgds,
    Sebasti�n Cepeda
    Chile
  • Taylor Binnington 1/27/2014
      Best Response

    2037 Views

    Hi Sebastian,

    Good question - certainly the branch-ends can stack up quickly, and adding effects can become a time-consuming exercise!

    The simplest solution that I can recommend would be to simply right-click anywhere in the tree, and select 'Add IPCC Tier 1 Factors to All Branches'. Make sure that you have enabled 'Energy Sector Environmental Loadings' in Basic Parameters first, of course.

    This operation will add loadings to each branch from the IPCC Tier 1 emissions factors, using LEAP's best guess for the most appropriate emission factor based on the branch name and fuel. It is an extremely good idea to review these additions, to ensure that the emissions factors that are assigned are sensible.

    If you have your own emissions factors that you would like to assign instead, this is a good opportunity to perform an Export to Excel, modify the appropriate emissions factors, and then re-import back into LEAP. This is not possible without first adding the necessary branches - perhaps this is why you found that importing from Excel was not successful, the first time?

    LEAP does provide a comprehensive API for scripting, should you wish to approach the problem that way:

    http://www.energycommunity.org/WebHelpPro/API/API.htm

    Let me know if you'd like some additional information, but I think that the route I have suggested is easiest for your purposes.

    Best,

    Taylor
  • Sebastian Cepeda 1/28/2014
      Best Response

    2027 Views

    Hi Tylor!

    Thanks for your prompt answer. In my case although I have enable the 'Energy Sector Environmental Loadings' in Basic Parameters, LEAP is not adding the effects to the branches. Any ideas of this error?, Is it a typical one?
    About the API, do you have a sample of script that works with the instruction AddCategory or AddFeedstock?.

    Rgds,
    Sebasti�n

  • Taylor Binnington 1/28/2014
      Best Response

    2022 Views

    Hi Sebastian,

    Do you mean that no effects are added after performing the operation or that the option is unavailable when you right-click in the tree, in Analysis view? If the latter (and I should have specified this earlier, sorry), you are only able to 'Add IPCC Tier 1 emissions factors to all branches' while in Current Accounts.

    We do not have any examples of API usage in our user training materials. I have only limited experience using the API (it's on my to-do list!), so I can't quickly provide an example, but if I find some time in the coming weeks to put something together I'll be sure to post it here.

    Take care,

    Taylor
  • Sebastian Cepeda 1/30/2014
      Best Response

    2019 Views

    Hi Tylor,

    I did the process that you have said, at the Current Accounts, however it didn�t add the branches. I�ve found another solution, based on an external macro recorder.

    Rgds,
    Sebasti�n
  • Taylor Binnington 1/30/2014
      Best Response

    2018 Views

    Glad you're up and running, Sebastian.

    I'd be curious to know why the branch add function wasn't working for you. If you find the time, would you be able to submit an exact description of what you tried to do, to leap@sei-us.org?

    Thanks very much,

    Taylor