Changeset 365


Ignore:
Timestamp:
Nov 16, 2009 11:58:19 AM (10 years ago)
Author:
bjarni
Message:

Remove SolutionStatus? as argument from CoinGetSolutionText? (not needed)

Location:
trunk/CoinMP
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CoinMP/examples/example.c

    r353 r365  
    5454        problemName = CoinGetProblemName(hProb);
    5555        solutionStatus = CoinGetSolutionStatus(hProb);
    56         solutionText = CoinGetSolutionText(hProb,solutionStatus);
     56        solutionText = CoinGetSolutionText(hProb);
    5757        objectValue =  CoinGetObjectValue(hProb);
    5858     
     
    9595        fprintf(stdout, "Solve Problem: %s (obj=%lg)\n", problemName, optimalValue);
    9696        hProb = CoinCreateProblem(problemName); 
    97         result = CoinLoadProblem(hProb, colCount, rowCount, nonZeroCount, rangeCount,
     97        result = CoinLoadMatrix(hProb, colCount, rowCount, nonZeroCount, rangeCount,
    9898                                        objectSense, objectConst, objectCoeffs, lowerBounds, upperBounds,
    9999                                        rowType, rhsValues, rangeValues, matrixBegin, matrixCount,
    100                                         matrixIndex, matrixValues, colNames, rowNames, objectName);
     100                                        matrixIndex, matrixValues);
     101        result = CoinLoadNames(hProb, colNames, rowNames, objectName);
    101102        if (columnType) {
    102103                result = CoinLoadInteger(hProb, columnType);
     
    133134        fprintf(stdout, "Solve Problem: %s (obj=%lg)\n", problemName, optimalValue);
    134135        hProb = CoinCreateProblem(problemName); 
    135         result = CoinLoadProblemBuf(hProb, colCount, rowCount, nonZeroCount, rangeCount,
     136        result = CoinLoadMatrix(hProb, colCount, rowCount, nonZeroCount, rangeCount,
    136137                                        objectSense, objectConst, objectCoeffs, lowerBounds, upperBounds,
    137138                                        rowType, rhsValues, rangeValues, matrixBegin, matrixCount,
    138                                         matrixIndex, matrixValues, colNamesBuf, rowNamesBuf, objectName);
     139                                        matrixIndex, matrixValues);
     140        result = CoinLoadNamesBuf(hProb, colNamesBuf, rowNamesBuf, objectName);
    139141        if (columnType) {
    140142                result = CoinLoadInteger(hProb, columnType);
     
    173175        fprintf(stdout, "Solve Problem: %s (obj=%lg)\n", problemName, optimalValue);
    174176        hProb = CoinCreateProblem(problemName);
    175         result = CoinLoadProblem(hProb, colCount, rowCount, nonZeroCount, rangeCount,
     177        result = CoinLoadMatrix(hProb, colCount, rowCount, nonZeroCount, rangeCount,
    176178                                        objectSense, objectConst, objectCoeffs, lowerBounds, upperBounds,
    177179                                        rowType, rhsValues, rangeValues, matrixBegin, matrixCount,
    178                                         matrixIndex, matrixValues, colNames, rowNames, objectName);
     180                                        matrixIndex, matrixValues);
     181        result = CoinLoadNames(hProb, colNames, rowNames, objectName);
    179182        if (columnType) {
    180183                result = CoinLoadInteger(hProb, columnType);
  • trunk/CoinMP/src/CoinMP.cpp

    r364 r365  
    578578 
    579579
    580 SOLVAPI const char* SOLVCALL CoinGetSolutionText(HPROB hProb, int SolutionStatus)
     580SOLVAPI const char* SOLVCALL CoinGetSolutionText(HPROB hProb)
    581581{
    582582        PCOIN pCoin = (PCOIN)hProb;
     
    586586
    587587
    588 SOLVAPI int SOLVCALL CoinGetSolutionTextBuf(HPROB hProb, int SolutionStatus, char* SolutionText, int buflen)
    589 {
    590         strncpy(SolutionText, CoinGetSolutionText(hProb, SolutionStatus), buflen-1);
     588SOLVAPI int SOLVCALL CoinGetSolutionTextBuf(HPROB hProb, char* SolutionText, int buflen)
     589{
     590        strncpy(SolutionText, CoinGetSolutionText(hProb), buflen-1);
    591591        SolutionText[buflen-1] = '\0';
    592592        return (int)strlen(SolutionText);
  • trunk/CoinMP/src/CoinMP.h

    r364 r365  
    221221
    222222SOLVAPI int    SOLVCALL CoinGetSolutionStatus(HPROB hProb);
    223 SOLVAPI const char*  SOLVCALL CoinGetSolutionText(HPROB hProb, int SolutionStatus);
    224 SOLVAPI int    SOLVCALL CoinGetSolutionTextBuf(HPROB hProb, int SolutionStatus, char* SolutionText, int buflen);
     223SOLVAPI const char*  SOLVCALL CoinGetSolutionText(HPROB hProb);
     224SOLVAPI int    SOLVCALL CoinGetSolutionTextBuf(HPROB hProb, char* SolutionText, int buflen);
    225225
    226226SOLVAPI double SOLVCALL CoinGetObjectValue(HPROB hProb);
     
    380380
    381381int    (SOLVCALL *CoinGetSolutionStatus)(HPROB hProb);
    382 const char* (SOLVCALL *CoinGetSolutionText)(HPROB hProb, int SolutionStatus);
    383 int    (SOLVCALL *CoinGetSolutionTextBuf)(HPROB hProb, int SolutionStatus, char* SolutionText, int buflen);
     382const char* (SOLVCALL *CoinGetSolutionText)(HPROB hProb);
     383int    (SOLVCALL *CoinGetSolutionTextBuf)(HPROB hProb, char* SolutionText, int buflen);
    384384
    385385double (SOLVCALL *CoinGetObjectValue)(HPROB hProb);
  • trunk/CoinMP/test/unitTest.cpp

    r363 r365  
    5454        problemName = CoinGetProblemName(hProb);
    5555        solutionStatus = CoinGetSolutionStatus(hProb);
    56         solutionText = CoinGetSolutionText(hProb,solutionStatus);
     56        solutionText = CoinGetSolutionText(hProb);
    5757        objectValue =  CoinGetObjectValue(hProb);
    5858     
Note: See TracChangeset for help on using the changeset viewer.