[Clp] restricted basis entry rule

John Forrest john.forrest at fastercoin.com
Sat Jan 1 05:22:51 EST 2011


On Tue, 2010-12-28 at 01:29 -0500, OYO1 at pitt.edu wrote:
> Hi,
> 
> I would like to implement a restricted basis entry rule where the entering
> variable will be the one whose reduced cost is most negative (or some
> other rule) provided that its complementary variable is not in the basis
> or would leave the basis on the same iteration.
> 
> Obviously, I want to do this for solving a KKT system. Is such a rule
> already implemented in CLP? If so, how do I use it? If not, where should I
> start? I do not have any former experience with CLP.

To implement such a rule -

Let us assume you downloaded Clp and built a debug version e.g. created
a directory debug and in that directory did 
../configure --enable-debug
and
make install

Go to debug/Clp/examples, copy Clp/examples/minimum.cpp as test.cpp
check that works with
make DRIVER=test
and
test .../Netlib/25fv47.mps

modify test.cpp and add before model.primal();
 ClpPrimalColumnDantzig dantzig;

model.setPrimalColumnPivotAlgorithm(dantzig);

do make and test again to check still works (should be a bit slower)

Copy ClpPrimalColumnDantzig.?pp as ClpPrimalColumnKKT.?pp and
edit all occurrences of Dantzig to KKT (and in test.cpp)

add
ClpPrimalColumnKKT.o 
to OBJS list in Makefile

do make and test - results should be same as last run.

Now you are ready to modify ClpPrimalColumnKKT.?pp to change which
incoming variables are allowed.

Good Luck (instructions are approximate). 
> 
> Also, is there a CLP example source code for solving linear programs with
> quadratic objectives?
> 

Try Clp/examples/testQP.cpp

with no arguments it should solve a small problem using interior point
method.  Or give it a model (with objective specified by QUADOBJ in mps
file) to use simplex.

Hope that helps

John Forrest




More information about the Clp mailing list