A problem about MISOCP

138 views
Skip to first unread message

ZimonAllen

unread,
Oct 4, 2017, 11:45:26 PM10/4/17
to YALMIP
Dear Johan,
          Sorry to bother you again! I had left a comment about the problem I met on this website https://yalmip.github.io/example/unitcommitment/, and thank you for your fast reply, I had received the e-mail but I couldn't found the comment now...So I'm disscussing the problem here.
          The problem I met as follows:
              "I want to solve the mixed inter SOCP problem with CPLEX,but the binvar variables I defined resulted with decimals...Had anybody encountered with this ."
          You replied me with "Depends on what you mean with decimal. Getting stuff like 42.000001 is normal, as the solver uses tolerances to define integrality"
            But the binary variables I defined resulted like this  "0.2889","0.1443","0.8997",
I defined the variables in this way:
       " E_IJ=binvar(Node_num,Node_num,'full');"
the solver resulted with this solution...

Johan Löfberg

unread,
Oct 5, 2017, 2:26:48 AM10/5/17
to YALMIP
Then something is wrong, and you will have to supply the code you are running and/or the output the solver displays when you solve the problem  (after setting 'verbose' to 1 if you use optimize or 2 if you use optimizer)

ZimonAllen

unread,
Oct 7, 2017, 10:21:23 PM10/7/17
to YALMIP
>>IEEE6_MISOCP
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Warning: Equality constraint evaluated to trivial true. 
> In constraint.constraint at 45
  In sdpvar.eq at 13
  In IEEE6_MISOCP at 69 
Tried aggregator 1 time.
QCP Presolve eliminated 416 rows and 294 columns.
Aggregator did 77 substitutions.
Reduced QCP has 107 rows, 108 columns, and 326 nonzeros.
Reduced QCP has 31 quadratic constraints.
Presolve time = 0.00 sec. (0.33 ticks)
Parallel mode: using up to 8 threads for barrier.
Number of nonzeros in lower triangle of A*A' = 828
Using Approximate Minimum Degree ordering
Total time for automatic ordering = 0.03 sec. (0.05 ticks)
Summary statistics for Cholesky factor:
  Threads                   = 8
  Rows in Factor            = 107
  Integer space required    = 208
  Total non-zeros in factor = 1474
  Total FP ops to factor    = 22306
 Itn      Primal Obj        Dual Obj  Prim Inf Upper Inf  Dual Inf Inf Ratio
   0 -1.4275705e+003 -5.3070115e+000 1.17e+004 0.00e+000 1.03e+004 1.42e+003
   1 -1.5869658e+003 -1.6528690e+002 1.17e+004 0.00e+000 1.03e+004 2.04e+002
   2 -3.2977609e+003 -1.9482417e+003 1.16e+004 0.00e+000 1.03e+004 2.06e+001
   3 -1.2579472e+003 -7.2692142e+002 1.05e+004 0.00e+000 9.31e+003 8.89e+003
   4 -5.7402139e+002 -4.4003960e+002 4.36e+003 0.00e+000 3.86e+003 7.40e+002
   5 -3.5409608e+002 -3.0296493e+002 1.08e+003 0.00e+000 9.60e+002 1.17e+003
   6 -2.7233051e+002 -2.3427552e+002 4.10e+002 0.00e+000 3.63e+002 9.54e+002
   7 -2.6513690e+002 -2.2842564e+002 3.00e+002 0.00e+000 2.66e+002 9.62e+002
   8 -2.4611544e+002 -2.1298080e+002 2.89e+002 0.00e+000 2.56e+002 8.38e+002
   9 -1.9807018e+002 -1.7464087e+002 2.58e+002 0.00e+000 2.29e+002 1.01e+003
  10 -2.0180109e+002 -1.7628216e+002 1.81e+002 0.00e+000 1.60e+002 7.38e+002
  11 -1.5280317e+002 -1.3511641e+002 1.94e+002 0.00e+000 1.72e+002 1.02e+003
  12 -7.3952832e+001 -6.5081943e+001 1.34e+002 0.00e+000 1.18e+002 1.48e+003
  13 -5.2906748e+001 -4.6674797e+001 6.50e+001 0.00e+000 5.75e+001 1.98e+003
  14  6.1591767e+000  6.6658622e+000 4.53e+001 0.00e+000 4.01e+001 2.17e+004
  15  1.2196324e+001  1.2229669e+001 3.62e+000 0.00e+000 3.21e+000 3.12e+005
  16  1.2525275e+001  1.2532426e+001 2.36e-001 0.00e+000 2.09e-001 1.40e+006
  17  1.2560894e+001  1.2564773e+001 5.04e-002 0.00e+000 4.46e-002 2.39e+006
  18  1.2587798e+001  1.2589365e+001 2.77e-002 0.00e+000 2.39e-002 5.76e+006
  19  1.2596733e+001  1.2597617e+001 1.11e-002 0.00e+000 9.60e-003 1.02e+007
  20  1.2603646e+001  1.2603868e+001 5.72e-003 0.00e+000 5.42e-003 3.80e+007
  21  1.2605051e+001  1.2605175e+001 2.08e-003 0.00e+000 1.34e-003 9.88e+007
  22  1.2605701e+001  1.2605755e+001 1.13e-003 0.00e+000 7.96e-004 2.39e+008
  23  1.2605998e+001  1.2606005e+001 5.20e-004 0.00e+000 3.52e-004 1.32e+009
  24  1.2606035e+001  1.2606037e+001 4.09e-004 0.00e+000 4.05e-005 3.20e+009

sol = 

    yalmiptime: 2.9182
    solvertime: 2.9418
          info: 'Successfully solved (CPLEX-IBM)'
       problem: 0

Thanks for your advice! As above, the output solver displays using “optimize” is showed, is there anything wrong with these warnings? I'll supply the code later
Message has been deleted
Message has been deleted

Johan Löfberg

unread,
Oct 8, 2017, 5:06:27 AM10/8/17
to YALMIP
When i = j, W(i,j)==W(j,i) simply evaluates to 0=0 which is trivially true, and YALMIP warns you about this (doesn't cause any issues, but very often this is a sign that the coder missed something, hence yalmip warns)

ZimonAllen

unread,
Oct 8, 2017, 5:30:41 AM10/8/17
to YALMIP
Thanks for your reply! I understand these warnings now, they appears cuz I simplify the code. For some "i,j" , "0=0" appears. But as you mentioned, this dosen't cause any issues. So I want to know  why those binary variables I defined turned out to be decimals, I changed some of the description of my codes, but the result remains the same, couldn't find the reason myself, could you give some advice for debug or solution to solve this problem? It drives me crazy :| , thanks in advance!

Johan Löfberg

unread,
Oct 8, 2017, 5:43:12 AM10/8/17
to YALMIP
Well of course, you've turned on relax in the code you posted

ZimonAllen

unread,
Oct 8, 2017, 7:50:56 AM10/8/17
to YALMIP
Thanks, Johan! You mean that I turned on relax in the code, but why does this solver relax in this way? And how can I keep these binary variables to remain binary?By turning off the relax?If so, how to do it? Sorry for so many questions, I'm new to YALMIP...- -|

Johan Löfberg

unread,
Oct 8, 2017, 8:17:44 AM10/8/17
to YALMIP
Why are you even touching relax?

ZimonAllen

unread,
Oct 8, 2017, 10:34:39 AM10/8/17
to YALMIP
Oh my..., I tried to change the sdpsettings to check other problem before, and I forgot to change it back.What a silly mistake, thanks for your patience! Guess I need to put more concentration on coding...LOL
Thank you again!
Reply all
Reply to author
Forward
0 new messages