Ignore:
Timestamp:
Jun 9, 2006 3:26:50 PM (14 years ago)
Author:
andreasw
Message:

undid last commit (patches incorrectly applied)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpModel.cpp

    r798 r799  
    1 // copyright (C) 2002, International Business Machines
     1// Copyright (C) 2002, International Business Machines
    22// Corporation and others.  All Rights Reserved.
    33
     
    34553455  return *this;
    34563456}
    3457 // Create C++ lines to get to current state
    3458 void
    3459 ClpModel::generateCpp( FILE * fp)
    3460 {
    3461   // Stuff that can't be done easily
    3462   if (!lengthNames_) {
    3463     // no names
    3464     fprintf(fp,"  clpModel->dropNames();\n");
    3465   }
    3466   ClpModel defaultModel;
    3467   ClpModel * other = &defaultModel;
    3468   int iValue1, iValue2;
    3469   double dValue1, dValue2;
    3470   iValue1 = this->maximumIterations();
    3471   iValue2 = other->maximumIterations();
    3472   fprintf(fp,"%d  int save_maximumIterations = clpModel->maximumIterations();\n",iValue1==iValue2 ? 2 : 1);
    3473   fprintf(fp,"%d  clpModel->setMaximumIterations(%d);\n",iValue1==iValue2 ? 4 : 3,iValue1);
    3474   fprintf(fp,"%d  clpModel->setMaximumIterations(save_maximumIterations);\n",iValue1==iValue2 ? 7 : 6);
    3475   dValue1 = this->primalTolerance();
    3476   dValue2 = other->primalTolerance();
    3477   fprintf(fp,"%d  double save_primalTolerance = clpModel->primalTolerance();\n",dValue1==dValue2 ? 2 : 1);
    3478   fprintf(fp,"%d  clpModel->setPrimalTolerance(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3479   fprintf(fp,"%d  clpModel->setPrimalTolerance(save_primalTolerance);\n",dValue1==dValue2 ? 7 : 6);
    3480   dValue1 = this->dualTolerance();
    3481   dValue2 = other->dualTolerance();
    3482   fprintf(fp,"%d  double save_dualTolerance = clpModel->dualTolerance();\n",dValue1==dValue2 ? 2 : 1);
    3483   fprintf(fp,"%d  clpModel->setDualTolerance(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3484   fprintf(fp,"%d  clpModel->setDualTolerance(save_dualTolerance);\n",dValue1==dValue2 ? 7 : 6);
    3485   iValue1 = this->numberIterations();
    3486   iValue2 = other->numberIterations();
    3487   fprintf(fp,"%d  int save_numberIterations = clpModel->numberIterations();\n",iValue1==iValue2 ? 2 : 1);
    3488   fprintf(fp,"%d  clpModel->setNumberIterations(%d);\n",iValue1==iValue2 ? 4 : 3,iValue1);
    3489   fprintf(fp,"%d  clpModel->setNumberIterations(save_numberIterations);\n",iValue1==iValue2 ? 7 : 6);
    3490   dValue1 = this->maximumSeconds();
    3491   dValue2 = other->maximumSeconds();
    3492   fprintf(fp,"%d  double save_maximumSeconds = clpModel->maximumSeconds();\n",dValue1==dValue2 ? 2 : 1);
    3493   fprintf(fp,"%d  clpModel->setMaximumSeconds(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3494   fprintf(fp,"%d  clpModel->setMaximumSeconds(save_maximumSeconds);\n",dValue1==dValue2 ? 7 : 6);
    3495   dValue1 = this->optimizationDirection();
    3496   dValue2 = other->optimizationDirection();
    3497   fprintf(fp,"%d  double save_optimizationDirection = clpModel->optimizationDirection();\n",dValue1==dValue2 ? 2 : 1);
    3498   fprintf(fp,"%d  clpModel->setOptimizationDirection(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3499   fprintf(fp,"%d  clpModel->setOptimizationDirection(save_optimizationDirection);\n",dValue1==dValue2 ? 7 : 6);
    3500   dValue1 = this->objectiveScale();
    3501   dValue2 = other->objectiveScale();
    3502   fprintf(fp,"%d  double save_objectiveScale = clpModel->objectiveScale();\n",dValue1==dValue2 ? 2 : 1);
    3503   fprintf(fp,"%d  clpModel->setObjectiveScale(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3504   fprintf(fp,"%d  clpModel->setObjectiveScale(save_objectiveScale);\n",dValue1==dValue2 ? 7 : 6);
    3505   dValue1 = this->rhsScale();
    3506   dValue2 = other->rhsScale();
    3507   fprintf(fp,"%d  double save_rhsScale = clpModel->rhsScale();\n",dValue1==dValue2 ? 2 : 1);
    3508   fprintf(fp,"%d  clpModel->setRhsScale(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3509   fprintf(fp,"%d  clpModel->setRhsScale(save_rhsScale);\n",dValue1==dValue2 ? 7 : 6);
    3510   iValue1 = this->scalingFlag();
    3511   iValue2 = other->scalingFlag();
    3512   fprintf(fp,"%d  int save_scalingFlag = clpModel->scalingFlag();\n",iValue1==iValue2 ? 2 : 1);
    3513   fprintf(fp,"%d  clpModel->scaling(%d);\n",iValue1==iValue2 ? 4 : 3,iValue1);
    3514   fprintf(fp,"%d  clpModel->scaling(save_scalingFlag);\n",iValue1==iValue2 ? 7 : 6);
    3515   dValue1 = this->getSmallElementValue();
    3516   dValue2 = other->getSmallElementValue();
    3517   fprintf(fp,"%d  double save_getSmallElementValue = clpModel->getSmallElementValue();\n",dValue1==dValue2 ? 2 : 1);
    3518   fprintf(fp,"%d  clpModel->setSmallElementValue(%g);\n",dValue1==dValue2 ? 4 : 3,dValue1);
    3519   fprintf(fp,"%d  clpModel->setSmallElementValue(save_getSmallElementValue);\n",dValue1==dValue2 ? 7 : 6);
    3520   iValue1 = this->logLevel();
    3521   iValue2 = other->logLevel();
    3522   fprintf(fp,"%d  int save_logLevel = clpModel->logLevel();\n",iValue1==iValue2 ? 2 : 1);
    3523   fprintf(fp,"%d  clpModel->setLogLevel(%d);\n",iValue1==iValue2 ? 4 : 3,iValue1);
    3524   fprintf(fp,"%d  clpModel->setLogLevel(save_logLevel);\n",iValue1==iValue2 ? 7 : 6);
    3525 }
Note: See TracChangeset for help on using the changeset viewer.