• 224 views | 7 messages Discussion: LEAP
    Topic: Rounding problemsSubscribe | Previous | Next
  • Nikoloz Sumbadze 2/5/2014

    1873 Views

    Hi,

    I have following issue:

    On the demand branch, I have "household/Urban/cooking" branch where saturation rate is 100%. at the same time share of electricity consumption is 6% and energy intensity - 1075.51 kwh per household. Also, 636,000 is number of households in urban.

    As I understand correctly calculations in leap must give me following result: 1075.51*0.06*636000= 41,041,461.6; however leap gave me the following number - 41,041,462.6736.

    this is very small change but taking into account number of branches i am afraid that difference will be big. So, can anybody help me?

  • Charlie Heaps 2/5/2014
      Best Response

    1872 Views

    Sorry for the problems.

    Could you send me your data set so I can take a look at this? All LEAP calculations are done in double precision so rounding errors should be insignificant, so this may indicate a bug. Please email your data set to me (or one that illustrates the problem) at leap@sei-us.org. You can use the email button within LEAP to do this or simply back the area as a .leap file.

    Thanks

    Charlie
  • Charlie Heaps 2/5/2014
      Best Response

    1870 Views

    Update - I can reproduce the problem. I will investigate further and report back as soon as i can.

    Best,

    Charlie
  • Nikoloz Sumbadze 2/5/2014
      Best Response

    1868 Views

    Hi Charlie,

    thank you very much for your prompt response

    I will send you leap and data files.

    Best,
    Nikoloz
  • Charlie Heaps 2/5/2014
      Best Response

    1865 Views

    Hi again Nikoloz,

    This is rather embarrassing! I found that the results are in fact being stored in the database as single precision values: hence the rounding error. This is a change that must have been made fairly recently I think. I am going to change this now (its a fairly simple change) and will try to get an update out ASAP. Hopefully by the end of the day.

    Charlie
  • Charlie Heaps 2/5/2014
      Best Response

    1864 Views

    I just posted LEAP 2012.056. It should fix the rounding problem and also an issue that was causing charts to not draw properly (freeze-up of charts).

    Sorry for the inconvenience.

    Best,

    Charlie
  • Nikoloz Sumbadze 2/5/2014
      Best Response

    1861 Views

    thank you Charlie for your help.

    Nikoloz