[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] help me!!!

From: Andrew Makhorin
Subject: Re: [Help-glpk] help me!!!
Date: Mon, 02 Dec 2002 18:09:20 +0300

>I am now working on solving the sample.c data  by MIP methods and always
>get a results of "px_integer: optimal solution of LP relaxation
>Can anyone tell me why and how to fix it??

Before using lpx_integer you should obtain an optimal solution of LP
relaxation by means of lpx_simplex. In other word, your program should
look like follows:

   /* create mip problem instance */
   lp = lpx_create_prob();
   lpx_set_class(lp, LPX_MIP);
   /* scale the problem (optional) */
   /* construct advanced initial basis (optional) */
   /* find optimal solution of LP relaxation */
   ret = lpx_simplex(lp);
   /* make sure that the simplex method has successfully solved lp */
   assert(ret == LPX_E_OK);
   /* make sure that optimal solution exists */
   assert(lpx_get_status(lp) == LPX_OPT);
   /* try to solve mip using the branch-and-bound method */
   ret = lpx_integer(lp);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]