Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  No solution with SOS1

    Posted 10/16/13 10:18 AM

    Originally posted by: Liebe


    Hi,

    I use "Special Ordered Sets of type 1" (SOS1) in a mixed-integer quadratic program.

     I defined variables binarily.

    For example:

    1. If I set the constraint as cplex.addSOSs ('111 ', {[1 2 3]' [4 5 6] '[7 8 9]'}, {[1 2 3] '[1 2 3]' [1 2 3] '}), the program has no solution.
    2. If  the 3 constraints are set without SOS1 as x1+x2+x3-1=0; x4+x5+x6-1=0; x7+x8+x9-1=0. the result is optimal.

    SOS Type 1 is a set of variables where at most one variable may be nonzero. Does The constraint with SOS1 (binary) mean: x1+x2+x3=1 or x1+x2+x3=0;x4+x5+x6=1 or x4+x5+x6=0;x7+x8+x9=1 or x7+x8+x9=0 ? I don't know why has the program with SOS1 no solution.

    The content of Command Window is:

     

    1. MIP Presolve eliminated 213 redundant SOS constraints.

      Tried aggregator 2 times.

      MIQP Presolve eliminated 2259490 rows and 513003 columns.

      MIQP Presolve modified 125857 coefficients.

      Aggregator did 2163 substitutions.

      Number of nonzeros in lower triangle of Q = 182827

      Using Approximate Minimum Degree ordering

      Total time for automatic ordering = 0.08 sec.

      Summary statistics for factor of Q:

        Rows in Factor            = 189327

        Integer space required    = 195719

        Total non-zeros in factor = 1817720

        Total FP ops to factor    = 23252120

      Reduced MIQP has 10485 rows, 191490 columns, and 368766 nonzeros.

      Reduced MIQP has 189233 binaries, 0 generals, 2163 SOSs, and 0 indicators.

      Reduced MIQP objective Q matrix has 554981 nonzeros.

      Presolve time =    1.40 sec.

      Probing time =    0.06 sec.

      Clique table members: 10320.

      MIP emphasis: balance optimality and feasibility.

      MIP search method: dynamic search.

      Parallel mode: deterministic, using up to 4 threads.

      Root relaxation solution time =   80.64 sec.

       

              Nodes                                         Cuts/

         Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

       

            0     0  7.94242e+009  6328                7.94242e+009       13        

            0     0        cutoff                                        580        

      Elapsed real time = 261.68 sec. (tree size =  0.00 MB, solutions = 0)

      Clique cuts applied:  658

      Implied bound cuts applied:  1

      Flow cuts applied:  3

      Mixed integer rounding cuts applied:  6

      Multi commodity flow cuts applied:  1

      Root node processing (before b&c):

        Real time             =  260.26

      Parallel b&c, 4 threads:

        Real time             =    0.00

        Sync time (average)   =    0.00

        Wait time (average)   =    0.00

                                -------

      Total (root+branch&cut) =  260.26 sec.

      exitflag =119

      Error using subsref

      Reference to non-existent field 'x'.

      Error in C:\Program Files\IBM\ILOG\CPLEX_Studio124\cplex\matlab\x64_win64\@Cplex\Cplex.p>Cplex.subsref (line 3647)

    2. Tried aggregator 2 times.

      MIQP Presolve eliminated 2272687 rows and 512990 columns.

      MIQP Presolve modified 125853 coefficients.

      Aggregator did 2163 substitutions.

      Number of nonzeros in lower triangle of Q = 182827

      Using Approximate Minimum Degree ordering

      Total time for automatic ordering = 0.08 sec.

      Summary statistics for factor of Q:

        Rows in Factor            = 189327

        Integer space required    = 195719

        Total non-zeros in factor = 1817720

        Total FP ops to factor    = 23252120

      Reduced MIQP has 12648 rows, 191503 columns, and 558025 nonzeros.

      Reduced MIQP has 189246 binaries, 0 generals, 0 SOSs, and 0 indicators.

      Reduced MIQP objective Q matrix has 554981 nonzeros.

      Presolve time =    1.61 sec.

      Probing time =    0.06 sec.

      Clique table members: 10320.

      MIP emphasis: balance optimality and feasibility.

      MIP search method: dynamic search.

      Parallel mode: deterministic, using up to 4 threads.

      Warning: Crossover terminates with a singular basis.

      Root relaxation solution time = 1348.33 sec.

       

              Nodes                                         Cuts/

         Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

       

            0     0  7.94257e+009  1484                7.94257e+009    85813        

      *     0+    0                      6.74343e+011  7.94257e+009    85813   98.82%

      *     0+    0                      7.94257e+009  7.94257e+009    85813    0.00%

            0     0        cutoff        7.94257e+009  7.94257e+009    85813    0.00%

      Elapsed real time = 1439.36 sec. (tree size =  0.00 MB, solutions = 2)

       

      Root node processing (before b&c):

        Real time             = 1437.77

      Parallel b&c, 4 threads:

        Real time             =    0.00

        Sync time (average)   =    0.00

        Wait time (average)   =    0.00

                                -------

      Total (root+branch&cut) = 1437.77 sec.

      exitflag = 101

    3. By the way : exitflag = cplex.Solution.status

    4. Thanks!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: No solution with SOS1

    Posted 10/16/13 10:36 AM

    If your SOSs are correct then they should not render the problem infeasible.

    Does it help to disable presolve in the first run?

    Could you export the models in the first and second run to a SAV file and attach them here? Or are the models/data confidential so that you cannot reveal them in public?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: No solution with SOS1

    Posted 10/16/13 11:30 AM

    Originally posted by: Liebe


    Hi Daniel,

    Sorry, i don't know, how can I disable presolve in the first run.

    Can you tell me?

    Thank you!

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: No solution with SOS1

    Posted 10/17/13 12:26 AM

    See here how to set parameters in matlab for toolbox functions and here for setting parameters in the class API (look at the Param property and the examples given there). To disable presolve set preprocessing.presolve to 0 (false).

    In order to export a model file set that 'exportmodel' parameter to the name of the file to which the model should be written.


    #CPLEXOptimizers
    #DecisionOptimization