Skip to content

Commit

Permalink
correct typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Jun 15, 2022
1 parent cef2d02 commit 37f2b8f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions examples/spreadSheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ int main(int argc, const char *argv[])
exit(77);
}
fprintf(fp,"LowerRhs,");
int numberIntegers = 0;
for (int iColumn=0;iColumn<numberColumns;iColumn++) {
fprintf(fp,"%s,",model.columnName(iColumn).c_str());
if (model.isInteger(iColumn))
numberIntegers++;
}
fprintf(fp,"UpperRhs,RowActivity\n");
for (int iRow=0;iRow<numberRows;iRow++) {
if (rowLower[iRow]>-1.030)
if (rowLower[iRow]>-1.0e30)
fprintf(fp,"%g,",rowLower[iRow]);
else
fprintf(fp,"-Inf,");
Expand All @@ -74,7 +77,7 @@ int main(int argc, const char *argv[])
fprintf(fp,",");
iLast++;
}
if (rowUpper[iRow]<1.030)
if (rowUpper[iRow]<1.0e30)
fprintf(fp,"%g,",rowUpper[iRow]);
else
fprintf(fp,"+Inf,");
Expand Down Expand Up @@ -102,6 +105,19 @@ int main(int argc, const char *argv[])
fprintf(fp,"\n");
}
}
if (numberIntegers) {
fprintf(fp,"Integers");
for (int iColumn=0;iColumn<numberColumns;iColumn++) {
if (model.isInteger(iColumn)) {
if (columnUpper[iColumn]==1.0&&columnLower[iColumn]==0.0)
fprintf(fp,",BV");
else
fprintf(fp,",UI");
} else {
fprintf(fp,",");
}
}
}
fclose(fp);
return 0;
}

0 comments on commit 37f2b8f

Please sign in to comment.