• 988 views | 4 messages Discussion: LEAP
    Topic: Optimization getting error message "unable to build all needed capacity" Subscribe | Previous | Next
  • Etis Meilandari 12/3/2019

    Hello,

    I'm using the latest version of LEAP, and I'm working on my simulation for long-term electricity planning in my country from 2018 as a base year and 2050 as a year target. however, when I tried to generate my results of the optimization model I've got a warning diagnostic message "Optimization unable to build all needed capacity in and after year 2050. Please see Prt Sc attached.
    could you please help me to explain what is the diagnostic message means? and how to solve it? 

    Thank you very much.

    Kind Regards,
    Etis


    Attachments:  Warning Message.pdf [8]
  • Charlie Heaps 12/4/2019
      Best Response

    Hello Etis,

    >>I've got a warning diagnostic message "Optimization unable to build all needed capacity in and after year 2050. 

    That message is kind of a "message of last resort" meaning that LEAP was unable to dispatch enough energy to meet the requirements on the module.  This can happen for a number of reasons, but first let me give you a bit of background.  When LEAP works with OSeMOSYS to try and solve an optimization problem it creates an extra hidden process not visible in LEAP called "unserved".  That process is, by design, associated with very high capital and O&M costs, so normally it never gets built or dispatched.  It is included as a way minimizing the chances of having the solver fail with an "infeasible solution" error.  The message you are seeing basically corresponds with the "unserved" process being dispatched.  So that in turn indicates that LEAP failed to build or prefers not to dispatch all of the other processes.  It is hard to say why at this point, but I would start by first looking at the results for capacity to see if LEAP built any/enough of the other processes.  If it did, look at the results for the module outputs to see what was dispatched.  If nothing is being dispatched (probably), I suggest you look at all the input data in LEAP to see if you have set any variables that might prevent the processes being built or operated (e.g. setting Maximum built Capacity or setting an overly restrictive renewable standard or perhaps settings costs very high).  Also check the system load shape variables to make sure that there is a non-zero fraction of demand allocated to every time slice.  

    If you don't get any joy looking at the LEAP inputs and outputs, then you will need to dig into the OSeMOSYS inputs and outputs to see what is happening. I'm afraid this is not easy!  I suggest you enable an option in the Basic Parameters: Optimization screen labeled "Keep Intermediate Results".  Once you have done this, LEAP will retain the various input and output files generated by OSeMOSYS.  An input data file is named "OPDataX.txt" where X is the ID of the scenario.  A result file is labeled OPResultsX.txt.  I'm afraid I don't have any documentation for the structure of these files but you may be able to find more information on the OSeMOSYS web site (http://www.osemosys.org/)  NB: these notes assume you are using GLPK as your solver.  When using CPLEX, the same input file is used but results are written by CPLEX to a different format result file.

    One more thing. we will soon be releasing LEAP2020 which has much improved optimization capabilities. And in particular, it includes a new optimization framework as an alternative to OSeMOSYS.  Stay tuned for news on this in the next few months!

    I hope this helps or at least gives you something to work with!

    Best,

    Charlie

  • Etis Meilandari 12/5/2019
      Best Response

    Thank you very much Charles for your detail explanation. 
    Unfortunately, now I got the same diagnostics message but it said: "Optimization unable to build all needed capacity in and after the year 2019". right after my base year.
    However, I want to make sure "unserved" that you mentioned do related to the "unmet requirements"?
    In my simulation, all of the requirements are met. The results on the capacity and outputs have seemed fine. Please see the file attached.
    But, I set a constraint for each year and for each power generation technology in "maximum capacity". this is because when I simulated my simulation without any constraint, LEAP choose one technology (for example hydro pumped storage) and it has a large amount of capacity. and it seems not realistic with my country's condition. If I set constraint only for that technology, LEAP chooses another technology (example: biomass municipal waste) and again, put a large amount of capacity only in that technology. And then I put constraints for every technology that I used.
    And now, my question is, if I've done my simulation using that way, is it possible the diagnostics message occurred due to I set constraints for all power generation? and if I set constraints that way, can we still call that simulation optimized?
    and it's good to hear LEAP will release the new version of LEAP soon. can't wait for that.

    Thank You,

    Kind regards,
    Etis Meilandari
      


    Attachments:  LEAP help!.pdf [9]
  • Anis Zaman 8/8/2023
      Best Response

    Hi Charlie,

    Just adding to this thread that I have the same problem. I would like to describe this from a non-technical viewpoint in a way that the same file when opened in one computer (LEAP version 2020.1.0.91 & NEMO 1.80) it works perfectly fine. However, when it is opened in another machine (LEAP version 2020.1.0101 & NEMO 1.90), it doesn't. Starting to wonder if this has anything to do with the version of LEAP.

    Kind regards,
    Anis Zaman