Hi, buddies,

I spent long time to fix this error, but still failed.

spx_invert: the basis matrix is singular
spx_simplex: numerical problems with basis matrix
spx_simplex: sorry, basis recovery procedure not implemented yet
bfd_ftran: the factorization is not valid

Part of the code is shown as followed. The purpose is to find out the
projection of the solution space of the problem on two dimensional space.
The method is optimize the linear function of these two variable. Thus, the
coefficients of the objective function changed every loop.

Previously, I avoid this problem by reload all rows and columns' bounds in
the form of lpx_set_col_bnds(lp, 2, LPX_FR,0,0); But, I failed here. The
difference is this model is loaded from freemps file, while previous one is
constructed from scratch.

Other failed try.
1. lpx_set_int_parm(lp, LPX_K_BFTYPE, 3); This config does not work.
2. lpx_adv_basis(lp); every time run this sentence is too slow for large
amount sample.
 3.                    ret = lpx_warm_up(lp);
                        if(ret == LPX_E_BADB || ret == LPX_E_SING){
                            lpx_std_basis(lp);
                        }
These lines failed too.
4.                      apply_col_bnds(lp,col_type,col_bnds_lb,col_bnds_ub);

apply_row_bnds(lp,row_type,row_bnds_lb,row_bnds_ub);
Imposing all the bounds every time failed too. These bounds were stored
after the model had been loaded.


Btw, the model has 1200 columns, 800 rows. Thank you in advance.

    for(m=begin;m<=numR;m++)
    {
        if(preac[m].range==1)
        {
            sprintf(filename,"./data/%d",m);
            pnull=fopen(filename,"w");
            FileOpenError(pnull,filename);
            if(pre_t == NULL) {
                pre_t = time(NULL);
            } else {
                cur_t = time(NULL);
                time_diff= difftime(cur_t,pre_t);
                pre_t=cur_t;
                printf("%f seconds spent on last cycle\n",time_diff);
            }

            for(n=1;n<=numR;n++)
            {
                if(preac[n].range==1 && n>m)
                {
                    //glpk_gen_row_bnds(lp);
                    //glpk_gen_col_bnds(lp);
                    //lpx_set_col_bnds(lp, 1, LPX_FX, ratio*biomass,
ratio*biomass);

                    //initiate the linear link
                    L_value=(PLink)malloc(sizeof(Link));
                    L_value->head=(Node*)malloc(sizeof(Node));
                    L_value->end=L_value->head;
                    L_value->head->next=NULL;
                    L_value->number=0;
                    start=1;

                    for(sita=0.0;sita<=PIE;sita+=delta)
                    {
                        lpx_set_obj_dir(lp, LPX_MAX);
                        coef_x=cos(sita);
                        coef_y=sin(sita);
                        lpx_set_obj_coef(lp,m,coef_x);
                        lpx_set_obj_coef(lp,n,coef_y);
                        //ret = lpx_warm_up(lp);
                        //if(ret == LPX_E_BADB || ret == LPX_E_SING){
                        //    lpx_adv_basis(lp);
                        //}

//apply_col_bnds(lp,col_type,col_bnds_lb,col_bnds_ub);

//apply_row_bnds(lp,row_type,row_bnds_lb,row_bnds_ub);
                        lpx_simplex(lp);
                        x=lpx_get_col_prim(lp,m);
                        y=lpx_get_col_prim(lp,n);
                        flag=0;
                        N_value=L_value->head;
                        //compare
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to