• 136 views | 2 messages Discussion: LEAP
    Topic: LEAP API to READ Monthly ValueSubscribe | Previous | Next
  • Chi Duan 9/9/2019

    I am trying to access LEAP result value through the LEAP API. I am using the following code. However, I could only access the annual total value for a particular year but cannot get the monthly value. I am wondering how could I access monthly result value through LEAP API. Thank you very much if anybody knows how to do this.

    v1 = LEAP.Branch('Transformation\Electricity generation\Processes\Power2').Variable(
    'Average Power Dispatched').Value(year)


  • Emily Ghosh 9/13/2019
      Best Response

    You should add a filter to the end of your expression to access the result for each time slice. You also need to include the units (i.e. "MW") for the full expression to work:

    v1 = LEAP.Branch("Transformation\Electricity Generation\Processes\Power 2").Variable("Average Power Dispatched").Value(year, "MW", "Time Slice=January")

    Hope this helps,
    Emily