Parametric MILP vs Non-paremetric MILP

95 views
Skip to first unread message

roon fruchtegut

unread,
Jun 9, 2014, 3:58:59 AM6/9/14
to yal...@googlegroups.com
Hi

I have prepared simple MILP with two binary variables. In first case i tried to solve it by mpt but for chosen parameters the solution was not optimal. Then I set up non-parametric problem with the same parameters and the solution was fine. The value of the objective function is evidently lower in case of non-parametric solution.
I enclose both programs. Any hint?



ExplicitGen_fixSize.m
ImplicitGen_fixSize.m

Johan Löfberg

unread,
Jun 9, 2014, 4:56:15 AM6/9/14
to yal...@googlegroups.com
I get the same value function (137.5)

mpt_plcp: 24 regions
mpt_plcp: 6 regions
-> Generated 2 partitions.
Union 1 (out of 2)...
Union 2 (out of 2)...

SOL = 

    [1x1 struct]


DIAGNOSTIC = 

      yalmiptime: 0.4180
      solvertime: 2.0830
            info: 'Successfully solved (MPT)'
         problem: 0
           mpsol: [1x1 struct]
    solveroutput: [1x1 struct]

double(ZPWF)
double(HPWF)

ans =

   1.0e+04 *

    0.0020
    0.0094
    0.0138
    5.0000
         0
         0
    0.0001
         0


ans =

  137.5000


>> tbxmanager show enabled
List of enabled packages:

mpt       Version 3.0.17
lcp       Version 1.0.3
fourier   Version 1.0


roon fruchtegut

unread,
Jun 9, 2014, 7:20:24 AM6/9/14
to yal...@googlegroups.com
That strange. My listiting looks like this:

Calling mpt_mplp_26 with default options...
mpt_mplp: 27 regions
Calling mpt_mplp_26 with default options...
mpt_mplp: 4 regions

-> Generated 2 partitions.
Union 1 (out of 2)...
Union 2 (out of 2)...

SOL =

    [1x1 struct]


DIAGNOSTIC =

      yalmiptime: 1.0306
      solvertime: 4.4562

            info: 'Successfully solved (MPT)'
         problem: 0
           mpsol: [1x1 struct]
    solveroutput: [1x1 struct]

Linear matrix variable 12x1 (full, real, binary, 12 variables)
Linear scalar (real, derived, 1 variable)
Linear matrix variable 8x1 (full, real, derived, 8 variables)

ans =
   20.0000
   81.2500
  162.5000
  260.0000
   10.0000
   20.0000
         0
    1.0000
ans =
  182.5000

>> tbxmanager show enabled
List of enabled packages:

lcp        Version 1.0.3
mptdoc     Version 3.0.3
yalmip     Version R20131002
sedumi     Version 1.3
espresso   Version 1.0
cddmex     Version 1.0.1
fourier    Version 1.0

Johan Löfberg

unread,
Jun 9, 2014, 7:21:54 AM6/9/14
to yal...@googlegroups.com
Looks like you have some ghost mpt version running (note that it is not listed in tbxmanager)

roon fruchtegut

unread,
Jun 9, 2014, 7:22:59 AM6/9/14
to yal...@googlegroups.com
and

mpt       Version 3.0.17

roon fruchtegut

unread,
Jun 9, 2014, 7:28:06 AM6/9/14
to yal...@googlegroups.com
I used  mpt Version 3.0.17. I have set it up manually since tbxmanager install unstable version of mpt default.

roon fruchtegut

unread,
Jun 9, 2014, 7:29:59 AM6/9/14
to yal...@googlegroups.com
Normally it looks like this:

>> tbxmanager show enabled
List of enabled packages:

lcp        Version 1.0.3
mptdoc     Version 3.0.3
yalmip     Version R20131002
sedumi     Version 1.3
espresso   Version 1.0
cddmex     Version 1.0.1
fourier    Version 1.0
mpt        Version dev-510a0b

Johan Löfberg

unread,
Jun 9, 2014, 7:37:47 AM6/9/14
to yal...@googlegroups.com
Start by installing the latest version of YALMIP

roon fruchtegut

unread,
Jun 9, 2014, 7:46:56 AM6/9/14
to yal...@googlegroups.com
Now, it looks like this:
tbxmanager show enabled
List of enabled packages:

sedumi     Version 1.3
espresso   Version 1.0
cddmex     Version 1.0.1
fourier    Version 1.0
mpt        Version 3.0.17
glpkmex    Version 1.0
hysdel     Version 2.0.6
lcp        Version 1.0.3
mptdoc     Version 3.0.4
yalmip     Version R20140605


But the parametric solution is still wrong.

Johan Löfberg

unread,
Jun 9, 2014, 7:50:59 AM6/9/14
to yal...@googlegroups.com
Then it must be something numerical. What OS are you using? MATLAB version?

Michal will hopefully come to rescue

roon fruchtegut

unread,
Jun 9, 2014, 8:01:26 AM6/9/14
to yal...@googlegroups.com
It is Ubuntu 64bit, Matlab 7.12.0 (2011a)

Michal Kvasnica

unread,
Jun 9, 2014, 8:49:39 AM6/9/14
to yal...@googlegroups.com
don't be afraid of what we call is an "unstable" version. In fact, such versions are sooner or later promoted to official, stable, releases. I would strongly advise against manual installation. If you want to downgrade to the stable branch, do this:

  tbxmanager uninstall mpt
  tbxmanager install mpt

-michal

Michal Kvasnica

unread,
Jun 9, 2014, 8:56:07 AM6/9/14
to yal...@googlegroups.com
The culprit seems to be the ancient "mpt_mplp_26" parametric solver which is included in MPT3 for compatibility purposes.

As Johan pointed out, if you use the PLCP solver then you get the correct solution. No idea why it wasn't automatically selected in your case, you should run "mpt_init" to tell MPT3 to rescan the list of solvers. Then the solver should become active. If it doesn't, give me the output of "mpt_init".

However, there seems to be a problem with this specific example on non-windows platforms which causes the Opt/qp2lcp function to break. If that happens, simply comment out the line which causes the error (most probably it's the line starting with recover.lambda.upper.lambdaX = ...).

We are investigating the issue and will fix it in the next (unstable ;) release.

-michal

roon fruchtegut

unread,
Jun 9, 2014, 9:44:34 AM6/9/14
to yal...@googlegroups.com
After mpt_init it finally works.

thanx

Reply all
Reply to author
Forward
0 new messages