[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: info about glpk
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] Re: info about glpk |
Date: |
Sat, 14 Jun 2003 21:18:37 +0400 |
>1. What kind of number representation does glpk use? floating point?
Floating point numbers (the type double in C) are used to represent
real quantities. Fixed point numbers (the type int in C) are used to
represent integer quantities (such as indices, dimensions, etc.).
>2. Does it deal with number overflow?
If you mean SIGFPE, NaNs, Infinities, etc., it does not (mainly for
portability reasons). However some sanity checks (to prevent zero divide,
etc.) are performed whenever necessary.
>3. I read it performs preprocessing. Preprocessing will delete empty
> rows/columns and convert constraints on just one variable to
>lower/upper bounds. But does it perform other kinds of preprocessing?
Yes, there are other kinds of presolving. For details please look at
comments in the module glplpp.c.
>4. I want to use B&B to find only a feasible (not optimal) integer
>solution. How can I do it?
As a rule MIP problem have a lot of integer feasible solutions. Which
one do you mean? The first one found by the solver? Or you need just to
solve feasiblity rather than optimality?
>5. after solving LP problems with simplex method, I read, glpk stores
>some useful information. If I added new constraints or new variables,
>could I use that information to solve the new LP problem faster?
The basis information is stored in the LPX problem object and exploited
by lpx_simplex automatically. Until you need to change the current basis
for some reasons, you simply call lpx_simplex once again, in which case
it starts from the current vertex. For example, the following sequence
can be used:
/* create the problem */
lp = lpx_create_prob();
lpx_add_rows(lp, ...);
lpx_add_cols(lp, ...);
...
/* scale the problem (if necessary) */
lpx_scale_prob(lp);
/* build an initial basis (if necessary) */
lpx_adv_basis(lp);
/* solve the problem */
lpx_simplex(lp);
/* analyze the basic solution */
stat = lpx_get_status(lp);
lpx_get_row_info(lp, ...);
lpx_get_col_info(lp, ...);
...
/* add new variables and constraints */
lpx_add_rows(lp, ...);
lpx_add_cols(lp, ...);
...
/* re-optimize the problem */
lpx_simplex(lp);
...
- [Help-glpk] Re: info about glpk,
Andrew Makhorin <=