help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: Same lp different results...


From: Andrew Makhorin
Subject: [Help-glpk] Re: Same lp different results...
Date: Sun, 8 Feb 2004 11:46:58 +0300

>I have got avery strange problem. I have to solve many similar lp systems
>within a c++ program. Now I have three systems and the third is exactly the
>same as the first one. The problem is, the first is solvable with an
>optimium of zero. The third one says:
>
>spx_invert: trying to factorize the basis using threshold tolerance 0.3
>spx_invert: trying to factorize the basis using threshold tolerance 0.7
>spx_invert: the basis matrix is singular
>lpx_simplex: initial basis is singular
>lpx_integer: optimal solution of LP relaxation required
>lpx_write_lpt: writing problem data to `third.lpt'...

When the simplex solver obtains a basic solution, it stores
corresponding information in the LPX problem object. Such information
includes, in particular, statuses of all (auxiliary and structural)
variables. When you call the simplex solver once again, it starts from
*current* basis defined by current statuses of variables. In your case
you change the constraint matrix and it becomes singular, i.e. some its
columns which correspond to basic variables are linearly dependent. This
is indicated by the message "lpx_simplex: initial basis is singular",
and the solver performs no calculations returning the code LPX_E_BADB.
To provide the solver with a valid initial basis you can use the api
routines lpx_std_basis or lpx_adv_basis. Another way is to use the
routines lpx_set_row_stat and lpx_set_col_stat to patch the current
basis.

I run all your three models with glpsol, and there were no problems.

Andrew Makhorin






reply via email to

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