[Coin-discuss] input empty problem?

John J Forrest jjforre at us.ibm.com
Thu Aug 5 06:07:17 EDT 2004




It may depend how you created empy matrix.  With Clp I used

#include "ClpSimplex.hpp"
int main (int argc, const char *argv[])
{
  ClpSimplex  model;
  CoinPackedMatrix matrix(true,2,0,0,NULL,NULL,NULL,NULL);;
  // matrix
  double rowu[]={1.0,2.0};
  double rowl[]={-1.0,0.0};
  model.loadProblem(matrix,NULL,NULL,NULL,rowl,rowu);
  model.writeMps("xx.mps");
  return 0;
}

and got

NAME          BLANK
ROWS
 N  OBJROW
 L  R0000000
 L  R0000001
COLUMNS
RHS
    RHS       R0000000  1.             R0000001  2.
RANGES
    RANGE     R0000000  2.             R0000001  2.
ENDATA

which looks correct.

John Forrest




More information about the Coin-discuss mailing list