Changeset 496 for branches


Ignore:
Timestamp:
Dec 4, 2006 1:21:16 PM (13 years ago)
Author:
forrest
Message:

nonlinear

Location:
branches/devel/Cbc/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcHeuristicFPump.cpp

    r482 r496  
    2323   startTime_(0.0),
    2424   maximumTime_(0.0),
    25    downValue_(0.5),
    2625   fakeCutoff_(COIN_DBL_MAX),
    2726   absoluteIncrement_(0.0),
    2827   relativeIncrement_(0.0),
     28   defaultRounding_(0.49999),
    2929   initialWeight_(0.0),
    3030   weightFactor_(0.1),
     
    4343   startTime_(0.0),
    4444   maximumTime_(0.0),
    45    downValue_(downValue),
    4645   fakeCutoff_(COIN_DBL_MAX),
    4746   absoluteIncrement_(0.0),
    4847   relativeIncrement_(0.0),
     48   defaultRounding_(downValue),
    4949   initialWeight_(0.0),
    5050   weightFactor_(0.1),
     
    107107  else
    108108    fprintf(fp,"4  heuristicFPump.setRelativeIncrement(%g);\n",relativeIncrement_);
     109  if (defaultRounding_!=other.defaultRounding_)
     110    fprintf(fp,"3  heuristicFPump.setDefaultRounding(%g);\n",defaultRounding_);
     111  else
     112    fprintf(fp,"4  heuristicFPump.setDefaultRounding(%g);\n",defaultRounding_);
    109113  fprintf(fp,"3  cbcModel->addHeuristic(&heuristicFPump);\n");
    110114  if (initialWeight_!=other.initialWeight_)
     
    124128  startTime_(rhs.startTime_),
    125129  maximumTime_(rhs.maximumTime_),
    126   downValue_(rhs.downValue_),
    127130  fakeCutoff_(rhs.fakeCutoff_),
    128131  absoluteIncrement_(rhs.absoluteIncrement_),
    129132  relativeIncrement_(rhs.relativeIncrement_),
     133  defaultRounding_(rhs.defaultRounding_),
    130134  initialWeight_(rhs.initialWeight_),
    131135  weightFactor_(rhs.weightFactor_),
     
    207211  if (!general)
    208212    doGeneral=false;
     213  // For solution closest to feasible if none found
     214  int * closestSolution = general ? NULL : new int[numberIntegers];
     215  double closestObjectiveValue = COIN_DBL_MAX;
     216 
    209217  int numberIntegersOrig = numberIntegers;
    210218  numberIntegers = j;
     
    336344      int flip;
    337345      returnCode = rounds(newSolution,saveObjective,numberIntegers,integerVariable,
    338                           roundExpensive_,downValue_,&flip);
     346                          roundExpensive_,defaultRounding_,&flip);
    339347      if (returnCode) {
    340348        // SOLUTION IS INTEGER
     
    496504          int flip;
    497505          returnCode = rounds(newSolution,saveObjective,numberIntegers,integerVariable,
    498                               roundExpensive_,downValue_,&flip);
     506                              roundExpensive_,defaultRounding_,&flip);
    499507          if (returnCode) {
    500508            // solution - but may not be better
     
    602610        if (model_->logLevel())
    603611          printf("\npass %3d: obj. %10.5f --> ", numberPasses+totalNumberPasses,solver->getObjValue());
     612        if (closestSolution&&solver->getObjValue()<closestObjectiveValue) {
     613          int i;
     614          const double * objective = solver->getObjCoefficients();
     615          for (i=0;i<numberIntegersOrig;i++) {
     616            int iColumn=integerVariableOrig[i];
     617            if (objective[iColumn]>0.0)
     618              closestSolution[i]=0;
     619            else
     620              closestSolution[i]=1;
     621          }
     622          closestObjectiveValue = solver->getObjValue();
     623        }
    604624        newLineNeeded=true;
    605625       
     
    742762    }
    743763  }
     764  if (!finalReturnCode&&closestSolution&&closestObjectiveValue <= 10.0&&usedColumn) {
     765    // try a bit of branch and bound
     766    OsiSolverInterface * newSolver = model_->continuousSolver()->clone();
     767    const double * colLower = newSolver->getColLower();
     768    const double * colUpper = newSolver->getColUpper();
     769    int i;
     770    double rhs = 0.0;
     771    for (i=0;i<numberIntegersOrig;i++) {
     772      int iColumn=integerVariableOrig[i];
     773      int direction = closestSolution[i];
     774      closestSolution[i]=iColumn;
     775      if (direction==0) {
     776        // keep close to LB
     777        rhs += colLower[iColumn];
     778        lastSolution[i]=1.0;
     779      } else {
     780        // keep close to UB
     781        rhs -= colUpper[iColumn];
     782        lastSolution[i]=-1.0;
     783      }
     784    }
     785    newSolver->addRow(numberIntegersOrig,closestSolution,
     786                      lastSolution,-COIN_DBL_MAX,rhs+10.0);
     787    double saveValue = newSolutionValue;
     788    newSolver->writeMps("sub");
     789    int returnCode = smallBranchAndBound(newSolver,200,newSolution,newSolutionValue,
     790                                     newSolutionValue,"CbcHeuristicLocalAfterFPump");
     791    if (returnCode) {
     792      printf("old sol of %g new of %g\n",saveValue,newSolutionValue);
     793      memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
     794      abort();
     795    }
     796    delete newSolver;
     797  }
    744798  delete [] usedColumn;
    745799  delete [] lastSolution;
    746800  delete [] newSolution;
     801  delete [] closestSolution;
    747802  delete [] integerVariable;
    748803  return finalReturnCode;
     
    792847    double value=solution[iColumn];
    793848    double round = floor(value+primalTolerance);
    794     if (value-round > .5) round += 1.;
     849    if (value-round > downValue) round += 1.;
    795850    if (round < integerTolerance && tmp[iColumn] < -1. + integerTolerance) flip_down++;
    796851    if (round > 1. - integerTolerance && tmp[iColumn] > 1. - integerTolerance) flip_up++;
  • branches/devel/Cbc/src/CbcHeuristicFPump.hpp

    r463 r496  
    7777  inline double relativeIncrement() const
    7878  { return relativeIncrement_;};
     79  /// Set default rounding (default 0.5)
     80  inline void setDefaultRounding(double value)
     81  { defaultRounding_ = value;};
     82  /// Get default rounding (default 0.5)
     83  inline double defaultRounding() const
     84  { return defaultRounding_;};
    7985  /// Set initial weight (default 0.0 == off)
    8086  inline void setInitialWeight(double value)
     
    119125  /// Maximum Cpu seconds
    120126  double maximumTime_;
    121   /// If less than this round down
    122   double downValue_;
    123127  /** Fake cutoff value.
    124128      If set then better of real cutoff and this used to add a constraint
     
    129133  /// If positive carry on after solution expecting gain of at least this times objective
    130134  double relativeIncrement_;
     135  /// Default is round up if > this
     136  double defaultRounding_;
    131137  /// Initial weight for true objective
    132138  double initialWeight_;
  • branches/devel/Cbc/src/CbcLinked.cpp

    r494 r496  
    431431          }
    432432        }
    433         if (numberContinuous) {
     433        if (numberContinuous&&0) {
    434434          // iterate to get solution and fathom node
    435435          int numberColumns2 = coinModel_.numberColumns();
     
    450450                  double xybar[4];
    451451                  obj->getCoefficients(this,xB,yB,xybar);
    452                   double xyTrue = obj->xyCoefficient(solution);
     452                  //double xyTrue = obj->xyCoefficient(solution);
    453453                  double xyLambda=0.0;
    454454                  int firstLambda = obj->firstLambda();
     
    456456                    xyLambda += solution[firstLambda+j]*xybar[j];
    457457                  }
    458                   printf ("x %d, y %d - true %g lambda %g\n",obj->xColumn(),obj->yColumn(),
    459                           xyTrue,xyLambda);
     458                  //printf ("x %d, y %d - true %g lambda %g\n",obj->xColumn(),obj->yColumn(),
     459                  //  xyTrue,xyLambda);
    460460                  int xColumn = obj->xColumn();
    461461                  double gapX = upper[xColumn]-lower[xColumn];
     
    478478                    yB[2]=solution[yColumn];
    479479                    xybar[0]=xB[0]*yB[0];
    480                     xybar[0]=xB[0]*yB[1];
    481                     xybar[0]=xB[1]*yB[0];
    482                     xybar[0]=xB[1]*yB[1];
     480                    xybar[1]=xB[0]*yB[1];
     481                    xybar[2]=xB[1]*yB[0];
     482                    xybar[3]=xB[1]*yB[1];
    483483                    double infeasibility=obj->computeLambdas(xB,yB,xybar,lambda);
    484484                    assert (infeasibility<1.0e-9);
     
    502502                    yB[1]=newUpper;
    503503                    xybar[0]=xB[0]*yB[0];
    504                     xybar[0]=xB[0]*yB[1];
    505                     xybar[0]=xB[1]*yB[0];
    506                     xybar[0]=xB[1]*yB[1];
     504                    xybar[1]=xB[0]*yB[1];
     505                    xybar[2]=xB[1]*yB[0];
     506                    xybar[3]=xB[1]*yB[1];
    507507                    double infeasibility=obj->computeLambdas(xB,yB,xybar,lambda);
    508508                    assert (infeasibility<1.0e-9);
     
    542542              int numberColumns = quadraticModel_->numberColumns();
    543543              double * gradient = new double [numberColumns+1];
     544              // for testing do gradient from bilinear
     545              if (false) {
     546                int i;
     547                double offset=0.0;
     548                CoinZeroN(gradient,numberColumns+1);
     549                const double * objective = modelPtr_->objective();
     550                int numberColumns2 = coinModel_.numberColumns();
     551                for ( i=0;i<numberColumns2;i++)
     552                  gradient[i] = objective[i];
     553                for ( i =0;i<numberObjects_;i++) {
     554                  OsiBiLinear * obj = dynamic_cast<OsiBiLinear *> (object_[i]);
     555                  if (obj) {
     556                    int xColumn = obj->xColumn();
     557                    int yColumn = obj->yColumn();
     558                    double coefficient = obj->coefficient();
     559                    assert (obj->xyRow()<0); // objective
     560                    gradient[xColumn] += coefficient*solution[yColumn];
     561                    gradient[yColumn] += coefficient*solution[xColumn];
     562                    offset += coefficient*solution[xColumn]*solution[yColumn];
     563                  }
     564                }
     565                printf("what about offset %g\n",offset);
     566              }
    544567              memcpy(gradient,quadraticModel_->objectiveAsObject()->gradient(quadraticModel_,solution,offset,true,2),
    545568                     numberColumns*sizeof(double));
     
    33483371  int j;
    33493372  double multiplier = (boundType_==0) ? 1.0/coefficient_ : 1.0;
    3350   for (j=0;j<4;j++) {
    3351     int iColumn = firstLambda_+j;
    3352     int iStart = columnStart[iColumn];
    3353     int iEnd = iStart + columnLength[iColumn];
    3354     int k=iStart;
    3355     double x=0.0;
    3356     double y=0.0;
    3357     xybar[j]=0.0;
    3358     for (;k<iEnd;k++) {
    3359       if (xRow_==row[k])
    3360         x = element[k];
    3361       if (yRow_==row[k])
    3362         y = element[k];
    3363       if (xyRow_==row[k])
    3364         xybar[j] = element[k]*multiplier;
    3365     }
    3366     if (yRow_<0)
    3367       y=x;
    3368     if (xyRow_<0)
    3369       xybar[j] = objective[iColumn]*multiplier;
    3370     assert (fabs(xybar[j]-x*y)<1.0e-4);
    3371     if (j==0)
    3372       xB[0]=x;
    3373     else if (j==1)
    3374       yB[1]=y;
    3375     else if (j==2)
    3376       yB[0]=y;
    3377     else if (j==3)
    3378       xB[1]=x;
     3373  if (yRow_>=0) {
     3374    for (j=0;j<4;j++) {
     3375      int iColumn = firstLambda_+j;
     3376      int iStart = columnStart[iColumn];
     3377      int iEnd = iStart + columnLength[iColumn];
     3378      int k=iStart;
     3379      double x=0.0;
     3380      double y=0.0;
     3381      xybar[j]=0.0;
     3382      for (;k<iEnd;k++) {
     3383        if (xRow_==row[k])
     3384          x = element[k];
     3385        if (yRow_==row[k])
     3386          y = element[k];
     3387        if (xyRow_==row[k])
     3388          xybar[j] = element[k]*multiplier;
     3389      }
     3390      if (xyRow_<0)
     3391        xybar[j] = objective[iColumn]*multiplier;
     3392      if (j==0)
     3393        xB[0]=x;
     3394      else if (j==1)
     3395        yB[1]=y;
     3396      else if (j==2)
     3397        yB[0]=y;
     3398      else if (j==3)
     3399        xB[1]=x;
     3400      assert (fabs(xybar[j]-x*y)<1.0e-4);
     3401    }
     3402  } else {
     3403    // x==y
     3404    for (j=0;j<4;j++) {
     3405      int iColumn = firstLambda_+j;
     3406      int iStart = columnStart[iColumn];
     3407      int iEnd = iStart + columnLength[iColumn];
     3408      int k=iStart;
     3409      double x=0.0;
     3410      xybar[j]=0.0;
     3411      for (;k<iEnd;k++) {
     3412        if (xRow_==row[k])
     3413          x = element[k];
     3414        if (xyRow_==row[k])
     3415          xybar[j] = element[k]*multiplier;
     3416      }
     3417      if (xyRow_<0)
     3418        xybar[j] = objective[iColumn]*multiplier;
     3419      if (j==0) {
     3420        xB[0]=x;
     3421        yB[0]=x;
     3422      } else if (j==2) {
     3423        xB[1]=x;
     3424        yB[1]=x;
     3425      }
     3426    }
     3427    assert (fabs(xybar[0]-xB[0]*yB[0])<1.0e-4);
     3428    assert (fabs(xybar[1]-xB[0]*yB[1])<1.0e-4);
     3429    assert (fabs(xybar[2]-xB[1]*yB[0])<1.0e-4);
     3430    assert (fabs(xybar[3]-xB[1]*yB[1])<1.0e-4);
    33793431  }
    33803432}
  • branches/devel/Cbc/src/Cbc_ampl.cpp

    r492 r496  
    269269}
    270270int
    271 readAmpl(ampl_info * info, int argc, char **argv)
     271readAmpl(ampl_info * info, int argc, char **argv, void ** coinModel)
    272272{
    273273  char *stub;
     
    286286  double * rowUpper;
    287287  char ** saveArgv=argv;
     288  char fileName[1000];
     289  if (argc>1)
     290    strcpy(fileName,argv[1]);
     291  else
     292    fileName[0]='\0';
    288293  int saveArgc = argc;
    289294  memset(info,0,sizeof(ampl_info));
     
    314319  csd = suf_iput("sstatus", ASL_Sufkind_var, info->columnStatus);
    315320  rsd = suf_iput("sstatus", ASL_Sufkind_con, info->rowStatus);
    316   /* read linear model*/
    317   f_read(nl,0);
    318   // see if any sos
    319   if (true) {
    320     char *sostype;
    321     int nsosnz, *sosbeg, *sosind, * sospri;
    322     double *sosref;
    323     int nsos;
    324     int i = ASL_suf_sos_explict_free;
    325     int copri[2], **p_sospri;
    326     copri[0] = 0;
    327     copri[1] = 0;
    328     p_sospri = &sospri;
    329     nsos = suf_sos(i, &nsosnz, &sostype, p_sospri, copri,
    330                                 &sosbeg, &sosind, &sosref);
    331     if (nsos) {
    332       info->numberSos=nsos;
    333       info->sosType = (char *) malloc(nsos);
    334       info->sosPriority = (int *) malloc(nsos*sizeof(int));
    335       info->sosStart = (int *) malloc((nsos+1)*sizeof(int));
    336       info->sosIndices = (int *) malloc(nsosnz*sizeof(int));
    337       info->sosReference = (double *) malloc(nsosnz*sizeof(double));
    338       sos_kludge(nsos, sosbeg, sosref,sosind);
    339       for (int i=0;i<nsos;i++) {
    340         int ichar = sostype[i];
    341         assert (ichar=='1'||ichar=='2');
    342         info->sosType[i]=ichar-'0';
    343       }
    344       memcpy(info->sosPriority,sospri,nsos*sizeof(int));
    345       memcpy(info->sosStart,sosbeg,(nsos+1)*sizeof(int));
    346       memcpy(info->sosIndices,sosind,nsosnz*sizeof(int));
    347       memcpy(info->sosReference,sosref,nsosnz*sizeof(double));
    348     }
    349   }
    350 
    351   /*sos_finish(&specialOrderedInfo, 0, &j, 0, 0, 0, 0, 0);*/
    352   Oinfo.uinfo = tempBuffer;
    353   if (getopts(argv, &Oinfo))
    354     return 1;
    355   /* objective*/
    356   obj = (double *) malloc(n_var*sizeof(double));
    357   for (i=0;i<n_var;i++)
    358     obj[i]=0.0;;
    359   if (n_obj) {
    360     for (og = Ograd[0];og;og = og->next)
    361       obj[og->varno] = og->coef;
    362   }
    363   if (objtype[0])
    364     info->direction=-1.0;
    365   else
    366     info->direction=1.0;
    367   info->offset=objconst(0);
    368   /* Column bounds*/
    369   columnLower = (double *) malloc(n_var*sizeof(double));
    370   columnUpper = (double *) malloc(n_var*sizeof(double));
     321  // testosi parameter - if >= 10 then go in through coinModel
     322  int testOsi=-1;
     323  for (i=0;i<saveArgc;i++) {
     324    if (!strncmp(saveArgv[i],"testosi",7)) {
     325      testOsi = atoi(saveArgv[i+1]);
     326      break;
     327    }
     328  }
     329  if (!(nlvc+nlvo)||testOsi>=10) {
     330    /* read linear model*/
     331    f_read(nl,0);
     332    // see if any sos
     333    if (true) {
     334      char *sostype;
     335      int nsosnz, *sosbeg, *sosind, * sospri;
     336      double *sosref;
     337      int nsos;
     338      int i = ASL_suf_sos_explict_free;
     339      int copri[2], **p_sospri;
     340      copri[0] = 0;
     341      copri[1] = 0;
     342      p_sospri = &sospri;
     343      nsos = suf_sos(i, &nsosnz, &sostype, p_sospri, copri,
     344                     &sosbeg, &sosind, &sosref);
     345      if (nsos) {
     346        info->numberSos=nsos;
     347        info->sosType = (char *) malloc(nsos);
     348        info->sosPriority = (int *) malloc(nsos*sizeof(int));
     349        info->sosStart = (int *) malloc((nsos+1)*sizeof(int));
     350        info->sosIndices = (int *) malloc(nsosnz*sizeof(int));
     351        info->sosReference = (double *) malloc(nsosnz*sizeof(double));
     352        sos_kludge(nsos, sosbeg, sosref,sosind);
     353        for (int i=0;i<nsos;i++) {
     354          int ichar = sostype[i];
     355          assert (ichar=='1'||ichar=='2');
     356          info->sosType[i]=ichar-'0';
     357        }       
     358        memcpy(info->sosPriority,sospri,nsos*sizeof(int));
     359        memcpy(info->sosStart,sosbeg,(nsos+1)*sizeof(int));
     360        memcpy(info->sosIndices,sosind,nsosnz*sizeof(int));
     361        memcpy(info->sosReference,sosref,nsosnz*sizeof(double));
     362      }
     363    }
     364   
     365    /*sos_finish(&specialOrderedInfo, 0, &j, 0, 0, 0, 0, 0);*/
     366    Oinfo.uinfo = tempBuffer;
     367    if (getopts(argv, &Oinfo))
     368      return 1;
     369    /* objective*/
     370    obj = (double *) malloc(n_var*sizeof(double));
     371    for (i=0;i<n_var;i++)
     372      obj[i]=0.0;;
     373    if (n_obj) {
     374      for (og = Ograd[0];og;og = og->next)
     375        obj[og->varno] = og->coef;
     376    }
     377    if (objtype[0])
     378      info->direction=-1.0;
     379    else
     380      info->direction=1.0;
     381    info->offset=objconst(0);
     382    /* Column bounds*/
     383    columnLower = (double *) malloc(n_var*sizeof(double));
     384    columnUpper = (double *) malloc(n_var*sizeof(double));
    371385#define COIN_DBL_MAX DBL_MAX
    372   for (i=0;i<n_var;i++) {
    373     columnLower[i]=LUv[2*i];
    374     if (columnLower[i]<= negInfinity)
    375       columnLower[i]=-COIN_DBL_MAX;
    376     columnUpper[i]=LUv[2*i+1];
    377     if (columnUpper[i]>= Infinity)
    378       columnUpper[i]=COIN_DBL_MAX;
    379   }
    380   /* Row bounds*/
    381   rowLower = (double *) malloc(n_con*sizeof(double));
    382   rowUpper = (double *) malloc(n_con*sizeof(double));
    383   for (i=0;i<n_con;i++) {
    384     rowLower[i]=LUrhs[2*i];
    385     if (rowLower[i]<= negInfinity)
    386       rowLower[i]=-COIN_DBL_MAX;
    387     rowUpper[i]=LUrhs[2*i+1];
    388     if (rowUpper[i]>= Infinity)
    389       rowUpper[i]=COIN_DBL_MAX;
    390   }
    391   info->numberRows=n_con;
    392   info->numberColumns=n_var;
    393   info->numberElements=nzc;;
    394   info->numberBinary=nbv;
    395   info->numberIntegers=niv;
    396   info->objective=obj;
    397   info->rowLower=rowLower;
    398   info->rowUpper=rowUpper;
    399   info->columnLower=columnLower;
    400   info->columnUpper=columnUpper;
    401   info->starts=A_colstarts;
    402   /*A_colstarts=NULL;*/
    403   info->rows=A_rownos;
    404   /*A_rownos=NULL;*/
    405   info->elements=A_vals;
    406   /*A_vals=NULL;*/
    407   info->primalSolution=NULL;
    408   /* put in primalSolution if exists */
    409   if (X0) {
    410     info->primalSolution=(double *) malloc(n_var*sizeof(double));
    411     memcpy(info->primalSolution,X0,n_var*sizeof(double));
    412   }
    413   info->dualSolution=NULL;
    414   if (niv+nbv>0)
    415     mip_stuff(); // get any extra info
    416   if ((!(niv+nbv)&&(csd->kind & ASL_Sufkind_input))
    417       ||(rsd->kind & ASL_Sufkind_input)) {
    418     /* convert status - need info on map */
    419     static int map[] = {1, 3, 1, 1, 2, 1, 1};
    420     stat_map(info->columnStatus, n_var, map, 6, "incoming columnStatus");
    421     stat_map(info->rowStatus, n_con, map, 6, "incoming rowStatus");
     386    for (i=0;i<n_var;i++) {
     387      columnLower[i]=LUv[2*i];
     388      if (columnLower[i]<= negInfinity)
     389        columnLower[i]=-COIN_DBL_MAX;
     390      columnUpper[i]=LUv[2*i+1];
     391      if (columnUpper[i]>= Infinity)
     392        columnUpper[i]=COIN_DBL_MAX;
     393    }
     394    /* Row bounds*/
     395    rowLower = (double *) malloc(n_con*sizeof(double));
     396    rowUpper = (double *) malloc(n_con*sizeof(double));
     397    for (i=0;i<n_con;i++) {
     398      rowLower[i]=LUrhs[2*i];
     399      if (rowLower[i]<= negInfinity)
     400        rowLower[i]=-COIN_DBL_MAX;
     401      rowUpper[i]=LUrhs[2*i+1];
     402      if (rowUpper[i]>= Infinity)
     403        rowUpper[i]=COIN_DBL_MAX;
     404    }
     405    info->numberRows=n_con;
     406    info->numberColumns=n_var;
     407    info->numberElements=nzc;;
     408    info->numberBinary=nbv;
     409    info->numberIntegers=niv;
     410    info->objective=obj;
     411    info->rowLower=rowLower;
     412    info->rowUpper=rowUpper;
     413    info->columnLower=columnLower;
     414    info->columnUpper=columnUpper;
     415    info->starts=A_colstarts;
     416    /*A_colstarts=NULL;*/
     417    info->rows=A_rownos;
     418    /*A_rownos=NULL;*/
     419    info->elements=A_vals;
     420    /*A_vals=NULL;*/
     421    info->primalSolution=NULL;
     422    /* put in primalSolution if exists */
     423    if (X0) {
     424      info->primalSolution=(double *) malloc(n_var*sizeof(double));
     425      memcpy(info->primalSolution,X0,n_var*sizeof(double));
     426    }
     427    info->dualSolution=NULL;
     428    if (niv+nbv>0)
     429      mip_stuff(); // get any extra info
     430    if ((!(niv+nbv)&&(csd->kind & ASL_Sufkind_input))
     431        ||(rsd->kind & ASL_Sufkind_input)) {
     432      /* convert status - need info on map */
     433      static int map[] = {1, 3, 1, 1, 2, 1, 1};
     434      stat_map(info->columnStatus, n_var, map, 6, "incoming columnStatus");
     435      stat_map(info->rowStatus, n_con, map, 6, "incoming rowStatus");
     436    } else {
     437      /* all slack basis */
     438      // leave status for output */
     439#if 0
     440      free(info->rowStatus);
     441      info->rowStatus=NULL;
     442      free(info->columnStatus);
     443      info->columnStatus=NULL;
     444#endif
     445    }
    422446  } else {
    423     /* all slack basis */
    424     // leave status for output */
    425 #if 0
    426     free(info->rowStatus);
    427     info->rowStatus=NULL;
    428     free(info->columnStatus);
    429     info->columnStatus=NULL;
    430 #endif
     447    // QP
     448    CoinModel * model = new CoinModel(1,fileName);
     449    if (model->numberRows()>0)
     450      *coinModel=(void *) model;
     451    Oinfo.uinfo = tempBuffer;
     452    if (getopts(argv, &Oinfo))
     453      return 1;
     454    if (objtype[0])
     455      info->direction=-1.0;
     456    else
     457      info->direction=1.0;
     458    info->offset=objconst(0);
     459    info->numberRows=n_con;
     460    info->numberColumns=n_var;
     461    info->numberElements=nzc;;
     462    info->numberBinary=nbv;
     463    info->numberIntegers=niv;
    431464  }
    432465  /* add -solve - unless something there already
  • branches/devel/Cbc/src/Cbc_ampl.h

    r356 r496  
    4444#endif
    4545  /* return nonzero if bad */
    46   int readAmpl(ampl_info * info,int argc, char ** argv);
     46  int readAmpl(ampl_info * info,int argc, char ** argv,
     47               void ** coinModel);
    4748  /* frees some input arrays */
    4849  void freeArrays1(ampl_info * info);
  • branches/devel/Cbc/src/CoinSolve.cpp

    r484 r496  
    1919
    2020#include "CoinMpsIO.hpp"
     21#include "CoinModel.hpp"
    2122
    2223#include "ClpFactorization.hpp"
     
    5556#include "OsiRowCut.hpp"
    5657#include "OsiColCut.hpp"
    57 
     58#ifdef COIN_HAS_ASL
     59#define COIN_HAS_LINK
     60#endif
     61#ifdef COIN_HAS_LINK
     62#include "CbcLinked.hpp"
     63#endif
    5864#include "CglPreProcess.hpp"
    5965#include "CglCutGenerator.hpp"
     
    576582    int cutPass=-1234567;
    577583    int tunePreProcess=5;
     584    int testOsiParameters=-1;
     585    bool quadraticInteger=false;
    578586    OsiSolverInterface * solver = model.solver();
    579587    OsiClpSolverInterface * clpSolver = dynamic_cast< OsiClpSolverInterface*> (solver);
     
    596604#ifdef COIN_HAS_ASL
    597605    ampl_info info;
     606    CoinModel * coinModel = NULL;
    598607    memset(&info,0,sizeof(info));
    599608    if (argc>2&&!strcmp(argv[2],"-AMPL")) {
    600609      usingAmpl=true;
    601       int returnCode = readAmpl(&info,argc,const_cast<char **>(argv));
     610      int returnCode = readAmpl(&info,argc,const_cast<char **>(argv),(void **) (& coinModel));
    602611      if (returnCode)
    603612        return returnCode;
     
    619628        printf("%d rows, %d columns and %d elements\n",
    620629               info.numberRows,info.numberColumns,info.numberElements);
     630#ifdef COIN_HAS_LINK
     631      if (!coinModel) {
     632#endif
    621633      solver->loadProblem(info.numberColumns,info.numberRows,info.starts,
    622634                          info.rows,info.elements,
    623635                          info.columnLower,info.columnUpper,info.objective,
    624636                          info.rowLower,info.rowUpper);
     637#ifdef COIN_HAS_LINK
     638      } else {
     639        // load from coin model
     640        OsiSolverLink solver1;
     641        OsiSolverInterface * solver2 = solver1.clone();
     642        model.assignSolver(solver2,true);
     643        OsiSolverLink * si =
     644          dynamic_cast<OsiSolverLink *>(model.solver()) ;
     645        assert (si != NULL);
     646        si->setDefaultMeshSize(0.001);
     647        // need some relative granularity
     648        si->setDefaultBound(100.0);
     649        si->setDefaultMeshSize(0.01);
     650        si->setDefaultBound(100.0);
     651        si->setIntegerPriority(1000);
     652        si->setBiLinearPriority(10000);
     653        CoinModel * model2 = (CoinModel *) coinModel;
     654        si->load(*model2);
     655        // redo
     656        solver = model.solver();
     657        clpSolver = dynamic_cast< OsiClpSolverInterface*> (solver);
     658        lpSolver = clpSolver->getModelPtr();
     659        clpSolver->messageHandler()->setLogLevel(0) ;
     660        testOsiParameters=0;
     661        quadraticInteger=true;
     662      }
     663#endif
    625664      // If we had a solution use it
    626665      if (info.primalSolution) {
     
    742781    parameters[whichParam(INTEGERTOLERANCE,numberParameters,parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcIntegerTolerance));
    743782    parameters[whichParam(INCREMENT,numberParameters,parameters)].setDoubleValue(model.getDblParam(CbcModel::CbcCutoffIncrement));
     783    parameters[whichParam(TESTOSI,numberParameters,parameters)].setIntValue(testOsiParameters);
     784    if (testOsiParameters>=0) {
     785      // trying nonlinear - switch off some stuff
     786      preProcess=0;
     787    }
    744788    // Set up likely cut generators and defaults
    745789    parameters[whichParam(PREPROCESS,numberParameters,parameters)].setCurrentOption("on");
     
    762806
    763807    CglProbing probingGen;
    764     probingGen.setUsingObjective(true);
     808    probingGen.setUsingObjective(1);
    765809    probingGen.setMaxPass(3);
    766810    probingGen.setMaxPassRoot(3);
     
    17391783                  dynamic_cast<OsiClpSolverInterface *>(solver) ;
    17401784                ClpSimplex * clpSolver = si->getModelPtr();
    1741                 if (clpSolver->tightenPrimalBounds()!=0) {
     1785                if (!quadraticInteger&&clpSolver->tightenPrimalBounds()!=0) {
    17421786                  std::cout<<"Problem is infeasible - tightenPrimalBounds!"<<std::endl;
    17431787                  exit(1);
     
    19261970                  // Default set of cut generators
    19271971                  CglProbing generator1;
    1928                   generator1.setUsingObjective(true);
     1972                  generator1.setUsingObjective(1);
    19291973                  generator1.setMaxPass(3);
    19301974                  generator1.setMaxProbeRoot(saveSolver->getNumCols());
     
    20062050                if (noPrinting)
    20072051                  modelC->setLogLevel(0);
    2008                 if (modelC->tightenPrimalBounds()!=0) {
     2052                if (!quadraticInteger&&modelC->tightenPrimalBounds()!=0) {
    20092053                  std::cout<<"Problem is infeasible!"<<std::endl;
    20102054                  break;
     
    26852729                      continue;
    26862730                    int iColumn = objects[iObj]->columnNumber();
    2687                     assert (iColumn>=0);
    2688                     if (originalColumns)
    2689                       iColumn = originalColumns[iColumn];
    2690                     if (branchDirection) {
    2691                       OsiSimpleInteger * obj =
    2692                         dynamic_cast <OsiSimpleInteger *>(objects[iObj]) ;
    2693                       if (obj) {
    2694                         obj->setPreferredWay(branchDirection[iColumn]);
    2695                       } else {
    2696                         OsiObject2 * obj =
    2697                           dynamic_cast <OsiObject2 *>(objects[iObj]) ;
    2698                         if (obj)
     2731                    if (iColumn>=0) {
     2732                      if (originalColumns)
     2733                        iColumn = originalColumns[iColumn];
     2734                      if (branchDirection) {
     2735                        OsiSimpleInteger * obj =
     2736                          dynamic_cast <OsiSimpleInteger *>(objects[iObj]) ;
     2737                        if (obj) {
    26992738                          obj->setPreferredWay(branchDirection[iColumn]);
     2739                        } else {
     2740                          OsiObject2 * obj =
     2741                            dynamic_cast <OsiObject2 *>(objects[iObj]) ;
     2742                          if (obj)
     2743                            obj->setPreferredWay(branchDirection[iColumn]);
     2744                        }
    27002745                      }
    27012746                    }
     
    29492994                  info.problemStatus=iStat;
    29502995                  info.objValue = value;
    2951                   if (babModel->getObjValue()<1.0e40)
    2952                     pos += sprintf(buf+pos," objective %.*g",ampl_obj_prec(),
    2953                                    value);
     2996                  if (babModel->getObjValue()<1.0e40) {
     2997                    int precision = ampl_obj_prec();
     2998                    if (precision>0)
     2999                      pos += sprintf(buf+pos," objective %.*g",precision,
     3000                                     value);
     3001                    else
     3002                      pos += sprintf(buf+pos," objective %g",value);
     3003                  }
    29543004                  sprintf(buf+pos,"\n%d nodes, %d iterations",
    29553005                          babModel->getNodeCount(),
     
    48104860    strcpy(line[numberLines++],"5  // Default set of cut generators");
    48114861    strcpy(line[numberLines++],"5  CglProbing generator1;");
    4812     strcpy(line[numberLines++],"5  generator1.setUsingObjective(true);");
     4862    strcpy(line[numberLines++],"5  generator1.setUsingObjective(1);");
    48134863    strcpy(line[numberLines++],"5  generator1.setMaxPass(3);");
    48144864    strcpy(line[numberLines++],"5  generator1.setMaxProbeRoot(saveSolver->getNumCols());");
  • branches/devel/Cbc/src/Makefile.am

    r443 r496  
    4444        CbcStrategy.cpp CbcStrategy.hpp \
    4545        CbcTree.cpp CbcTree.hpp \
     46        CbcLinked.cpp CbcLinked.hpp \
    4647        CbcTreeLocal.cpp CbcTreeLocal.hpp
     48# If we have the Ampl solver library, we need to add additional things
     49# also see lower down
     50if COIN_HAS_ASL
     51libCbc_la_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
     52endif
    4753
    4854# This is for libtool (on Windows)
     
    188194# If we have the Ampl solver library, we need to add additional things
    189195if COIN_HAS_ASL
    190 cbc_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
    191196cbc_LDADD += $(ASLLIB)
    192197AM_CPPFLAGS += $(ASL_CPPFLAGS)
     
    258263        CbcStrategy.hpp \
    259264        CbcTree.hpp \
     265        CbcLinked.hpp \
    260266        CbcTreeLocal.hpp
    261267
  • branches/devel/Cbc/src/Makefile.in

    r443 r496  
    4545build_triplet = @build@
    4646host_triplet = @host@
     47# If we have the Ampl solver library, we need to add additional things
     48# also see lower down
     49@COIN_HAS_ASL_TRUE@am__append_1 = Cbc_ampl.cpp Cbc_ampl.h
    4750bin_PROGRAMS = cbc-generic$(EXEEXT) $(am__EXEEXT_1)
    4851
    4952# List all additionally required solver and Osi libraries
    50 @COIN_HAS_CLP_TRUE@am__append_1 = -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
     53@COIN_HAS_CLP_TRUE@am__append_2 = -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
    5154@COIN_HAS_CLP_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
    5255@COIN_HAS_CLP_TRUE@     -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
    5356
    54 @COIN_HAS_CLP_TRUE@am__append_2 = $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
     57@COIN_HAS_CLP_TRUE@am__append_3 = $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
    5558@COIN_HAS_CLP_TRUE@     $(CLPOBJDIR)/src/libClp.la
    5659
    57 @COIN_HAS_CLP_TRUE@am__append_3 = `cat $(CLPOBJDIR)/clp_addlibs.txt`
    58 @COIN_HAS_CPX_TRUE@am__append_4 = -I`$(CYGPATH_W) $(CPXINCDIR)` \
     60@COIN_HAS_CLP_TRUE@am__append_4 = `cat $(CLPOBJDIR)/clp_addlibs.txt`
     61@COIN_HAS_CPX_TRUE@am__append_5 = -I`$(CYGPATH_W) $(CPXINCDIR)` \
    5962@COIN_HAS_CPX_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
    6063
    61 @COIN_HAS_CPX_TRUE@am__append_5 = $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
    62 @COIN_HAS_DYLP_TRUE@am__append_6 = -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/DylpStdLib` \
     64@COIN_HAS_CPX_TRUE@am__append_6 = $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
     65@COIN_HAS_DYLP_TRUE@am__append_7 = -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/DylpStdLib` \
    6366@COIN_HAS_DYLP_TRUE@        -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/Dylp` \
    6467@COIN_HAS_DYLP_TRUE@        -I`$(CYGPATH_W) $(DYLPOBJDIR)/inc` \
    6568@COIN_HAS_DYLP_TRUE@    -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
    6669
    67 @COIN_HAS_DYLP_TRUE@am__append_7 = $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
     70@COIN_HAS_DYLP_TRUE@am__append_8 = $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
    6871@COIN_HAS_DYLP_TRUE@    $(DYLPOBJDIR)/src/Dylp/libDylp.la
    6972
    70 @COIN_HAS_DYLP_TRUE@am__append_8 = `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
    71 @COIN_HAS_FMP_TRUE@am__append_9 = -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
    72 @COIN_HAS_FMP_TRUE@am__append_10 = $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
    73 @COIN_HAS_GLPK_TRUE@am__append_11 = -I`$(CYGPATH_W) $(GLPKINCDIR)` \
     73@COIN_HAS_DYLP_TRUE@am__append_9 = `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
     74@COIN_HAS_FMP_TRUE@am__append_10 = -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
     75@COIN_HAS_FMP_TRUE@am__append_11 = $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
     76@COIN_HAS_GLPK_TRUE@am__append_12 = -I`$(CYGPATH_W) $(GLPKINCDIR)` \
    7477@COIN_HAS_GLPK_TRUE@    -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
    7578
    76 @COIN_HAS_GLPK_TRUE@am__append_12 = $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
    77 @COIN_HAS_MSK_TRUE@am__append_13 = -I`$(CYGPATH_W) $(MSKINCDIR)` \
     79@COIN_HAS_GLPK_TRUE@am__append_13 = $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
     80@COIN_HAS_MSK_TRUE@am__append_14 = -I`$(CYGPATH_W) $(MSKINCDIR)` \
    7881@COIN_HAS_MSK_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
    7982
    80 @COIN_HAS_MSK_TRUE@am__append_14 = $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
    81 @COIN_HAS_OSL_TRUE@am__append_15 = -I`$(CYGPATH_W) $(OSLINCDIR)` \
     83@COIN_HAS_MSK_TRUE@am__append_15 = $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
     84@COIN_HAS_OSL_TRUE@am__append_16 = -I`$(CYGPATH_W) $(OSLINCDIR)` \
    8285@COIN_HAS_OSL_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
    8386
    84 @COIN_HAS_OSL_TRUE@am__append_16 = $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
    85 @COIN_HAS_SPX_TRUE@am__append_17 = -I`$(CYGPATH_W) $(SPXINCDIR)` \
     87@COIN_HAS_OSL_TRUE@am__append_17 = $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
     88@COIN_HAS_SPX_TRUE@am__append_18 = -I`$(CYGPATH_W) $(SPXINCDIR)` \
    8689@COIN_HAS_SPX_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
    8790
    88 @COIN_HAS_SPX_TRUE@am__append_18 = $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
    89 @COIN_HAS_SYM_TRUE@am__append_19 = -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
     91@COIN_HAS_SPX_TRUE@am__append_19 = $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
     92@COIN_HAS_SYM_TRUE@am__append_20 = -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
    9093@COIN_HAS_SYM_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
    9194
    92 @COIN_HAS_SYM_TRUE@am__append_20 = $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
     95@COIN_HAS_SYM_TRUE@am__append_21 = $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
    9396@COIN_HAS_SYM_TRUE@     $(SYMOBJDIR)/src/libSym.la
    9497
    95 @COIN_HAS_SYM_TRUE@am__append_21 = `cat $(SYMOBJDIR)/sym_addlibs.txt`
    96 @COIN_HAS_VOL_TRUE@am__append_22 = -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
     98@COIN_HAS_SYM_TRUE@am__append_22 = `cat $(SYMOBJDIR)/sym_addlibs.txt`
     99@COIN_HAS_VOL_TRUE@am__append_23 = -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
    97100@COIN_HAS_VOL_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
    98101
    99 @COIN_HAS_VOL_TRUE@am__append_23 = $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
     102@COIN_HAS_VOL_TRUE@am__append_24 = $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
    100103@COIN_HAS_VOL_TRUE@     $(VOLOBJDIR)/src/libVol.la
    101104
    102 @COIN_HAS_VOL_TRUE@am__append_24 = `cat $(VOLOBJDIR)/vol_addlibs.txt`
    103 @COIN_HAS_XPR_TRUE@am__append_25 = -I`$(CYGPATH_W) $(XPRINCDIR)` \
     105@COIN_HAS_VOL_TRUE@am__append_25 = `cat $(VOLOBJDIR)/vol_addlibs.txt`
     106@COIN_HAS_XPR_TRUE@am__append_26 = -I`$(CYGPATH_W) $(XPRINCDIR)` \
    104107@COIN_HAS_XPR_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
    105108
    106 @COIN_HAS_XPR_TRUE@am__append_26 = $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
     109@COIN_HAS_XPR_TRUE@am__append_27 = $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
    107110
    108111########################################################################
     
    112115# Name of the executable compiled in this directory.  We want it to be
    113116# installed in the 'bin' directory
    114 @COIN_HAS_CLP_TRUE@am__append_27 = cbc
     117@COIN_HAS_CLP_TRUE@am__append_28 = cbc
    115118
    116119# If we have the Ampl solver library, we need to add additional things
    117 @COIN_HAS_ASL_TRUE@@COIN_HAS_CLP_TRUE@am__append_28 = Cbc_ampl.cpp Cbc_ampl.h
    118120@COIN_HAS_ASL_TRUE@@COIN_HAS_CLP_TRUE@am__append_29 = $(ASLLIB)
    119121@COIN_HAS_ASL_TRUE@@COIN_HAS_CLP_TRUE@am__append_30 = $(ASL_CPPFLAGS)
     
    140142LTLIBRARIES = $(lib_LTLIBRARIES)
    141143libCbc_la_LIBADD =
     144am__libCbc_la_SOURCES_DIST = Cbc_C_Interface.cpp Cbc_C_Interface.h \
     145        CbcConfig.h CbcBranchActual.cpp CbcBranchActual.hpp \
     146        CbcBranchBase.cpp CbcBranchBase.hpp CbcBranchCut.cpp \
     147        CbcBranchCut.hpp CbcBranchDynamic.cpp CbcBranchDynamic.hpp \
     148        CbcBranchLotsize.cpp CbcBranchLotsize.hpp CbcCompareActual.cpp \
     149        CbcCompareActual.hpp CbcCompareBase.hpp CbcCountRowCut.cpp \
     150        CbcCountRowCut.hpp CbcCutGenerator.cpp CbcCutGenerator.hpp \
     151        CbcEventHandler.cpp CbcEventHandler.hpp CbcFathom.cpp \
     152        CbcFathom.hpp CbcFathomDynamicProgramming.cpp \
     153        CbcFathomDynamicProgramming.hpp CbcFeasibilityBase.hpp \
     154        CbcHeuristic.cpp CbcHeuristic.hpp CbcHeuristicFPump.cpp \
     155        CbcHeuristicFPump.hpp CbcHeuristicGreedy.cpp \
     156        CbcHeuristicGreedy.hpp CbcHeuristicLocal.cpp \
     157        CbcHeuristicLocal.hpp CbcMessage.cpp CbcMessage.hpp \
     158        CbcModel.cpp CbcModel.hpp CbcNode.cpp CbcNode.hpp \
     159        CbcStatistics.cpp CbcStatistics.hpp CbcStrategy.cpp \
     160        CbcStrategy.hpp CbcTree.cpp CbcTree.hpp CbcLinked.cpp \
     161        CbcLinked.hpp CbcTreeLocal.cpp CbcTreeLocal.hpp Cbc_ampl.cpp \
     162        Cbc_ampl.h
     163@COIN_HAS_ASL_TRUE@am__objects_1 = Cbc_ampl.lo
    142164am_libCbc_la_OBJECTS = Cbc_C_Interface.lo CbcBranchActual.lo \
    143165        CbcBranchBase.lo CbcBranchCut.lo CbcBranchDynamic.lo \
     
    147169        CbcHeuristicFPump.lo CbcHeuristicGreedy.lo \
    148170        CbcHeuristicLocal.lo CbcMessage.lo CbcModel.lo CbcNode.lo \
    149         CbcStatistics.lo CbcStrategy.lo CbcTree.lo CbcTreeLocal.lo
     171        CbcStatistics.lo CbcStrategy.lo CbcTree.lo CbcLinked.lo \
     172        CbcTreeLocal.lo $(am__objects_1)
    150173libCbc_la_OBJECTS = $(am_libCbc_la_OBJECTS)
    151174@COIN_HAS_CLP_TRUE@am__EXEEXT_1 = cbc$(EXEEXT)
    152175binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    153176PROGRAMS = $(bin_PROGRAMS)
    154 am__cbc_SOURCES_DIST = CoinSolve.cpp CbcCbcParam.cpp unitTestClp.cpp \
    155         Cbc_ampl.cpp Cbc_ampl.h
    156 @COIN_HAS_ASL_TRUE@@COIN_HAS_CLP_TRUE@am__objects_1 =  \
    157 @COIN_HAS_ASL_TRUE@@COIN_HAS_CLP_TRUE@  Cbc_ampl.$(OBJEXT)
     177am__cbc_SOURCES_DIST = CoinSolve.cpp CbcCbcParam.cpp unitTestClp.cpp
    158178@COIN_HAS_CLP_TRUE@am_cbc_OBJECTS = CoinSolve.$(OBJEXT) \
    159 @COIN_HAS_CLP_TRUE@     CbcCbcParam.$(OBJEXT) unitTestClp.$(OBJEXT) \
    160 @COIN_HAS_CLP_TRUE@     $(am__objects_1)
     179@COIN_HAS_CLP_TRUE@     CbcCbcParam.$(OBJEXT) unitTestClp.$(OBJEXT)
    161180cbc_OBJECTS = $(am_cbc_OBJECTS)
    162181am__DEPENDENCIES_1 =
     
    227246        $(AM_LDFLAGS) $(LDFLAGS) -o $@
    228247SOURCES = $(libCbc_la_SOURCES) $(cbc_SOURCES) $(cbc_generic_SOURCES)
    229 DIST_SOURCES = $(libCbc_la_SOURCES) $(am__cbc_SOURCES_DIST) \
     248DIST_SOURCES = $(am__libCbc_la_SOURCES_DIST) $(am__cbc_SOURCES_DIST) \
    230249        $(cbc_generic_SOURCES)
    231250includeHEADERS_INSTALL = $(INSTALL_HEADER)
     
    334353LIBEXT = @LIBEXT@
    335354LIBOBJS = @LIBOBJS@
    336 LIBS = @LIBS@ $(am__append_3) $(am__append_8) $(am__append_21) \
    337         $(am__append_24) `cat $(OSIOBJDIR)/osi_addlibs.txt` `cat \
     355LIBS = @LIBS@ $(am__append_4) $(am__append_9) $(am__append_22) \
     356        $(am__append_25) `cat $(OSIOBJDIR)/osi_addlibs.txt` `cat \
    338357        $(COINUTILSOBJDIR)/coinutils_addlibs.txt` $(ADDLIBS)
    339358LIBTOOL = @LIBTOOL@
     
    440459
    441460# List all source files for this library, including headers
    442 libCbc_la_SOURCES = \
    443         Cbc_C_Interface.cpp Cbc_C_Interface.h \
    444         CbcConfig.h \
    445         CbcBranchActual.cpp CbcBranchActual.hpp \
    446         CbcBranchBase.cpp CbcBranchBase.hpp \
    447         CbcBranchCut.cpp CbcBranchCut.hpp \
    448         CbcBranchDynamic.cpp CbcBranchDynamic.hpp \
    449         CbcBranchLotsize.cpp CbcBranchLotsize.hpp \
    450         CbcCompareActual.cpp CbcCompareActual.hpp \
    451         CbcCompareBase.hpp \
    452         CbcCountRowCut.cpp CbcCountRowCut.hpp \
    453         CbcCutGenerator.cpp CbcCutGenerator.hpp \
    454         CbcEventHandler.cpp CbcEventHandler.hpp \
    455         CbcFathom.cpp CbcFathom.hpp \
    456         CbcFathomDynamicProgramming.cpp CbcFathomDynamicProgramming.hpp \
    457         CbcFeasibilityBase.hpp \
    458         CbcHeuristic.cpp CbcHeuristic.hpp \
    459         CbcHeuristicFPump.cpp CbcHeuristicFPump.hpp \
    460         CbcHeuristicGreedy.cpp CbcHeuristicGreedy.hpp \
    461         CbcHeuristicLocal.cpp CbcHeuristicLocal.hpp \
    462         CbcMessage.cpp CbcMessage.hpp \
    463         CbcModel.cpp CbcModel.hpp \
    464         CbcNode.cpp CbcNode.hpp \
    465         CbcStatistics.cpp CbcStatistics.hpp \
    466         CbcStrategy.cpp CbcStrategy.hpp \
    467         CbcTree.cpp CbcTree.hpp \
    468         CbcTreeLocal.cpp CbcTreeLocal.hpp
    469 
     461libCbc_la_SOURCES = Cbc_C_Interface.cpp Cbc_C_Interface.h CbcConfig.h \
     462        CbcBranchActual.cpp CbcBranchActual.hpp CbcBranchBase.cpp \
     463        CbcBranchBase.hpp CbcBranchCut.cpp CbcBranchCut.hpp \
     464        CbcBranchDynamic.cpp CbcBranchDynamic.hpp CbcBranchLotsize.cpp \
     465        CbcBranchLotsize.hpp CbcCompareActual.cpp CbcCompareActual.hpp \
     466        CbcCompareBase.hpp CbcCountRowCut.cpp CbcCountRowCut.hpp \
     467        CbcCutGenerator.cpp CbcCutGenerator.hpp CbcEventHandler.cpp \
     468        CbcEventHandler.hpp CbcFathom.cpp CbcFathom.hpp \
     469        CbcFathomDynamicProgramming.cpp \
     470        CbcFathomDynamicProgramming.hpp CbcFeasibilityBase.hpp \
     471        CbcHeuristic.cpp CbcHeuristic.hpp CbcHeuristicFPump.cpp \
     472        CbcHeuristicFPump.hpp CbcHeuristicGreedy.cpp \
     473        CbcHeuristicGreedy.hpp CbcHeuristicLocal.cpp \
     474        CbcHeuristicLocal.hpp CbcMessage.cpp CbcMessage.hpp \
     475        CbcModel.cpp CbcModel.hpp CbcNode.cpp CbcNode.hpp \
     476        CbcStatistics.cpp CbcStatistics.hpp CbcStrategy.cpp \
     477        CbcStrategy.hpp CbcTree.cpp CbcTree.hpp CbcLinked.cpp \
     478        CbcLinked.hpp CbcTreeLocal.cpp CbcTreeLocal.hpp \
     479        $(am__append_1)
    470480
    471481# This is for libtool (on Windows)
     
    482492# Finally the Osi Coin library (many of the above need it)
    483493cbc_generic_LDADD = libCbc.la $(CGLOBJDIR)/src/libCgl.la \
    484         $(OSIOBJDIR)/src/OsiCbc/libOsiCbc.la $(am__append_2) \
    485         $(am__append_5) $(am__append_7) $(am__append_10) \
    486         $(am__append_12) $(am__append_14) $(am__append_16) \
    487         $(am__append_18) $(am__append_20) $(am__append_23) \
    488         $(am__append_26) $(OSIOBJDIR)/src/libOsi.la \
     494        $(OSIOBJDIR)/src/OsiCbc/libOsiCbc.la $(am__append_3) \
     495        $(am__append_6) $(am__append_8) $(am__append_11) \
     496        $(am__append_13) $(am__append_15) $(am__append_17) \
     497        $(am__append_19) $(am__append_21) $(am__append_24) \
     498        $(am__append_27) $(OSIOBJDIR)/src/libOsi.la \
    489499        $(COINUTILSOBJDIR)/src/libCoinUtils.la
    490500
     
    499509
    500510# List additional defines
    501 AM_CPPFLAGS = -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCbc` $(am__append_1) \
    502         $(am__append_4) $(am__append_6) $(am__append_9) \
    503         $(am__append_11) $(am__append_13) $(am__append_15) \
    504         $(am__append_17) $(am__append_19) $(am__append_22) \
    505         $(am__append_25) $(am__append_30) -I`$(CYGPATH_W) \
     511AM_CPPFLAGS = -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCbc` $(am__append_2) \
     512        $(am__append_5) $(am__append_7) $(am__append_10) \
     513        $(am__append_12) $(am__append_14) $(am__append_16) \
     514        $(am__append_18) $(am__append_20) $(am__append_23) \
     515        $(am__append_26) $(am__append_30) -I`$(CYGPATH_W) \
    506516        $(CGLSRCDIR)/src` -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
    507517        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglDuplicateRow` \
     
    528538
    529539# List all source files for this executable, including headers
    530 @COIN_HAS_CLP_TRUE@cbc_SOURCES = CoinSolve.cpp CbcCbcParam.cpp \
    531 @COIN_HAS_CLP_TRUE@     unitTestClp.cpp $(am__append_28)
     540@COIN_HAS_CLP_TRUE@cbc_SOURCES = \
     541@COIN_HAS_CLP_TRUE@     CoinSolve.cpp \
     542@COIN_HAS_CLP_TRUE@     CbcCbcParam.cpp \
     543@COIN_HAS_CLP_TRUE@     unitTestClp.cpp
     544
    532545
    533546# Additional COIN libraries
     
    576589        CbcStrategy.hpp \
    577590        CbcTree.hpp \
     591        CbcLinked.hpp \
    578592        CbcTreeLocal.hpp
    579593
     
    704718@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicGreedy.Plo@am__quote@
    705719@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicLocal.Plo@am__quote@
     720@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcLinked.Plo@am__quote@
    706721@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcMain.Po@am__quote@
    707722@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcMessage.Plo@am__quote@
     
    714729@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcTreeLocal.Plo@am__quote@
    715730@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cbc_C_Interface.Plo@am__quote@
    716 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cbc_ampl.Po@am__quote@
     731@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cbc_ampl.Plo@am__quote@
    717732@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CoinSolve.Po@am__quote@
    718733@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unitTest.Po@am__quote@
Note: See TracChangeset for help on using the changeset viewer.