[Coin-SMI] OSLSE vs COIN (problem with readSMPS)
Alois Geyer
alois.geyer at wu-wien.ac.at
Wed Feb 15 09:15:18 EST 2006
I have noticed some discrepancies between solutions obtained from OSLSE and COIN (e.g. using the
KandW3 example and others). to investigate this issue further I have looked more closely to the results of
readSMPS (among other things). what seems strange is the following:
if the row sense in the core-file is 'G' or 'L', the stoch-file uses the REPLACE option and the RHS is
stochastic "osiStoch->getRowSense()" returns 'R' rather than 'G' or 'L' (see code excerpt from unitTest.cpp
below). I understand that 'R' could be used on purpose to indicate that the RHS is stochastic/random. but
'R' does not appear if the row sense is 'E' or the RHS is non-stochastic.
in addition, the RHS of 'L' constraints is not replaced by the stoch-file entry. the RHS of 'G' constraints is
replaced!
another observation: using ADD in the the stoch-file does not change 'G' or 'L' to 'R' (as above) but the
stochastic RHS is not added to the RHS from the core-file. it is only added for equality constraints ('E').
has anyone else made similar observations? how can this problem be resolved?
~~Alois
{
// test SMPS files KandW3R
printf(" *** testing KandW3.\n");
SmiScnModel smi;
smi.readSmps("../../Mps/Stochastic/KandW3R");
OsiClpSolverInterface *clp = new OsiClpSolverInterface();
smi.setOsiSolverHandle(*clp);
OsiSolverInterface *osiStoch = smi.loadOsiSolverData();
//+AG*
int nrows = osiStoch->getNumRows();
int ncols = osiStoch->getNumCols();
const char * rs = osiStoch->getRowSense();
const double * rhs = osiStoch->getRightHandSide();
int i;
for (i=0;i<nrows;i++){
printf("i %d rs %c rhs %f\n",i,rs[i],rhs[i]);
}
//-AG*
osiStoch->initialSolve();
assert(fabs(osiStoch->getObjValue()2613.0) < 0.0001);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/smi/attachments/20060215/8beb8655/attachment.html
More information about the Coin-SMI
mailing list