help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Get exact solutions?


From: Sergio Giro
Subject: [Help-glpk] Get exact solutions?
Date: Tue, 22 Nov 2011 19:36:01 +0000

Hello,

My purpose with this mail is to discuss how to extend the
functionality provided by glpk with respect to exact solutions for the
simplex method.

I already studied the code, implemented a hackish solution and think
that I can help to extend the code.

Reading the API I guessed that the idea was to make the interface gmp
agnostic, and so I implemented the (horrendous) function:

int glp_exact_sol(glp_prob *lp, const glp_smcp *parm, char *num,
                         size_t num_size, char *den, size_t den_size)

in addition to

int glp_exact(glp_prob *lp, const glp_smcp *parm)

The additional parameters
"char *num, size_t num_size, char *den, size_t den_size"
are a pointer to a buffer for the numerator of the objective value and
its size, and the denominator and its size.

However, it would be useful to have the functionality to retrieve the
values of the variables in the optimal solution, etc.

Maybe defining a struct glp_exact_res and a function
int glp_exact_sol(glp_prob *lp, const glp_smcp *parm, glp_exact_res *res)
yields a better interface.

Still remains the problem of how to return the exact values without
resorting to gmp.

Are you interested on extending this functionality? Any ideas on how
an interface to retrieve exact values should look like?

Best,
Sergio

-- 
Kent: When cat burglaries start, can mass murders be far behind? This
reporter isn´t saying the burglar is an inhuman monster, like the
Wolfman. But he very well could be. So, professor, would you say it´s
time for everyone to panic?
Prof: Yes, I would, Kent.

(Later)

Kent: Hordes of panicky people are evacuating town for some unknown
reason. Professor, without knowing precisely what the danger is would
you say it´s time for our viewers to crack each others´ heads open and
feast on the goo inside?
Prof: Yes, I would, Kent.



reply via email to

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