[Symphony] how to use clp in my c code.

Ashutosh Mahajan asm4 at lehigh.edu
Thu Apr 15 13:17:05 EDT 2010


On Thu, Apr 15, 2010 at 12:42:31AM +0530, G Chandramouli wrote:
>    Hello all,
>                   I am trying to compare branch and bound algorithm with
>    Genetic algorithm. For branch and bound I used Symphony but for GA I need
>    to solve simple relaxations or LP at each iteration. Hence I need to use
>    CLP for each LP generated in process. I am unable to use the exact header
>    file for it. Kindly tell me which header file and what kind of input does
>    it require from user. I have a code to write cplex LP format. Can some
>    minor changes be made to it to use it for CLP.
>    Thanks in advance.
>    Regards
>    Mouli

You should probably use OsiClp to solve your LP with clp. something like
#include "OsiClpSolverInterface.hpp"

This file is installed in include/coin/ subdirectory in the directory where
symphony gets installed. Then you will probably need to use the loadProblem()
to load the A matrix, rhs, sense, objective and bounds. After that you can call
initialSolve(), resolve(), lexSolve() depending upon your needs. More helpful
hints are available in the above header file.

--
regards
Ashutosh Mahajan
http://coral.ie.lehigh.edu/~asm4




More information about the Symphony mailing list