Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  integer infeasibility when doing rolling planning

    Posted 10/30/11 12:00 PM

    Originally posted by: cplexforMatlabuser


    Good evening,

    I try to solve a mixed integer linear power plant and electricity storage commitment optimization over a long planning period (1 year) split down into consecutive smaller and overlapping planning periods (i.e. I use rolling planning) with Cplex Academic Initiative Version 12.2. The planning horizon of the optimization is 96 hours (96 hours because this corresponds to the forecasting horizon of the weather forecast) and I reoptimize (i. e. update the planning problem) every 24 hours, i.e. every 24 hours I start a new optimization looking 96 hours ahead. When I start a reoptimization at - say - hour 25, I supply the solution values for hour 25 from the previous optimization (i.e. the optimization with the optimization horizon from hour 1 to hour 96) as initial values (i.e. I fix upper and lower bounds at these values). Sometimes I get an infeasibility error and I wonder whether this could be due to the fact that the CPLEX solution of the previous period is actually infeasible. I think this is the case, because I don't get an error when I don't use rolling planning (i.e. when I optimize from hour 1 to hour 121 (=25+96) everything works out all right). So I tried to lower the initial lower bound and increase the initial upper bound slightly for the reoptimization, to see if the problem becomes feasible. This did not always help. Could one reason for this be that I have one variable taking on very large values (order of 10^7) and most variables taking on much smaller values (from 0 to a 500), so the accuracy to which the values of the small variables are calculated is low and there will often be significant infeasibility? If yes, could I somehow use scaling to get rid of the problem?
    What else could I try?

    Thanks a lot in advance!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: integer infeasibility when doing rolling planning

    Posted 10/30/11 01:03 PM

    Originally posted by: Eumpfenbach


    I'm just a user, not an expert, but I highly doubt cplex is giving an infeasible solution without a warning.

    I would do something like this (in psuedocode and assuming based on your name that you are using cplex for matlab)

    for i=1:num_rows_A
    temp(i) = A(1,:) * X
    end
    find (temp < LHS)
    find (temp > RHS)

    First figure out exactly what rows are infeasible and try to figure out why. When you solve your second problem something has changed, right (rhs, coefficients, etc). Maybe this is the cause of infeasibility.

    And there is something wrong with this statement:

    "as initial values (i.e. I fix upper and lower bounds at these values)"

    if you fix the upper and lower bounds these are not initial values. You have given cplex no freedom to search. I'm not sure if this is just a typo or if this is a possible source of error.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: integer infeasibility when doing rolling planning

    Posted 10/30/11 04:34 PM

    Originally posted by: SystemAdmin


    It's hard to say without seeing your model (and I'm not asking to do so), but rolling horizon models can sometimes produce solutions that will not let you survive the next iteration. It's possible your solution for time 0-95 leaves you with enough ”inventory” (spinning reserve?) to merry demand for times 24-95 but not 96-119. One approach to mitigate this is to set terminal conditions (constraints) sufficient to ensure you can make it through the next time block.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: integer infeasibility when doing rolling planning

    Posted 10/31/11 07:35 AM

    Originally posted by: SystemAdmin


    Do I understand you correctly, that you are solving hours 1-96 with a first MIP solve, then fix all variables that correspond to hours 1-96, and subsequently solve hours 25-120 with a second MIP solve?

    Wouldn't a typical rolling horizon approach leave the variables for hours 25-96 free and only fix the ones for hours 1-24?

    If you really fix all variables for hours 1-96, then I think it is no surprise that Paul's answer can apply.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: integer infeasibility when doing rolling planning

    Posted 11/01/11 02:26 AM

    Originally posted by: cplexforMatlabuser


    Dear all,

    thanks a lot for your numerous answers!
    To Tobias: I only want to fix a few hours of the second iteration to the values calculated in the first iteration. Actually at the moment it is just one hour for the sake of keeping the electricity storage levels of the previous iteration (but more than one hour would be good, since for power plants there can be minimum downtime constraints of - say - 8 hours that must not be violated when iterating). So I take hour 1 to 24 from the optimization of hour 1 to hour 96 as part of my final result( i.e. final unit commitment schedule). For the second iteration I set the lower and upper bound of hour 25 to the value calculated for hour 25 in the first optimization (this answers your comment, Eumpfenbach, I set lower and upper bounds to the same value to fix the value of the variables of only one (up to a few) hours, so cplex has freedom to search for all subsequent hours). Then I calculate hour 25 to 120 and take hour 25 to 48 as second part of the final result. And so on. I have tried what Eumpfenbach suggested - to locate the infesibility, but all infeasibilities that I could detect where on the order of at most 10^-11, which should be below the fesibilty tolerance. Or are the infesibilities of individual rows added up? I don't know how I can check or set the fesibility tolerance parameter with Cplex for Matlab API, can anyone tell me? By the way, the problem with infeasibilty mostly arises when I include a lot of storages (when I don't, I can do the rolling planning without error message). I assume that fixing storage level as well as storage input and output is maybe too much. So my workaround for the moment is only to fix storage levels and power output of power plants, that have minimum down time constraints. Nevertheless I kind of would like to use a more elegant solution, maybe feasOpt? Do I understand it right that when I call
    cplex.feasOpt(],[,preflb,[]), this would give me a lower bound vector with which the infeasible problem becomes feasible?

    Thank you!
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: integer infeasibility when doing rolling planning

    Posted 11/01/11 05:29 AM

    Originally posted by: SystemAdmin


    And you get the infeasibility for one particular sub-MIP where you have fixed hour i and solve for hours (i,i+96)?

    To analyze the infeasibility I would do the following: if the model is infeasible, then write it out as .sav file (using CPXwriteprob() in C, or cplex.exportModel in Concert).
    Then you can start the interactive CPLEX optimizer, read in the .sav file, and optimize it. If everything goes as expected, the interactive optimizer will also conclude infeasibility. Now, you can analyze it using the conflict refiner and/or feasopt. The conflict refiner will provide you a small sub set of the problem constraints and bounds that is already infeasible. Maybe, it is small enough for you to understand by looking at it what went wrong. Feasopt will provide you with a solution that is as infeasible as possible. There are a number of possibilities what "as infeasible as possible" can mean; you control this via a parameter setting. In its default setting, you will get a vector that minimizes the sum of constraint infeasibilities.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization