help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Can we set a row with equal upper and lower bound?


From: Xypron
Subject: Re: [Help-glpk] [Fwd: Can we set a row with equal upper and lower bound?]
Date: Sun, 31 Jul 2011 13:19:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11

Hello Andrew,

in glp_simplex (glpk-4.45/src/glpapi06.c) you can find the following code:

         if (row->type == GLP_DB && row->lb >= row->ub)
         {  if (parm->msg_lev >= GLP_MSG_ERR)
               xprintf("glp_simplex: row %d: lb = %g, ub = %g; incorrec"
                  "t bounds\n", i, row->lb, row->ub);

According to the documentation (doc/glpk.pdf) and to the coding in routine glp_set_row_bnds() it is allowable for GLP_DB to have lower bound == upper bound.

Why would you disallow the the same in glp_simplex?

Best regards

Xypron

On 30.07.2011 05:28, Andrew Makhorin wrote:
-------- Forwarded Message --------
From: Wenfei Wu<address@hidden>
To: address@hidden
Subject: Can we set a row with equal upper and lower bound?
Date: Fri, 29 Jul 2011 12:07:35 -0700

Hi, all
    I am using GLPK now. the version is 4.45. I use it in Cygwin
    I have a problem.
    I set up a row with upper bound 0 and lower bound 0, the when I run
it. Problem appears.

  Code is
    glp_set_row_bnds(lp, 1, GLP_DB, 0.0, 0.0);

  output is
   glp_simplex: row 1: lb = 0, ub = 0; incorrect bounds

  Then I change the code
    glp_set_row_bnds(lp, 1, GLP_DB, 0.0, 0.001);
and it works.

  Does this mean that we cannot set both bound equal?  But in the GLPK
reference Manual, on page 13, it says "Bounds of variables can be
nite as well as innite. Besides, lower and upper bounds can be equal
to each other."

   Thanks.
   Wenfei



_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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