• 56 views | 1 messages Discussion: LEAP
    Topic: Transformation Error (LEAP API)Subscribe | Previous | Next
  • Andre Siqueira 10/29/2019

    Hello LEAP's Team

    I'm trying to use the following code to get the Social Costs from LEAP.

    '======================================================================
    For Y = L.BaseYear To L.EndYear

    a1 = a1 + L.Branch("Demand").Variable("Social Costs").Value(Y, "U.S. Dollar")
    a2 = a2 + L.Branch("Transformation").Variable("Social Costs").Value(Y, "U.S. Dollar")
    a3 = a3 + L.Branch("Resources").Variable("Social Costs").Value(Y, "U.S. Dollar")
    Next

    b = a1 + a2 + a3 'Total Social Costs
    '======================================================================

    But at the bold line the program stops, not recognizing "Transformation" as part of the branch. However, it works when I change it to:

    a2 = a2 + L.Branch("Transformation\Electricity Generation").Variable("Social Costs").Value(Y, "U.S. Dollar").

    Another thing is, using this code I only get the "Real Costs". How could I get the "Discounted Costs" ?

    Thank you!


    *I have another part of the code that calculates "Differences vs Reference" and it changes through scenarios.


    question.PNG