[Cbc] [CBC] Problem with function getRowPrice()
danh hua
danhhua176 at gmail.com
Thu May 21 05:33:33 EDT 2009
Hi all,
I read from the Cbc documentation (
http://www.coin-or.org/Cbc/ch02s04.html ) that
the function getRowPrice()
is to get the solution of the dual problem. But it did not work in my
problem correctly.
Does anyone has a suggestion?
my integer problem is:
*NAME EXAMPLE
ROWS
N OBJ
L ROW1
L ROW2
L ROW3
COLUMNS
INT1 'MARKER' 'INTORG'
COL1 OBJ 20
COL1 ROW1 1 ROW3 1
COL2 OBJ 20
COL2 ROW1 1 ROW2 1
COL3 OBJ 20
COL3 ROW2 1 ROW3 1
COL4 OBJ 5
COL4 ROW3 1
COL5 OBJ 5
COL5 ROW1 1
COL6 OBJ 5
COL6 ROW2 1
INT1END 'MARKER' 'INTEND'
RHS
RHS ROW1 1
RHS ROW2 1
RHS ROW3 1
ENDATA*
and my code is:
*model.setObjSense(-1);
model.branchAndBound();
//..................get dual solution................*
*const double *dualSolution=model.getRowPrice();
int numberRows=model.getNumRows();
int iRows;*
*for(iRows=0;iRows<numberRows;iRows++){
double value=dualSolution[iRows];
std::cout<<value<<std::endl;
}*
the result I got is (-0,-0,-0).
Thanks,
Danh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20090521/194faed6/attachment.html
More information about the Cbc
mailing list