help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] glp_get_status


From: Robbie Morrison
Subject: Re: [Help-glpk] glp_get_status
Date: Tue, 18 Oct 2011 05:36:17 +1300 (NZDT)
User-agent: SquirrelMail/1.4.17

------------------------------------------------------------
To:           name name <address@hidden>
Subject:      Re: [Help-glpk] glp_get_status
Message-ID:  <address@hidden>
From:         Andrew Makhorin <address@hidden>
Date:         Mon, 17 Oct 2011 18:15:55 +0400
------------------------------------------------------------

>> For the LP model the whot is the value for the
>> GLP_INFEAS (solution is infeasible) ?
>>
>> Is there another value for the problems SUBOPTIMAL if
>> not what the status will send?
>
> Your question is unclear. Please reformulate it.
>
> Solution statuses returned by glp_get_status,
> glp_get_prim_stat, and glp_get_dual_stat are described
> in the glpk reference manual included in the
> distribution.

Please note that GLPK distinguishes between two types
of infeasibility:

  * the solver has yet to locate a feasible solution,
    but the problem has not been shown to be generally
    infeasible (most likely because the solver timed
    out)

  * the problem has been proven infeasible (this latter
    condition is sometimes known as 'nonfeasible')

These two conditions map to the return codes GLP_INFEAS
and GLP_NOFEAS respectively.  You can find more
information in the GLPK manual (as Andrew suggests).

If you need to know the integer value of these return
codes, then search the codebase.  On Linux (and it
would help if you said what platform you use), run
this:

 $ grep "GLP_INFEAS" src/*.h
   src/glpk.h:#define GLP_INFEAS   3  /* solution is infeasible */
 $ grep "GLP_NOFEAS" src/*.h
   src/glpk.h:#define GLP_NOFEAS   4  /* no feasible solution exists */

Or simply look thru the installed header:

  $ less /usr/local/include/glpk.h

That said, it is better programming practice to use the
macros and not their definitions.  There is no
guarantee that these definitions will remain unchanged.

Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]





reply via email to

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