• 736 views | 12 messages Discussion: LEAP
    Topic: Result Variables Subscribe | Previous | Next
  • Ying Wang 8/8/2011

    2455 Views

    Hello!
    From the Script Editor,I have konw four result variables:such as Energy Demand Final Units、Pollutant Loadings、Global Warming Potential and Energy Demand Primary Units,there are any other result variables? How can I get the emissions of NOx automatically?

    Thank you in advance.

    Ying Wang

  • Fran Lallana 8/10/2011
      Best Response

    2447 Views

    Hello Ying,

    you are right about result variables although there is way to get the result you need.

    Under Indicator branch (wich is the last branch in the tree and appears after you activate it in General Parameters) you have to create an indicator that calculates your desire result.

    Then in your in automation code you have to write something like:
    Leap.BranchVariable("Indicators\NOx:Indicator").DataValue(2030)

    Note that with the attribute "DataValue(year)" you can specify the year for the result.

    Hope it helps,
    Best,
    Francisco.
  • Ying Wang 8/11/2011
      Best Response

    2436 Views

    Thank you Francisco!

    In the Results View,I can use the Result selection box at the top of the screen to pick the category of results I am interested in,for example,Environment:Nitrogen Oxides,can I get the the data of Nitrogen Oxides automatically?

    Thank you in advance!
    Ying Wang
  • Fran Lallana 8/12/2011
      Best Response

    2429 Views


    You are wellcome Ying.

    From the script editor, as well as from visual basic code or other programming interfase, you can't point any result you want, for example one accounting for only one fuel (or at least you couldn't... maybe it changed with LEAP2011 and I still don't know it).

    To evade this inconvinient you have to create a new branch under Indicators folder. There you can construct every result you want and then you can use it in your automation like I told you before.

    In LEAP Analysis view create an indicator named NOx with the following expression:
    Freedonia:Pollutant Loadings[ton, Effects=Nitrogen oxides nox]
    (reeplace "Freedonia" for the name of your area)

    In LEAP results you can check if the indicator you created it's giving the result that you are expecting comparing it with the result you previously viewed in Results View.

    Then in the script write the sentece:
    Leap.BranchVariable("Indicators\NOx:Indicator").DataValue(2030) and you should have it automated.

    Bye,
    Francisco.







  • Charlie Heaps 8/12/2011
      Best Response

    2427 Views

    Thanks Fran,

    FYI: I will be working to improve the API to make getting access to results easier. In particular I will add the ability to filter result variables so that you can access specific effects (eg NOx) without the need to create an intermediate indicator variable.

    Best,

    Charlie
  • Ying Wang 8/13/2011
      Best Response

    2411 Views

    I see,Thank you very much Francisco!

    Best,
    Ying Wang


  • Ying Wang 8/18/2011
      Best Response

    2390 Views

    Hello,Francisco,
    I have gathered two questions to ask, I would really appreciate your feedback.
    1、I did as you told me,I created an indicator named NOx with the follwing expression:Beijing:Pollutant Loadings[ton,Effects=Nitrogen oxides nox](Beijing is the name of my area),Then, In the Results View,I can use the Result selection box at the top of the screen to pick the category of results ,I picked Data Variable:Indicator,but the data of every year is zero,I don't konw why.
    2、In the Analysis View,I created another indicator named CO2 with the follwing expression:Beijing:Pollutant Loadings[ton,Effects=Carbon Dioxide Non Biogenic],Then in the script write the sentece:
    Leap.BranchVariable("Indicators\CO2:Indicator").DataValue(2020) ,the data I get is the all emissions of CO2 in the year of 2020?
    Thank you in advance!
    Ying Wang
  • Fran Lallana 8/18/2011
      Best Response

    2386 Views


    Hi Ying,

    1) Check if in "General - Basic Parameters - Scope:" the box "Non-Greenhouse Gas Loadings" is selected. If not, LEAP is not calculating this effect so it would be zero.

    2) You are right, this code line should give you the same result as if you get from LEAP results window CO2 non biogenic for 2020.

    Best,
    F.
  • Ying Wang 8/18/2011
      Best Response

    2376 Views

    Hello,Francisco,thank you for your early reply,
    1、I had selected the box"Non-Greenhouse Gas Loadings",But the data I get from LEAP results window is always zero.
    2、The data I get form the code "Leap.BranchVariable("Indicator\CO2:Indicator").DataValue(2020)"is not equel to the data for 2020 I get from LEAP results window when the branch is selected as Beijing(it is the name of my area),and the Result selection box at the top of the screen to pick the "Environment:Carbon Dioxide(Non-Biogenic)".

    Best,
    Ying Wang

  • Fran Lallana 8/19/2011
      Best Response

    2368 Views


    Ying,

    I don't know what else to say... I can only assure that if you create an indicator that gives you the result you want, you can automate it in the way I told you.

    I don't know why the indicator is not giving you the expected result nor why NOx resutls are zero.

    Maybe you could send me the Area to take a look (franenelsur at gmail.com) but perhaps it's time to call the sages.

    Bye,
    Francisco.

  • Charlie Heaps 8/19/2011
      Best Response

    2367 Views

    Hi Ying,

    I would be happy to take a look at this. Can you send me your data set (you can email it to leap@sei-us.org)? As usual, anything you send will be treated in the strictest confidence - I will use the data set only for debugging purposes and will erase it after use.

    Fran - many thanks for your efforts to help Ying!

    Best,

    Charlie
    LEAP Developer
  • Ying Wang 8/20/2011
      Best Response

    2354 Views

    Thank you for your help,I will send you a area named Freedonia ,I created two branches under Indicators folder,the area exists the same question:
    1)In the Results View,when I selected the branch "Indicators\NOx",the DataValue is zero;
    2)I want to get the emission of CO2 of Freedonia,I have two methods:First,when I selected the branch "Freedonia" and pick "Environment:Carbon Dioxide (Non-Biogenic)" in Result selection box at the top of the screen,I can get the emissions of CO2.Second,through select the branch "Indicators\CO2",I can also get the emissions of CO2,the datas I get from the two methods is not equel,I want to konw which method is right.

    Best,
    Ying Wang