[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Problem : lpx_set_col_bnd
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Problem : lpx_set_col_bnd |
Date: |
Tue, 15 May 2007 20:30:46 +0400 |
> I have a big Problem.
> I want changing my bound. but, after have to print bounds' variable, I
> obtain an other bound.
> My code is :
>>for(int id=0;id<ncol;id++){
>> lpx_set_col_bnds(glpkProbPtr,id+1,LPX_LO,0.0,0.0);
>>}
>>cout<<"before "<<endl;
>>for (int id=0;id<ncol;id++){
>> lpx_set_col_bnds(glpkProbPtr,id+1,LPX_DB,0.,4.);
>> cout<<"LB= "<<lpx_get_col_lb(glpkProbPtr,bPtr->id+1);
>> cout<<" and UB="<<lpx_get_col_ub(glpkProbPtr,bPtr->id+1)<<endl;
>>}
>>cout<<"after "<<endl;
>>for(int id=0;id<ncol;id++)
>> cout<<"LB= "<<lpx_get_col_lb(glpkProbPtr,id+1)<<" and UB=
>> "<<lpx_get_col_ub(glpkProbPtr,id+1)<<endl;
> I obtain:
> before
> LB= 0 and UB= 4
> LB= 0 and UB= 4
> LB= 0 and UB= 4
> after
> LB= 0 and UB= 0
> LB= 0 and UB= 0
> LB= 0 and UB= 0
> Why?
Please check your code more carefully. There is something wrong in it.