[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Error delete column
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] Error delete column |
Date: |
Sun, 9 Mar 2008 15:11:25 +0300 |
> That means that the basis matrix, i.e. a square matrix built from
> columns of the constraint matrix corresponding to basic variables, is
> singular, so the current basis defined by statuses of rows and columns
> is invalid in the sense that it does not define any basic solution.
> So I must do:
> glpkParamPtr.presolve=GLP_OFF;
> int ret=glp_simplex(glpkProbPtr,&glpkParamPtr);
> if (ret == GLP_EBADB){
> ret = lpx_warm_up(glpkProbPtr);
> if (ret == LPX_E_BADB){
> lpx_std_basis(glpkProbPtr);
> if(glp_simplex(glpkProbPtr,&glpkParamPtr)!=0)
> cout<<"could not solve LP"<<endl;
> }
> }
> else if(ret == GLP_ESING){
> ret = lpx_warm_up(glpkProbPtr);
> if (ret == LPX_E_SING){
> lpx_std_basis(glpkProbPtr);
> }
> if(glp_simplex(glpkProbPtr,&glpkParamPtr)!=0)
> cout<<"could not solve LP"<<endl;
> }
> Because, the LP solver use the precedent solution as initial solution
> before to resolve the LP.
If you did not remove active rows and basic columns and not change
constraint coefficients, the basis must remain valid.
> So, I must find a valid initial solution if a basis matrix is singular
> to obtain a invertible basis matrix
Yes. However, it is important to understand why the basis became
invalid.
- [Bug-glpk] Error delete column, Cedric[FR], 2008/03/05
- Re: [Bug-glpk] Error delete column, Cedric[FR], 2008/03/05
- Re: [Bug-glpk] Error delete column, Andrew Makhorin, 2008/03/05
- Re: [Bug-glpk] Error delete column, Cedric[FR], 2008/03/06
- Re: [Bug-glpk] Error delete column, Cedric[FR], 2008/03/06
- Re: [Bug-glpk] Error delete column, Cedric[FR], 2008/03/07
- Re: [Bug-glpk] Error delete column,
Andrew Makhorin <=