help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] API glp_find_col


From: xypron
Subject: Re: [Help-glpk] API glp_find_col
Date: Mon, 30 Mar 2009 10:58:21 -0700 (PDT)

Hello!

rainly wrote:
> 
> My code is very simple as shown below. I use it to test glp_find_col but
> it doesn't work.
> 

You missed calling glp_create_index. See working example below.

Best regards

Xypron

Example:

int main (int argc, char *argv[])
{
    const char n[] = "z_0_0";
    glp_prob* lp;
    int c;

    lp = glp_create_prob();
    glp_add_cols(lp, 1);
    glp_set_col_name(lp, 1, n);
    glp_create_index(lp);

    c = glp_find_col(lp, n);
    printf("Column number: %d\n", c);
    glp_delete_prob(lp);
}

-- 
View this message in context: 
http://www.nabble.com/API-glp_find_col-tp22787490p22789055.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.





reply via email to

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