Changeset 882 for stable/1.3/Clp


Ignore:
Timestamp:
Oct 20, 2006 11:08:37 AM (14 years ago)
Author:
forrest
Message:

for when one set of names declared

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.3/Clp/src/ClpModel.cpp

    r848 r882  
    32333233  if (lengthNames()) {
    32343234    rowNames = new char * [numberRows_+1];
    3235     for (int iRow=0;iRow<numberRows_;iRow++) {
     3235    int numberNames = rowNames_.size();
     3236    numberNames = CoinMin(numberRows_,numberNames);
     3237    int iRow;
     3238    for (iRow=0;iRow<numberNames;iRow++) {
    32363239      rowNames[iRow] =
    32373240        strdup(rowName(iRow).c_str());
     
    32483251#endif
    32493252    }
     3253    char name[9];
     3254    for ( ;iRow<numberRows_;iRow++) {
     3255      sprintf(name,"R%7.7d",iRow);
     3256      rowNames[iRow]=strdup(name);
     3257    }
    32503258    rowNames[numberRows_] = strdup("OBJROW");
    32513259  }
     
    32593267  if (lengthNames()) {
    32603268    columnNames = new char * [numberColumns_];
    3261     for (int iColumn=0;iColumn<numberColumns_;iColumn++) {
     3269    int numberNames = columnNames_.size();
     3270    numberNames = CoinMin(numberColumns_,numberNames);
     3271    int iColumn;
     3272    for (iColumn=0;iColumn<numberNames;iColumn++) {
    32623273      columnNames[iColumn] =
    32633274        strdup(columnName(iColumn).c_str());
     
    32733284      xx[n]='\0';
    32743285#endif
     3286    }
     3287    char name[9];
     3288    for ( ;iColumn<numberColumns_;iColumn++) {
     3289      sprintf(name,"C%7.7d",iColumn);
     3290      columnNames[iColumn]=strdup(name);
    32753291    }
    32763292  }
Note: See TracChangeset for help on using the changeset viewer.