> 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 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk