help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] lpx_integer


From: Andrew Makhorin
Subject: Re: [Help-glpk] lpx_integer
Date: Tue, 15 May 2007 20:22:02 +0400

> The new version of the glpk(4.16) does not let me explicitly change
> the problem class(lp/mip) because it could be calculated from the
> number of the integer variable. If I want to solve a problem but I
> do not know at coding time that it is lp or mip then I have to check
> it in running time and write two distinict code to retrieve the
> solution. I think the lpx_integer should be useable when the problem
> does not contain integer variables and in this case it should set
> the mip solution to the lp solution.

Necessary changes will appear in the next release.

If you wish, you can patch the source code (glpk 4.16) by yourself as
follows.

1. Comment out the following fragment (file glplpx08.c, lines 77-82):

#if 0
      /* the problem must be of MIP class */
      if (lpx_get_class(mip) != LPX_MIP)
      {  print("lpx_integer: problem is not of MIP class");
         ret = LPX_E_FAULT;
         goto done;
      }
#endif

2. Comment out the following fragment (file glplpx09.c, lines 515-520):

#if 0
      /* the problem must be of MIP class */
      if (lpx_get_class(orig) != LPX_MIP)
      {  print("lpx_intopt: problem is not of MIP class");
         ret = LPX_E_FAULT;
         goto done;
      }
#endif

Thank you for your suggestion.


Andrew Makhorin





reply via email to

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