Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

cplex.solve() returns Error 1217: No solution exists

  • 1.  cplex.solve() returns Error 1217: No solution exists

    Posted 06/22/12 02:18 PM

    Originally posted by: MichaelPoss


    Hi,

    How comes solve() can return "Error 1217: No solution exists" ?
    (I'm using cplex 12.1 with the JAVA api).

    Best,

    Michael.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/22/12 03:55 PM

    Originally posted by: MichaelPoss


    To add a complement of info: exporting my model as a .sav file and trying to solve it tells me it is infeasible, which I expected since it is the subproblem of a Benders decomposition algorithm (and one of the first iterations).
    However, I should not get an error by trying to solve an infeasible problem, or am I wrong ?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/22/12 04:54 PM

    Originally posted by: SystemAdmin


    > MichaelPoss wrote:
    > However, I should not get an error by trying to solve an infeasible problem, or am I wrong ?

    That is correct; but if you solve a problem that turns out to be infeasible, and then invoke any function that attempts to access the solution, the objective value etc., you will trigger an error (which I believe is 1217). I think 1217 is also the error you get if you try to access the solution of a feasible problem before you have actually solved it.

    Do you invoke IloCplex.getStatus or IloCplex.getCplexStatus immediately after calling solve(), to detect that the problem is infeasible (and avoid attempting to access a nonexistent solution)?

    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: cplex.solve() returns Error 1217: No solution exists

    Posted 06/22/12 06:33 PM

    Originally posted by: MichaelPoss


    Hi Paul, thank's for your answer.

    I agree with you, but the error is already triggered by the solve() call.
    In fact, this algorithm has been working fine for a while, that's the first time I get the error.

    ( After the solve, I ask about the problem's feasibility with isPrimalFeasible() and if it isn't feasible, I call dualFarkas() ).

    Best,

    Michael.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/23/12 05:37 PM

    Originally posted by: LeandroCC


    This could be a known issue:

    http://www-01.ibm.com/support/docview.wss?uid=swg1RS00991

    Have you tried using v. 12.3 or later? Or try the workaround suggested in the link: "one could turn off all heuristics".
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/24/12 01:48 PM

    Originally posted by: SystemAdmin


    In case you cannot switch to 12.3 or switching to 12.3 (or higher) does not solve the problem, could you please a full backtrace (or at least the exception's stacktrace up to and including function IloCplex.solve())?
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/24/12 02:04 PM

    Originally posted by: MichaelPoss


    I'll try the switch and let you know.
    The heuristics trick does not work.

    Michael.
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/28/12 05:53 AM

    Originally posted by: MichaelPoss


    Hi again,

    Switching to cplex 12.4 avoids the previous error.
    However, a couple of line below I call dualFarkas() which returns the following error:
    CPLEX Error 1265: Dual unbounded solution required
    Just to be sure, I called isDualFeasible() which tells me that the dual is not feasible, which is consistant with the error returned previously.

    My worry comes from the fact that the primal has no objective function. Therefore, the rhs of all constraints in the dual should be 0.
    Hence, the dual problem should always be feasible since (0,...,0) is always a solution.
    Am I missing something here ?

    Michael.

    PS: I attach the lp model of the primal.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/28/12 06:37 AM

    Originally posted by: T_O


    There is no file attached.

    Nevertheless, your problem could be due to unbounded variables. You should try to provide upper and lower bounds for every variable. Then your problem should always be dual feasible.

    Best regards,
    Thomas
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/28/12 06:44 AM

    Originally posted by: MichaelPoss


    Here comes the file. I prefer not to impose upper bounds on the variables to ease the extraction of the "dual farkas".
    However, the constraints of the primal imply upper bounds on all variables.

    Best,

    Michael.
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/28/12 08:13 AM

    Originally posted by: T_O


    Maybe you can provide some (not too large) trivial upper bounds (or preprocess them manually yourself). Otherwise it might be difficult to ensure dual feasibility.

    Best regards,
    Thomas
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: cplex.solve() returns Error 1217: No solution exists

    Posted 06/28/12 08:18 AM