[Coin-bcpdiscuss] Core cuts and vars

Laszlo Ladanyi ladanyi at us.ibm.com
Wed Nov 8 11:38:20 EST 2006


Hi Matteo,

You seem to be doing things correctly (at least the idea is correct :-). So
there is a bug either in BCP or in your code. The assign method picks up the
number of cols and rows (i.e., the lengths of the other arrays) from the
CoinPackedMatrix mat. So check first that everything is correct there. If you
find no problems then please, send me a stripped down version of your code, so
that I can quickly step through it (though I won;t have time to fix things
before next week sometime... :-(.

--Laci

On Wed, 8 Nov 2006, Matteo Salani wrote:

> Hello,
> 
> first of all a (very) small contribution on how I succeeded in compiling 
> Bcp under Cygwin
> 
> be sure to have Make.exe 3.8.0 and not 3.8.1 as pointed out in the wiki 
> pages
> 
> perform configure skipping Cgl and enabling dos compile:
> 
> ./configure -C COIN_SKIP_PROJECTS="Cgl" --enable-doscompile
> 
> from my experience no other ways to compile under cygwin. Trust me, I've 
> tried several.
> 
> 
> so after that I can pose a question hoping that someone will answer...  :) 
> 
> Within initialize_core I want to set up the core of Bcp having
> 
> n+m core cuts and
> n core variables
> 
> the n core cuts are \geq 1 inequalities
> while the m cuts are \leq 1 inequalities
> 
> so I decided to have n artificial core variables (one for each \geq 1 
> cut) in order to always satisfy feasibility of the LP (core vars are 
> never removed form LP)
> I'm pretty sure that I don't need m artificial variables for the m \leq 
> 1 constraints.
> 
> Now given that I've both core cuts and variables I should properly fill 
> a  BCP_lp_relax matrix within initialize_core.
> 
> So... declaring objective function, columns upper and lower bounds, rows 
> upper and lower bounds as following:
>     double*    obj = new double[ n ];
>     double*    clb = new double[ n ];
>     double*    cub = new double[ n ];
>     double*    rlb = new double[ n + m ];
>     double*    rub = new double[ n + m ];
> 
>     then a sparse CoinPackedMatrix to put ones on the main diagonal
>     then
> 
>     BCP_lp_matrix matrix;
>     matrix->assign( mat, obj, clb, cub, rlb, rub );   
> 
> I'm happy, I compile, I run and then...
> 
> I got this error:
> Illegal index n in OsiClpSolverInterface::setColumnSetBounds
> 
> should I declare and fill also m core variables? But they're not needed!
> why the Osi interface tries to access to element n? it shouldn't, it 
> knows I've only n core variables so indexed from 0 to n-1!
> 
> should I allocate n+1 spaces in obj, clb and cub. Maybe, but why?
> 
> thanks in advance,
> Matteo
> 
> _______________________________________________
> Coin-bcpdiscuss mailing list
> Coin-bcpdiscuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-bcpdiscuss
> 




More information about the Coin-bcpdiscuss mailing list