[Coin-discuss] Question about the bcp_main() function

diarrass at isima.fr diarrass at isima.fr
Thu Aug 2 04:04:57 EDT 2007


Hi.
I am a new user of Coin-Or Bcp module. I send this e-mail because I found
a problem when developping a program using BCP. In fact, in this program I
have to solve a series of integer programs using the
branch-and-cut method and each integer program depends on an integer
parameter v going from 0 to N (The main() function of this program is
given below).
I tried to call several times the bcp_main() function in a loop from 0 to
N but this loop only executes the first iteration (giving the correct
result) and exits. It appears that the program exits just after the first
call of the bcp_main() function.
Is this a bug in BCP or is their a way or a new version of BCP to correct it?

int main(int argc, char* argv[])
{
        int v;

        //Lancement de la boucle sur v
        for(v=0;v<10;v++)
        {
                cout << "BB_TM V == " << v << endl;

                BB_init bb_init(&v);
                int res = bcp_main(argc, argv, &bb_init);

                cout << "APRES BCP_MAIN RES = " << res << endl;
        }

        cout << "FIN DE L'OPTIMISATION" << endl;

        return(0);
}








More information about the Coin-discuss mailing list