GAMS/Mosek initial integer solution?

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

GAMS/Mosek initial integer solution?

Post by Archiver »



Hello Gams,

Can someone please help me learn how to use the 'specify initial integer
solution' for the MIP solver in Mosek via GAMS?
There is a parameter MSK_IPAR_MIO_CONSTRUCT_SOL by which one can
(supposedly) set an initial integer solution. I can't seem to make it work.


Here is a toy example problem:
-------------------------

$title Steve Dirkse is Cool

set N /1*3/;

binary variables
x1
x2
x3
;

free variable z;

equations
obj
c1
c2
;

obj..
z =E= 2*x1 + x2 + 3*x3;

c1..
x1 + x2 + x3 =G= 1;

c2..
x1 + 2*x3 =G= 2;

x1.l = 1;
x2.l = 1;
x3.l = 1;

model jtl /all/;
option mip=mosek;
jtl.optfile = 1;
solve jtl using mip minimizing z;

---------------------------

With the mosek.opt file:

MSK_IPAR_LOG_MIO_FREQ 1
MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
MSK_IPAR_MIO_CUT_LEVEL_TREE 0
MSK_IPAR_MIO_CONSTRUCT_SOL 1

-------------------------


Gives the output:


-------------------------------------

linderot@meisterbrau:~/svn-mods/pcuts/data/mv$ gams testme.gms
--- Job testme.gms Start 05/05/08 13:02:13
GAMS Rev 227 Copyright (C) 1987-2008 GAMS Development. All rights reserved
Licensee: Computer Sciences Dept. G080221/0001AS-LNX
University of Wisconsin-Madison DC2621
License for teaching and research at degree granting institutions
--- Starting compilation
--- testme.gms(38) 3 Mb
--- Starting execution: elapsed 0:00:00.006
--- testme.gms(34) 4 Mb
--- Generating MIP model jtl
--- testme.gms(35) 4 Mb
--- 3 rows 4 columns 9 non-zeroes
--- 3 discrete-columns
--- Executing MOSEK: elapsed 0:00:00.028
MOSEK Link May 1, 2008 22.7.1 LNX 3927.4685 LX3 x86/Linux

M O S E K version 5.0.0.79 (Build date: Jan 29 2008 13:55:37)
Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16
DK-2100 Copenhagen, Denmark
http://www.mosek.com

Reading parameter(s) from
"/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
>> >> MSK_IPAR_LOG_MIO_FREQ 1
>> >> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
>> >> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
>> >> MSK_IPAR_MIO_CONSTRUCT_SOL 1
>> >>
Finished reading from
"/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
No initial feasible MIO solution found.
Mixed integer optimizer started.
BRANCHES RELAXS ACT_NDS BEST_INT_OBJ BEST_RELAX_OBJ
REL_GAP(%) TIME
0 0 0 3.0000000000e+00 NA NA
0.1
0 0 0 3.0000000000e+00 NA NA
0.1

Objective of best integer solution : 3.00000000e+00
Construct solution objective : Not employed
User objective cut value : Not employed
Number of branches : 0
Number of cuts generated : 0
Number of relaxations solved : 0
Number of interior point iterations: 0
Number of simplex iterations : 0
Mixed integer optimizer terminated. Time: 0.07

Interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Presolve - time : 0.00
Presolve - Stk. size (kb) : 0
Eliminator - tries : 0 time
: 0.00
Eliminator - elim's : 0
Lin. dep. - tries : 1 time
: 0.00
Lin. dep. - number : 0
Presolve terminated.
Interior-point optimizer terminated. CPU time: 0.00. Real time: 0.00.

Interior-point solution
Problem status : PRIMAL_FEASIBLE
Solution status : PRIMAL_FEASIBLE
Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
infeas.: 0.00e+00 cone infeas.: 0.00e+00
Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
infeas.: 0.00e+00 cone infeas.: 0.00e+00

Basic solution
Problem status : PRIMAL_FEASIBLE
Solution status : PRIMAL_FEASIBLE
Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
infeas.: 0.00e+00
Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
infeas.: 0.00e+00

Integer solution
Problem status : PRIMAL_FEASIBLE
Solution status : INTEGER_OPTIMAL
Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
infeas.: 0.00e+00 integer infeas.: 0.00e+00

Optimizer - real time : 0.08 cpu time: 0.08
Interior-point - iterations : 0 cpu time: 0.00
Basis identification - cpu time: 0.00
Primal - iterations : 0 cpu time: 0.00
Dual - iterations : 0 cpu time: 0.00
Clean - iterations : 0 cpu time: 0.00
Simplex - cpu time: 0.00
Primal simplex - iterations : 0 cpu time: 0.00
Dual simplex - iterations : 0 cpu time: 0.00
Mixed integer - relaxations: 0 cpu time: 0.07


Return code - 0 [MSK_RES_OK]

--- Restarting execution
--- testme.gms(35) 0 Mb
--- Reading solution for model jtl
*** Status: Normal completion
--- Job testme.gms Stop 05/05/08 13:02:13 elapsed 0:00:00.163

Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »



Jeff, There seems to be a bug in the GAMS/MOSEK interface, but here is
a workaround: Add

jtl.bratio=0;

infront of the solve statement. With that the levels of the variables
make it all the way to MOSEK.

Michael

On May 5, 2:23 pm, Jeff Linderoth wrote:
> > Hello Gams,
> >
> > Can someone please help me learn how to use the 'specify initial integer
> > solution' for the MIP solver in Mosek via GAMS?
> > There is a parameter MSK_IPAR_MIO_CONSTRUCT_SOL by which one can
> > (supposedly) set an initial integer solution. I can't seem to make it work.
> >
> > Here is a toy example problem:
> > -------------------------
> >
> > $title Steve Dirkse is Cool
> >
> > set N /1*3/;
> >
> > binary variables
> > x1
> > x2
> > x3
> > ;
> >
> > free variable z;
> >
> > equations
> > obj
> > c1
> > c2
> > ;
> >
> > obj..
> > z =E= 2*x1 + x2 + 3*x3;
> >
> > c1..
> > x1 + x2 + x3 =G= 1;
> >
> > c2..
> > x1 + 2*x3 =G= 2;
> >
> > x1.l = 1;
> > x2.l = 1;
> > x3.l = 1;
> >
> > model jtl /all/;
> > option mip=mosek;
> > jtl.optfile = 1;
> > solve jtl using mip minimizing z;
> >
> > ---------------------------
> >
> > With the mosek.opt file:
> >
> > MSK_IPAR_LOG_MIO_FREQ 1
> > MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
> > MSK_IPAR_MIO_CUT_LEVEL_TREE 0
> > MSK_IPAR_MIO_CONSTRUCT_SOL 1
> >
> > -------------------------
> >
> > Gives the output:
> >
> > -------------------------------------
> >
> > linderot@meisterbrau:~/svn-mods/pcuts/data/mv$ gams testme.gms
> > --- Job testme.gms Start 05/05/08 13:02:13
> > GAMS Rev 227 Copyright (C) 1987-2008 GAMS Development. All rights reserved
> > Licensee: Computer Sciences Dept. G080221/0001AS-LNX
> > University of Wisconsin-Madison DC2621
> > License for teaching and research at degree granting institutions
> > --- Starting compilation
> > --- testme.gms(38) 3 Mb
> > --- Starting execution: elapsed 0:00:00.006
> > --- testme.gms(34) 4 Mb
> > --- Generating MIP model jtl
> > --- testme.gms(35) 4 Mb
> > --- 3 rows 4 columns 9 non-zeroes
> > --- 3 discrete-columns
> > --- Executing MOSEK: elapsed 0:00:00.028
> > MOSEK Link May 1, 2008 22.7.1 LNX 3927.4685 LX3 x86/Linux
> >
> > M O S E K version 5.0.0.79 (Build date: Jan 29 2008 13:55:37)
> > Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16
> > DK-2100 Copenhagen, Denmark
> > http://www.mosek.com
> >
> > Reading parameter(s) from
> > "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt">> MSK_IPAR_LOG_MIO_FREQ 1
>>> > >> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
>>> > >> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
>>> > >> MSK_IPAR_MIO_CONSTRUCT_SOL 1
> >
> > Finished reading from
> > "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
> > No initial feasible MIO solution found.
> > Mixed integer optimizer started.
> > BRANCHES RELAXS ACT_NDS BEST_INT_OBJ BEST_RELAX_OBJ
> > REL_GAP(%) TIME
> > 0 0 0 3.0000000000e+00 NA NA
> > 0.1
> > 0 0 0 3.0000000000e+00 NA NA
> > 0.1
> >
> > Objective of best integer solution : 3.00000000e+00
> > Construct solution objective : Not employed
> > User objective cut value : Not employed
> > Number of branches : 0
> > Number of cuts generated : 0
> > Number of relaxations solved : 0
> > Number of interior point iterations: 0
> > Number of simplex iterations : 0
> > Mixed integer optimizer terminated. Time: 0.07
> >
> > Interior-point optimizer started.
> > Presolve started.
> > Linear dependency checker started.
> > Linear dependency checker terminated.
> > Presolve - time : 0.00
> > Presolve - Stk. size (kb) : 0
> > Eliminator - tries : 0 time
> > : 0.00
> > Eliminator - elim's : 0
> > Lin. dep. - tries : 1 time
> > : 0.00
> > Lin. dep. - number : 0
> > Presolve terminated.
> > Interior-point optimizer terminated. CPU time: 0.00. Real time: 0.00.
> >
> > Interior-point solution
> > Problem status : PRIMAL_FEASIBLE
> > Solution status : PRIMAL_FEASIBLE
> > Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
> > infeas.: 0.00e+00 cone infeas.: 0.00e+00
> > Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
> > infeas.: 0.00e+00 cone infeas.: 0.00e+00
> >
> > Basic solution
> > Problem status : PRIMAL_FEASIBLE
> > Solution status : PRIMAL_FEASIBLE
> > Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
> > infeas.: 0.00e+00
> > Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
> > infeas.: 0.00e+00
> >
> > Integer solution
> > Problem status : PRIMAL_FEASIBLE
> > Solution status : INTEGER_OPTIMAL
> > Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
> > infeas.: 0.00e+00 integer infeas.: 0.00e+00
> >
> > Optimizer - real time : 0.08 cpu time: 0.08
> > Interior-point - iterations : 0 cpu time: 0.00
> > Basis identification - cpu time: 0.00
> > Primal - iterations : 0 cpu time: 0.00
> > Dual - iterations : 0 cpu time: 0.00
> > Clean - iterations : 0 cpu time: 0.00
> > Simplex - cpu time: 0.00
> > Primal simplex - iterations : 0 cpu time: 0.00
> > Dual simplex - iterations : 0 cpu time: 0.00
> > Mixed integer - relaxations: 0 cpu time: 0.07
> >
> > Return code - 0 [MSK_RES_OK]
> >
> > --- Restarting execution
> > --- testme.gms(35) 0 Mb
> > --- Reading solution for model jtl
> > *** Status: Normal completion
> > --- Job testme.gms Stop 05/05/08 13:02:13 elapsed 0:00:00.163
> > --
> >
> > ------------------------
> >
> > Please note the 'No initial feasible MIO solution found.' which leads
> > me to believe that the solution (x.l) is not getting sent through gams
> > to Mosek.
> >
> > Also, if by chance anyone knows how to set an upper bound 'cutoff' value
> > for the MIP optimization in mosek, I'd be much obliged. Otherwise, I
> > can always email Mosek.
> > (The parameter MSK_DPAR_UPPER_OBJ_CUT does not seem to do the trick).
> >
> > As usual, thanks very much for all the help you can provide and for such
> > a nifty software tool.
> >
> > Cheers,
> > -Jeff
> > ----------
> > Jeff Linderoth
> > Assistant Professor
> > Dept. of Industrial and Systems Engineering
> > University of Wisconsin-Madison
> > O: 608-890-1931
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »


jtl (3) was Jeff's userid when he was still at Lehigh.
Hi Jeff!
Hans

On Mon, 5 May 2008, Gamsworld Admin wrote:

> >
> > Jeff, There seems to be a bug in the GAMS/MOSEK interface, but here is
> > a workaround: Add
> >
> > jtl.bratio=0;
> >
> > infront of the solve statement. With that the levels of the variables
> > make it all the way to MOSEK.
> >
> > Michael
> >
> > On May 5, 2:23 pm, Jeff Linderoth wrote:
>> >> Hello Gams,
>> >>
>> >> Can someone please help me learn how to use the 'specify initial integer
>> >> solution' for the MIP solver in Mosek via GAMS?
>> >> There is a parameter MSK_IPAR_MIO_CONSTRUCT_SOL by which one can
>> >> (supposedly) set an initial integer solution. I can't seem to make it work.
>> >>
>> >> Here is a toy example problem:
>> >> -------------------------
>> >>
>> >> $title Steve Dirkse is Cool
>> >>
>> >> set N /1*3/;
>> >>
>> >> binary variables
>> >> x1
>> >> x2
>> >> x3
>> >> ;
>> >>
>> >> free variable z;
>> >>
>> >> equations
>> >> obj
>> >> c1
>> >> c2
>> >> ;
>> >>
>> >> obj..
>> >> z =E= 2*x1 + x2 + 3*x3;
>> >>
>> >> c1..
>> >> x1 + x2 + x3 =G= 1;
>> >>
>> >> c2..
>> >> x1 + 2*x3 =G= 2;
>> >>
>> >> x1.l = 1;
>> >> x2.l = 1;
>> >> x3.l = 1;
>> >>
>> >> model jtl /all/;
>> >> option mip=mosek;
>> >> jtl.optfile = 1;
>> >> solve jtl using mip minimizing z;
>> >>
>> >> ---------------------------
>> >>
>> >> With the mosek.opt file:
>> >>
>> >> MSK_IPAR_LOG_MIO_FREQ 1
>> >> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
>> >> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
>> >> MSK_IPAR_MIO_CONSTRUCT_SOL 1
>> >>
>> >> -------------------------
>> >>
>> >> Gives the output:
>> >>
>> >> -------------------------------------
>> >>
>> >> linderot@meisterbrau:~/svn-mods/pcuts/data/mv$ gams testme.gms
>> >> --- Job testme.gms Start 05/05/08 13:02:13
>> >> GAMS Rev 227 Copyright (C) 1987-2008 GAMS Development. All rights reserved
>> >> Licensee: Computer Sciences Dept. G080221/0001AS-LNX
>> >> University of Wisconsin-Madison DC2621
>> >> License for teaching and research at degree granting institutions
>> >> --- Starting compilation
>> >> --- testme.gms(38) 3 Mb
>> >> --- Starting execution: elapsed 0:00:00.006
>> >> --- testme.gms(34) 4 Mb
>> >> --- Generating MIP model jtl
>> >> --- testme.gms(35) 4 Mb
>> >> --- 3 rows 4 columns 9 non-zeroes
>> >> --- 3 discrete-columns
>> >> --- Executing MOSEK: elapsed 0:00:00.028
>> >> MOSEK Link May 1, 2008 22.7.1 LNX 3927.4685 LX3 x86/Linux
>> >>
>> >> M O S E K version 5.0.0.79 (Build date: Jan 29 2008 13:55:37)
>> >> Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16
>> >> DK-2100 Copenhagen, Denmark
>> >> http://www.mosek.com
>> >>
>> >> Reading parameter(s) from
>> >> "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt">> MSK_IPAR_LOG_MIO_FREQ 1
>>>> >>>> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
>>>> >>>> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
>>>> >>>> MSK_IPAR_MIO_CONSTRUCT_SOL 1
>> >>
>> >> Finished reading from
>> >> "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
>> >> No initial feasible MIO solution found.
>> >> Mixed integer optimizer started.
>> >> BRANCHES RELAXS ACT_NDS BEST_INT_OBJ BEST_RELAX_OBJ
>> >> REL_GAP(%) TIME
>> >> 0 0 0 3.0000000000e+00 NA NA
>> >> 0.1
>> >> 0 0 0 3.0000000000e+00 NA NA
>> >> 0.1
>> >>
>> >> Objective of best integer solution : 3.00000000e+00
>> >> Construct solution objective : Not employed
>> >> User objective cut value : Not employed
>> >> Number of branches : 0
>> >> Number of cuts generated : 0
>> >> Number of relaxations solved : 0
>> >> Number of interior point iterations: 0
>> >> Number of simplex iterations : 0
>> >> Mixed integer optimizer terminated. Time: 0.07
>> >>
>> >> Interior-point optimizer started.
>> >> Presolve started.
>> >> Linear dependency checker started.
>> >> Linear dependency checker terminated.
>> >> Presolve - time : 0.00
>> >> Presolve - Stk. size (kb) : 0
>> >> Eliminator - tries : 0 time
>> >> : 0.00
>> >> Eliminator - elim's : 0
>> >> Lin. dep. - tries : 1 time
>> >> : 0.00
>> >> Lin. dep. - number : 0
>> >> Presolve terminated.
>> >> Interior-point optimizer terminated. CPU time: 0.00. Real time: 0.00.
>> >>
>> >> Interior-point solution
>> >> Problem status : PRIMAL_FEASIBLE
>> >> Solution status : PRIMAL_FEASIBLE
>> >> Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
>> >> infeas.: 0.00e+00 cone infeas.: 0.00e+00
>> >> Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
>> >> infeas.: 0.00e+00 cone infeas.: 0.00e+00
>> >>
>> >> Basic solution
>> >> Problem status : PRIMAL_FEASIBLE
>> >> Solution status : PRIMAL_FEASIBLE
>> >> Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
>> >> infeas.: 0.00e+00
>> >> Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound
>> >> infeas.: 0.00e+00
>> >>
>> >> Integer solution
>> >> Problem status : PRIMAL_FEASIBLE
>> >> Solution status : INTEGER_OPTIMAL
>> >> Primal - objective: 3.0000000000e+00 eq. infeas.: 0.00e+00 max bound
>> >> infeas.: 0.00e+00 integer infeas.: 0.00e+00
>> >>
>> >> Optimizer - real time : 0.08 cpu time: 0.08
>> >> Interior-point - iterations : 0 cpu time: 0.00
>> >> Basis identification - cpu time: 0.00
>> >> Primal - iterations : 0 cpu time: 0.00
>> >> Dual - iterations : 0 cpu time: 0.00
>> >> Clean - iterations : 0 cpu time: 0.00
>> >> Simplex - cpu time: 0.00
>> >> Primal simplex - iterations : 0 cpu time: 0.00
>> >> Dual simplex - iterations : 0 cpu time: 0.00
>> >> Mixed integer - relaxations: 0 cpu time: 0.07
>> >>
>> >> Return code - 0 [MSK_RES_OK]
>> >>
>> >> --- Restarting execution
>> >> --- testme.gms(35) 0 Mb
>> >> --- Reading solution for model jtl
>> >> *** Status: Normal completion
>> >> --- Job testme.gms Stop 05/05/08 13:02:13 elapsed 0:00:00.163
>> >> --
>> >>
>> >> ------------------------
>> >>
>> >> Please note the 'No initial feasible MIO solution found.' which leads
>> >> me to believe that the solution (x.l) is not getting sent through gams
>> >> to Mosek.
>> >>
>> >> Also, if by chance anyone knows how to set an upper bound 'cutoff' value
>> >> for the MIP optimization in mosek, I'd be much obliged. Otherwise, I
>> >> can always email Mosek.
>> >> (The parameter MSK_DPAR_UPPER_OBJ_CUT does not seem to do the trick).
>> >>
>> >> As usual, thanks very much for all the help you can provide and for such
>> >> a nifty software tool.
>> >>
>> >> Cheers,
>> >> -Jeff
>> >> ----------
>> >> Jeff Linderoth
>> >> Assistant Professor
>> >> Dept. of Industrial and Systems Engineering
>> >> University of Wisconsin-Madison
>> >> O: 608-890-1931
>> > >
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---

Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »



Hi Michael,

Thanks. I should have named my gams model

$title Michael Bussieck is cool
not
$title Steve Dirkse is cool

The workaround 'kind of' worked, in that mosek seemed to fix the
variables and solve the relaxation. However, I'm not sure if it is
actually using the value obtained for fathoming in the branch and bound.
Subsequent BEST_INT_OBJ log lines seem to indicate that it does not have
a feasible integer solution in hand.
Below is some gams output to show you what I mean...

In any event, all I *really* want to do is to specify an 'upper bound'
that mosek should use for fathoming. I thought I might be able to
'trick it' into doing this by specifying a complete solution.

In any event, thanks for all your help.

Cheers,
-Jeff


Gamsworld Admin wrote:
> > Jeff, There seems to be a bug in the GAMS/MOSEK interface, but here is
> > a workaround: Add
> >
> > jtl.bratio=0;
> >
> > infront of the solve statement. With that the levels of the variables
> > make it all the way to MOSEK.
> >

MOSEK Link May 1, 2008 22.7.1 LNX 3927.4685 LX3 x86/Linux

M O S E K version 5.0.0.79 (Build date: Jan 29 2008 13:55:37)
Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16
DK-2100 Copenhagen, Denmark
http://www.mosek.com

GAMS/MOSEK Extended license detected
Reading parameter(s) from
"/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
>> MSK_IPAR_LOG_MIO_FREQ 1
>> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
>> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
>> MSK_IPAR_MIO_CONSTRUCT_SOL 1
>>
Finished reading from
"/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
Constructing feasible MIO solution from initial solution.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Total number of eliminations : 0
Eliminator terminated.
Presolve - time : 0.01
Presolve - Stk. size (kb) : 291
Eliminator - tries : 1 time
: 0.00
Eliminator - elim's : 0
Lin. dep. - tries : 1 time
: 0.00
Lin. dep. - number : 0
Presolve terminated.
Matrix reordering started.
Local matrix reordering started.
Local matrix reordering terminated.
Matrix reordering terminated.
Optimizer - threads : 1
Optimizer - solved problem : the primal
Optimizer - constraints : 202 variables
: 614
Factor - setup time : 0.00 order time
: 0.00
Factor - GP order used : no GP order time
: 0.00
Factor - nonzeros before factor : 208 after factor
: 208
Factor - offending columns : 10 flops
: 2.21e+03
ITE PFEAS DFEAS KAP/TAU POBJ DOBJ MU
TIME
0 1.3e+01 3.1e+01 1.0e+00 4.507269816e+06 0.000000000e+00
2.1e+02 0.01
1 2.9e-02 7.0e-02 3.9e+01 3.680933104e+05 -1.055576730e+04
4.8e-01 0.01
2 4.5e-04 1.1e-03 2.7e-01 1.262171727e+03 -5.372213091e+03
7.6e-03 0.01
3 1.7e-05 4.1e-05 6.5e-03 1.281552102e+02 -1.095073803e+02
2.8e-04 0.01
4 8.5e-06 2.1e-05 2.3e-03 1.432285267e+02 2.699705619e+01
1.4e-04 0.01
5 6.9e-07 1.7e-06 1.8e-04 8.836304489e+01 7.914110764e+01
1.2e-05 0.02
6 5.9e-08 1.5e-07 1.4e-05 8.288126204e+01 8.208665543e+01
1.0e-06 0.02
7 1.9e-08 4.6e-08 3.6e-06 8.246528750e+01 8.221245472e+01
3.2e-07 0.02
8 4.3e-09 1.1e-08 7.8e-07 8.230407399e+01 8.224653474e+01
7.2e-08 0.02
9 1.7e-09 4.1e-09 2.8e-07 8.227523636e+01 8.225274878e+01
2.8e-08 0.02
10 3.7e-10 9.2e-10 6.0e-08 8.226041591e+01 8.225538822e+01
6.3e-09 0.03
11 1.1e-10 2.8e-10 1.6e-08 8.225746807e+01 8.225595172e+01
1.9e-09 0.03
12 1.8e-11 4.4e-11 2.4e-09 8.225636741e+01 8.225612642e+01
3.0e-10 0.03
13 5.0e-13 1.2e-12 5.8e-11 8.225616361e+01 8.225615685e+01
8.5e-12 0.03
14 1.8e-13 6.4e-14 3.0e-12 8.225615786e+01 8.225615751e+01
4.4e-13 0.03
Interior-point optimizer terminated. CPU time: 0.04. Real time: 0.06.

Initial feasible solution found with objective value 8.225616e+01.
Mixed integer optimizer started.
BRANCHES RELAXS ACT_NDS BEST_INT_OBJ BEST_RELAX_OBJ
REL_GAP(%) TIME
0 1 0 NA 5.2199522754e+01 NA
1.7
0 6 0 NA 5.2199522754e+01 NA
7.6
1 11 1 NA 5.2199522754e+01 NA
14.3
2 16 2 NA 5.2199522754e+01 NA
20.6
0 17 2 NA 5.2262205338e+01 NA
21.8
3 21 2 NA 5.2262205338e+01 NA
26.7
26 4 NA 5.2262205338e+01 NA
32.5
5 31 5 NA 5.2262205338e+01 NA
39.9
6 36 6 NA 5.2262205338e+01 NA
45.5
7 37 7 NA 5.2262205338e+01 NA
47.2
8 42 7 NA 5.2262205338e+01 NA
53.7
9 47 8 NA 5.2262205338e+01 NA
59.8
10 48 9 NA 5.2262205338e+01 NA
61.2
11 53 9 NA 5.2262205338e+01 NA
67.7
12 58 10 NA 5.2262205338e+01 NA
73.8
13 59 11 NA 5.2262205338e+01 NA
75.2
14 60 11 NA 5.2262205338e+01 NA
76.4




Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »



Jeff,

Ego is big enough already ;-)

On the two examples I tried (dice.gms from the GAMS model library and
your little example) MOSEK was actually taking the initial solution as
the incumbent with all the benefits of an incumbent. I don't know why
it didn't do that with your bigger example. Any chance I can get my
hands on this? If you don't want to share it with the group you can
send it privately to me (mbussieck@gams.com) and I either figure it
out myself or get in contact with Erling.

Regards,
Michael

On May 5, 5:32 pm, Jeff Linderoth wrote:
> > Hi Michael,
> >
> > Thanks. I should have named my gams model
> >
> > $title Michael Bussieck is cool
> > not
> > $title Steve Dirkse is cool
> >
> > The workaround 'kind of' worked, in that mosek seemed to fix the
> > variables and solve the relaxation. However, I'm not sure if it is
> > actually using the value obtained for fathoming in the branch and bound.
> > Subsequent BEST_INT_OBJ log lines seem to indicate that it does not have
> > a feasible integer solution in hand.
> > Below is some gams output to show you what I mean...
> >
> > In any event, all I *really* want to do is to specify an 'upper bound'
> > that mosek should use for fathoming. I thought I might be able to
> > 'trick it' into doing this by specifying a complete solution.
> >
> > In any event, thanks for all your help.
> >
> > Cheers,
> > -Jeff
> >
> > Gamsworld Admin wrote:
>> > > Jeff, There seems to be a bug in the GAMS/MOSEK interface, but here is
>> > > a workaround: Add
> >
>> > > jtl.bratio=0;
> >
>> > > infront of the solve statement. With that the levels of the variables
>> > > make it all the way to MOSEK.
> >
> > MOSEK Link May 1, 2008 22.7.1 LNX 3927.4685 LX3 x86/Linux
> >
> > M O S E K version 5.0.0.79 (Build date: Jan 29 2008 13:55:37)
> > Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16
> > DK-2100 Copenhagen, Denmark
> > http://www.mosek.com
> >
> > GAMS/MOSEK Extended license detected
> > Reading parameter(s) from
> > "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
> > >> MSK_IPAR_LOG_MIO_FREQ 1
> > >> MSK_IPAR_MIO_CUT_LEVEL_ROOT 0
> > >> MSK_IPAR_MIO_CUT_LEVEL_TREE 0
> > >> MSK_IPAR_MIO_CONSTRUCT_SOL 1
> > >>
> > Finished reading from
> > "/afs/cs.wisc.edu/u/l/i/linderot/svn-mods/pcuts/data/mv/mosek.opt"
> > Constructing feasible MIO solution from initial solution.
> > Conic interior-point optimizer started.
> > Presolve started.
> > Linear dependency checker started.
> > Linear dependency checker terminated.
> > Eliminator started.
> > Total number of eliminations : 0
> > Eliminator terminated.
> > Presolve - time : 0.01
> > Presolve - Stk. size (kb) : 291
> > Eliminator - tries : 1 time
> > : 0.00
> > Eliminator - elim's : 0
> > Lin. dep. - tries : 1 time
> > : 0.00
> > Lin. dep. - number : 0
> > Presolve terminated.
> > Matrix reordering started.
> > Local matrix reordering started.
> > Local matrix reordering terminated.
> > Matrix reordering terminated.
> > Optimizer - threads : 1
> > Optimizer - solved problem : the primal
> > Optimizer - constraints : 202 variables
> > : 614
> > Factor - setup time : 0.00 order time
> > : 0.00
> > Factor - GP order used : no GP order time
> > : 0.00
> > Factor - nonzeros before factor : 208 after factor
> > : 208
> > Factor - offending columns : 10 flops
> > : 2.21e+03
> > ITE PFEAS DFEAS KAP/TAU POBJ DOBJ MU
> > TIME
> > 0 1.3e+01 3.1e+01 1.0e+00 4.507269816e+06 0.000000000e+00
> > 2.1e+02 0.01
> > 1 2.9e-02 7.0e-02 3.9e+01 3.680933104e+05 -1.055576730e+04
> > 4.8e-01 0.01
> > 2 4.5e-04 1.1e-03 2.7e-01 1.262171727e+03 -5.372213091e+03
> > 7.6e-03 0.01
> > 3 1.7e-05 4.1e-05 6.5e-03 1.281552102e+02 -1.095073803e+02
> > 2.8e-04 0.01
> > 4 8.5e-06 2.1e-05 2.3e-03 1.432285267e+02 2.699705619e+01
> > 1.4e-04 0.01
> > 5 6.9e-07 1.7e-06 1.8e-04 8.836304489e+01 7.914110764e+01
> > 1.2e-05 0.02
> > 6 5.9e-08 1.5e-07 1.4e-05 8.288126204e+01 8.208665543e+01
> > 1.0e-06 0.02
> > 7 1.9e-08 4.6e-08 3.6e-06 8.246528750e+01 8.221245472e+01
> > 3.2e-07 0.02
> > 8 4.3e-09 1.1e-08 7.8e-07 8.230407399e+01 8.224653474e+01
> > 7.2e-08 0.02
> > 9 1.7e-09 4.1e-09 2.8e-07 8.227523636e+01 8.225274878e+01
> > 2.8e-08 0.02
> > 10 3.7e-10 9.2e-10 6.0e-08 8.226041591e+01 8.225538822e+01
> > 6.3e-09 0.03
> > 11 1.1e-10 2.8e-10 1.6e-08 8.225746807e+01 8.225595172e+01
> > 1.9e-09 0.03
> > 12 1.8e-11 4.4e-11 2.4e-09 8.225636741e+01 8.225612642e+01
> > 3.0e-10 0.03
> > 13 5.0e-13 1.2e-12 5.8e-11 8.225616361e+01 8.225615685e+01
> > 8.5e-12 0.03
> > 14 1.8e-13 6.4e-14 3.0e-12 8.225615786e+01 8.225615751e+01
> > 4.4e-13 0.03
> > Interior-point optimizer terminated. CPU time: 0.04. Real time: 0.06.
> >
> > Initial feasible solution found with objective value 8.225616e+01.
> > Mixed integer optimizer started.
> > BRANCHES RELAXS ACT_NDS BEST_INT_OBJ BEST_RELAX_OBJ
> > REL_GAP(%) TIME
> > 0 1 0 NA 5.2199522754e+01 NA
> > 1.7
> > 0 6 0 NA 5.2199522754e+01 NA
> > 7.6
> > 1 11 1 NA 5.2199522754e+01 NA
> > 14.3
> > 2 16 2 NA 5.2199522754e+01 NA
> > 20.6
> > 0 17 2 NA 5.2262205338e+01 NA
> > 21.8
> > 3 21 2 NA 5.2262205338e+01 NA
> > 26.7
> > 26 4 NA 5.2262205338e+01 NA
> > 32.5
> > 5 31 5 NA 5.2262205338e+01 NA
> > 39.9
> > 6 36 6 NA 5.2262205338e+01 NA
> > 45.5
> > 7 37 7 NA 5.2262205338e+01 NA
> > 47.2
> > 8 42 7 NA 5.2262205338e+01 NA
> > 53.7
> > 9 47 8 NA 5.2262205338e+01 NA
> > 59.8
> > 10 48 9 NA 5.2262205338e+01 NA
> > 61.2
> > 11 53 9 NA 5.2262205338e+01 NA
> > 67.7
> > 12 58 10 NA 5.2262205338e+01 NA
> > 73.8
> > 13 59 11 NA 5.2262205338e+01 NA
> > 75.2
> > 14 60 11 NA 5.2262205338e+01 NA
> > 76.4
> >
> > --
> > Jeff Linderoth
> > Assistant Professor
> > Dept. of Industrial and Systems Engineering
> > University of Wisconsin-Madison
> > O: 608-890-1931
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »


Hi Michael,


> >
> > On the two examples I tried (dice.gms from the GAMS model library and
> > your little example) MOSEK was actually taking the initial solution as
> > the incumbent with all the benefits of an incumbent. I don't know why
> > it didn't do that with your bigger example. Any chance I can get my
> > hands on this? If you don't want to share it with the group you can
> > send it privately to me (mbussieck@gams.com) and I either figure it
> > out myself or get in contact with Erling.

I perhaps spoke too soon. I'm attaching model, data, and log file from
a run in which I set the initial solution. I may have been thrown off
by the fact that mosek didn't put a solution value in the BEST_INT_OBJ

When it does (eventually) find a solution, its value is better than the
'original' solution I input, so perhaps it *is* using the value for
fathoming, and also hopefully for stopping the subproblem solution early
if possible).

Thanks again for all your help.

Cheers,
-Jeff

Attachments
mb.tar.gz
(197.94 KiB) Downloaded 368 times
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: GAMS/Mosek initial integer solution?

Post by Archiver »



Hi Jeff and Michael

I just took a look a the interface between GAMS and MOSEK. Currently
you can only hotstart linear integer problems.
The link simply has not been updated to handle warmstart of mixed
integer conic problems.

I will work with Michael on fixing that.

Erling

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Post Reply