[Coin-discuss] please help

Goossens Jan-Willem Jan-Willem.Goossens at nc3a.nato.int
Fri Feb 13 09:32:53 EST 2009


First thought:
I’m not sure, but does

char rowType[3] = { 'L', 'L', 'L'};

give you EQUALITY constraints?
Regards,
Jan-Willem



From: coin-discuss-bounces at list.coin-or.org [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of hela masri
Sent: 12 February 2009 20:36
To: coinmp at list.coin-or.org; coin-discuss at list.coin-or.org
Subject: [Coin-discuss] please help


I use CoinMP dll, to test linear programs. But for the following problem, I got an erroneous solution (x1=0,x2=0,x3=0,x4=0,x5=0,x6=0,z1=0,z2=0,z3=0) with the optimal value equal to zero. But this vector is not feasible!!!


The linear problem is:
Min    z1+z2+z3
s.t      x1   + x2   + x3 +x4              + z1              = 3
         2x1 + 2x2 + x3      +x5                + z2      =  4
         x1    - x2                         +x6             + z3=  0
        all variables are positive.



And the corresponding program is (executed with visual C++)

    char *problemName = "Initialisation";
    int colCount=9;
    int rowCount=3;
    int nonZeroCount=13;
    int rangeCount = 0;

    char *objectName = "obj";
    int objectSense = SOLV_OBJSENS_MIN;
    double objectConst = 0.0;
    double objectCoeffs[9] = { 0., 0., 0., 0., 0., 0., 1., 1. ,1.};

    double lowerBounds[9] = { 0., 0., 0., 0., 0., 0., 0.,0. ,0. };
    double upperBounds[9] = { 1000000., 1000000., 1000000., 1000000., 1000000., 1000000., 1000000., 1000000. ,1000000. };

    char rowType[3] = { 'L', 'L', 'L'};
    double rhsValues[3] = { 3.,4.,0.};

    int matrixBegin[9+1]={0,3,6,8,9,10,11,12,13,14};
    int matrixCount[9]={3,3,2,1,1,1,1,1,1};
    int matrixIndex[14]={0,1,2,0,1,2,0,1,0,1,2,0,1,2};
    double matrixValues[14]={1., 2., 1., 1., 2., -1., 1., 1., 1., 1., 1., 1., 1., 1.};

    char *colNames[9] = {"c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8","c9"};
    char *rowNames[3] = {"r1", "r2", "r3"};

    double initValues[9] = { 0., 0., 0., 0., 0., 0., 0., 0. ,0. };

    double optimalValue = 1428729.2857143;;

    RunTestProblem1(problemName, optimalValue, colCount, rowCount,
      nonZeroCount, rangeCount, objectSense, objectConst, objectCoeffs,
      lowerBounds, upperBounds, rowType, rhsValues, NULL,
      matrixBegin, matrixCount, matrixIndex, matrixValues,
      colNames, rowNames, objectName, initValues, NULL, 0);




________________________________
Ne pleurez pas si votre Webmail ferme. Récupérez votre historique sur Yahoo! Mail<http://fr.rd.yahoo.com/mail_fr/taglines/caramail/*http:/fr.docs.yahoo.com/mail/transfert_mails.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20090213/c32a0895/attachment.html>


More information about the Coin-discuss mailing list