• 374 views | 2 messages Discussion: LEAP
    Topic: Error : Branch/Variable: "Natural Gas:社会成本(299:5)" was used before it had beencalculated. Subscribe | Previous | Next
  • jiangtao liu 8/18/2024

    • How to solve this problem?

    e0fa7adeddfd2b2bc5647ad09f3f7ed.png
  • Taylor Binnington 8/19/2024
      Best Response

    1 Like

    Hi Jiangtao - 

    It looks like you may be trying to write an expression that depends on a LEAP Result variable, which has not yet been calculated (for the current year) when the expression is evaluated. Take a read of this help section, paying particular attention to Data- and Result-type variables in LEAP.

    https://leap.sei.org/help24/Concepts/Expressions.htm

    LEAP's results are not all calculated simultaneously. The calculation begins at the top of the tree and begins proceeding towards the bottom. I recommend using something like the PrevYearValue() function, as described here:

    https://leap.sei.org/help24/Expressions/Results_Filters.htm

    Taylor