• 1062 views | 9 messages Discussion: LEAP
    Topic: Optimization failed with error Subscribe | Previous | Next
  • Maya Pasechnaya 2/5/2018

    Hello,

    I'm using LEAP 2018 version. When I tried to generate the result of my optimization model I've got a meesage "Optimization failed with error: No primal feasible solution in optimization calculation. Branch: Transformation\Electricity Generation. View debug information now? Yes, No". When I answer yes I'm getting a TEXT FILE with the information (please see below at the end of this message), which I cannot clearly understand. When I close the file the LEAP programme transfers to a view of System Energy Load Shape with highlighted (in red) expression, such as "YearlyShape(DESystem Load Shape)". Please see Prt Sc attached.

    My question is - can the error be connected to a System Energy Load Shape? If not, what can be the error? Does Text file say something about the possible error?

    Thank you a lot for any suggestion.
    Kind regards,

    Maya

    TEXT FILE:
    GLPSOL: GLPK LP/MIP Solver, v4.48
    Parameter(s) specified in the command line:
    --mipgap 0.01 --model OSeMOSYS.TXT --data OpData9.txt --output SelectedResults9.txt
    Reading model section from OSeMOSYS.TXT ...
    498 lines were read
    Reading data section from OpData9.txt...
    8709 lines were read
    Generating cost...
    Generating CAa4_Constraint_Capacity...
    Generating CAa5_TotalNewCapacity...
    Generating CAb1_PlannedMaintenance...
    Generating EBa10_EnergyBalanceEachTS4...
    Generating EBa11_EnergyBalanceEachTS5...
    Generating EBb4_EnergyBalanceEachYear4...
    Generating S5_and_S6_StorageLevelYearStart...
    Generating S7_and_S8_StorageLevelYearFinish...
    Generating S9_and_S10_StorageLevelSeasonStart...
    Generating S11_and_S12_StorageLevelDayTypeStart...
    Generating S13_and_S14_and_S15_StorageLevelDayTypeFinish...
    Generating SC1_LowerLimit_BeginningOfDailyTimeBracketOfFirstInstanceOfDayTypeInFirstWeekConstraint...
    Generating SC1_UpperLimit_BeginningOfDailyTimeBracketOfFirstInstanceOfDayTypeInFirstWeekConstraint...
    Generating SC2_LowerLimit_EndOfDailyTimeBracketOfLastInstanceOfDayTypeInFirstWeekConstraint...
    Generating SC2_UpperLimit_EndOfDailyTimeBracketOfLastInstanceOfDayTypeInFirstWeekConstraint...
    Generating SC3_LowerLimit_EndOfDailyTimeBracketOfLastInstanceOfDayTypeInLastWeekConstraint...
    Generating SC3_UpperLimit_EndOfDailyTimeBracketOfLastInstanceOfDayTypeInLastWeekConstraint...
    Generating SC4_LowerLimit_BeginningOfDailyTimeBracketOfFirstInstanceOfDayTypeInLastWeekConstraint...
    Generating SC4_UpperLimit_BeginningOfDailyTimeBracketOfFirstInstanceOfDayTypeInLastWeekConstraint...
    Generating SC5_MaxChargeConstraint...
    Generating SC6_MaxDischargeConstraint...
    Generating SI6_SalvageValueStorageAtEndOfPeriod1...
    Generating SI7_SalvageValueStorageAtEndOfPeriod2...
    Generating SI8_SalvageValueStorageAtEndOfPeriod3...
    Generating SV1_SalvageValueAtEndOfPeriod1...
    Generating SV2_SalvageValueAtEndOfPeriod2...
    Generating SV3_SalvageValueAtEndOfPeriod3...
    Generating SV4_SalvageValueDiscountedToStartYear...
    Generating TCC1_TotalAnnualMaxCapacityConstraint...
    Generating TCC2_TotalAnnualMinCapacityConstraint...
    Generating NCC1_TotalAnnualMaxNewCapacityConstraint...
    Generating NCC2_TotalAnnualMinNewCapacityConstraint...
    Generating AAC2_TotalAnnualTechnologyActivityUpperLimit...
    Generating AAC3_TotalAnnualTechnologyActivityLowerLimit...
    Generating TAC2_TotalModelHorizonTechnologyActivityUpperLimit...
    Generating TAC3_TotalModelHorizenTechnologyActivityLowerLimit...
    Generating RM3_ReserveMargin_Constraint...
    Generating RE4_EnergyConstraint...
    Generating E5_DiscountedEmissionsPenaltyByTechnology...
    Generating E8_AnnualEmissionsLimit...
    Generating E9_ModelPeriodEmissionsLimit...
    Model has been successfully generated
    glp_mpl_build_prob: row cost; constant term 334302.76615 ignored
    GLPK Simplex Optimizer, v4.48
    104153 rows, 93120 columns, 589718 non-zeros
    Preprocessing...
    PROBLEM HAS NO PRIMAL FEASIBLE SOLUTION
    If you need actual output for non-optimal solution, use --nopresol
    Time used: 0.2 secs
    Memory used: 229.5 Mb (240681406 bytes)
    Writing basic solution to `SelectedResults9.txt'...


    Attachments:  11.pdf [9]
  • Emily Ghosh 2/6/2018
      Best Response

    Hi Maya,

    The message "Problem has no Primal Feasible Solution" means that there are constraints which have been specified in LEAP that may contradict each other. For example, check that the Exogenous Capacity, Minimum Capacity or Minimum Capacity Additions (and combinations of these variables) are not set to a higher value than the Maximum Capacity or Maximum Capacity Additions. I recommend reviewing these variables, and other optimization inputs, to ensure there are no contradictions.

    If you are unable to find the problem, feel free to send a backup of your LEAP file to leap@sei-us.org and I can take a look.

    Thanks!
    Emily

  • Maya Pasechnaya 2/8/2018
      Best Response

    Hi Emily!

    That worked! Thank you!
    One more issue. I tried to optimize Electricity own use section as well, but the programme tells that the scenario doesnt' contain any capacity data. However, I cannot understand where those capacity data have to be put in? I've inserted renewable target data (min percentage share of electricity that has to be generated by RES), import target (that as I understand is a fuel cosumption by power plants), energy efficiency..
    Can you help me on this?

    Thank you a lot for your time,
    Kind regards,

    Maya

  • Emily Ghosh 2/8/2018
      Best Response

    Hi Maya,

    Glad it worked!

    To add capacity data, ensure that you have enabled capacity data to be entered for the Electricity Own Use module. To do this, right-click on the Electricity Own Use module branch, click on Properties, and check "Capacities". After you click OK, the capacity variable should be visible when you click on a process branch.

    Also, for your reference, the import target is for the output fuel and the feedstock fuels specified under a process branch represents the fuels consumed by a power plant. The power plant consumes as much fuel as needed to meet output fuel requirements; the amount of fuel consumed cannot be specified.

    On a side note, there is another way to model electricity end use that is simpler. Similar to the transmission and distribution module, electricity end use could be modeled as a loss rate, where the loss rate represents the total percentage of electricity generated by all of the power plants that is consumed by all of the power plants. To do this, create a new transformation module that is a "Simple non-dispatched module", add a process branch which uses electricity as the feedstock fuel, and enter the loss rate. Ensure the new Electricity Own Use module branch is placed above the Electricity Generation module - this way, the Electricity Own Use module consumes the electricity generated by the Electricity Generation module, which is already being optimized. Then apply a renewable target to the Electricity Generation module. (note that modeling the Electricity Own Use this way is just one of many ways - this is just a suggestion!)

    Thanks!
    Emily


    Electricity Generation Own Use and TD.PNG
  • Maya Pasechnaya 2/10/2018
      Best Response

    Dear Emily,

    Thank you a lot for the clarification. I would like to go for a "simpler" option with "Non-dispatched" module, specifiying losses of electricity as you suggested. The thing is in my Transformation module I have "losses" (of electricity and natural gas) specified in the "Transmission and Distribution" module which is placed above "Electricity own use" (and "Electricity own use" is placed above "Electricity Generation"). I just wonder whether a new "Non-dispatched" module would not contradict "Transmission and Distribution" in terms of the losses?

    Another issue I've got while optimizing my energy mix is the emission constraints (I'm examining an optimal energy mix for the countries and would like to specify limits to the emissions). The OptimizationQuickStart.doc says to indicate the emission constraint under Emission Constraints tree brunch. In my tree I have a section "Effects" which is placed between "Key assumptions" and "Demand" (like in the Optimization Exercise) and when I put the current levels of the NOx,SOx and CO2 and limits to them in one of my scenarios, the optimization results with an error again.

    Would highly appreciate if you could advise me on that,
    Kind regards,

    Maya

  • Emily Ghosh 2/12/2018
      Best Response

    Hi Maya,

    There should not be a contradiction because the losses in the two modules are for different things - one module is for electricity lost due to electricity own use, and the other module is for electricity lost from transmission and distribution.

    Also, what is the error that you are seeing? If you could provide a screenshot of the error message, that would be great.

    Thanks!
    Emily

  • Maya Pasechnaya 2/13/2018
      Best Response

    Hi Emily,

    Thank you so much for clarification. I've created a new simple non-dispatched module for own energy use and indicated losses rate there. However the results generate a new error "Bad load shape" (please see the file attached). As to the previous error which was generated after I've entered emission constrants it said the following ""Optimization failed with error: No primal feasible solution in optimization calculation. Branch: Transformation\Electricity Generation. View debug information now? Yes, No".

    Thank you a lot,

    Maya


    Attachments:  error.pptx [2]
  • Emily Ghosh 2/15/2018
      Best Response

    Hi Maya,

    The "Bad load shape" error indicates that the values entered for the system load curve adds up to 870%. I suggest checking the system load curve data (as you have defined as the Yearly Shape called "DESystem Load Shape") to make sure that the values add up to 100%.

    As for the "No Primal Feasible Solution" error, ensure that the capacity inputs do not have any contradictions, as discussed in the post above.

    Thanks!
    Emily


  • Maya Pasechnaya 2/17/2018
      Best Response

    Thank you, Emily!