[Top][All Lists]

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

Re: [Help-glpk] [Fwd: How to access variables by names]

From: glpk xypron
Subject: Re: [Help-glpk] [Fwd: How to access variables by names]
Date: Thu, 16 Jun 2011 20:39:14 +0200

Bonjour Lounes,

you may use the following functions:
glp_create_index - to build an index
glp_find_col - to find the column number for a column name
glp_delete_index - to free the index memory
glp_get_col_prim_value - to retrieve the value

See documentation in glpk-4.45/doc/glpk.pdf available with
the source distribution of GLPK at



-------- Original-Nachricht --------

> Dear All,
> (I'm student at Paris Dauphine University, France)
> I'm user of GLPK as a C library, i find it more handy, practical and
> very interesting (thanks to its "2010" documentation: glpk.pdf).  Now,
> i'm using GLPK (C library,  i work with Visual C++ 2008) for solving an
> ILP problem of about (an instance) 5426 constraints and 5400 integer
> variables (2687 of which are binary). Thanks to GLPK routines:
> - i generate solution files, .MPS,... ones
> - i can access structural variables (name, index and value)
> What i can't or i don't know how doing it is the felloing:
> I know the names of my variables and i want accessing them (their
> values) directly in my C program like this (for example):
> a = glp_get_col_prim_value(x_v[1,3]) where x_v[1,3] is my variable and i
> wish affecting its value to a.
> Any ideas or examples?
> Thanks in advance,
> Lounes

NEU: FreePhone - kostenlos mobil telefonieren!                  
Jetzt informieren:

reply via email to

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