Changeset 1149


Ignore:
Timestamp:
Apr 19, 2009 12:32:04 PM (11 years ago)
Author:
forrest
Message:

warnings

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcBranchCut.cpp

    r1148 r1149  
    600600        // possible
    601601        if (numberUnsatisfied>nBest||
    602             numberUnsatisfied==nBest&&sum<bestSum) {
     602            (numberUnsatisfied==nBest&&sum<bestSum)) {
    603603          nBest=numberUnsatisfied;
    604604          bestSum=sum;
     
    859859        // possible
    860860        if (numberUnsatisfied>nBest||
    861             numberUnsatisfied==nBest&&sum<bestSum) {
     861            (numberUnsatisfied==nBest&&sum<bestSum)) {
    862862          nBest=numberUnsatisfied;
    863863          bestSum=sum;
  • trunk/Cbc/src/CbcHeuristicLocal.cpp

    r1132 r1149  
    258258    if (value<originalUpper-0.5)
    259259      iway |= 2;
    260     way[i]=iway;
     260    way[i]=static_cast<char>(iway);
    261261  }
    262262  // get row activities
     
    503503        if (value<originalUpper-0.5)
    504504          iway |= 2;
    505         way[goodK]=iway;
     505        way[goodK]=static_cast<char>(iway);
    506506      }
    507507    }
     
    583583      const int * used = model_->usedInSolution();
    584584      for (int i=0;i<numberColumns;i++)
    585         used_[i]= CoinMin(used[i],255);
     585        used_[i]= static_cast<char>(CoinMin(used[i],255));
    586586    }
    587587    // try merge
  • trunk/Cbc/src/CbcModel.cpp

    r1146 r1149  
    5858#include "CbcHeuristic.hpp"
    5959#include "CbcHeuristicFPump.hpp"
     60#include "CbcHeuristicDive.hpp"
    6061#include "CbcModel.hpp"
    6162#include "CbcTreeLocal.hpp"
     
    25392540  int threadStats[6];
    25402541  int defaultParallelIterations=400;
    2541   int defaultParallelNodes=10;
     2542  int defaultParallelNodes=2;
    25422543  memset(threadStats,0,sizeof(threadStats));
    25432544  double timeWaiting=0.0;
     
    32203221        // say in use
    32213222        threadModel[iThread]->moveToModel(this,0);
     3223        // This has to be AFTER moveToModel
    32223224        threadInfo[iThread].returnCode=0;
    32233225        pthread_cond_signal(threadInfo[iThread].condition2); // unlock
     
    32983300    } else {
    32993301      // Deterministic parallel
    3300       if (tree_->size()<5*numberThreads_&&!goneParallel) {
     3302      if (tree_->size()<CoinMin(numberThreads_,8)&&!goneParallel) {
    33013303        node = tree_->bestNode(cutoff) ;
    33023304        // Possible one on tree worse than cutoff
     
    34263428          int newNumber = static_cast<int> (defaultParallelNodes * scaleFactor+0.5001);
    34273429          if (newNumber*2<defaultParallelIterations) {
    3428             char general[200];
    3429             sprintf(general,"Changing tree size from %d to %d",
    3430                     defaultParallelNodes,newNumber);
    3431             messageHandler()->message(CBC_GENERAL,
    3432                                       messages())
    3433               << general << CoinMessageEol ;
    3434             defaultParallelNodes = newNumber;
     3430            if (defaultParallelNodes==1)
     3431              newNumber=2;
     3432            if (newNumber!=defaultParallelNodes) {
     3433              char general[200];
     3434              sprintf(general,"Changing tree size from %d to %d",
     3435                      defaultParallelNodes,newNumber);
     3436              messageHandler()->message(CBC_GENERAL,
     3437                                        messages())
     3438                << general << CoinMessageEol ;
     3439              defaultParallelNodes = newNumber;
     3440            }
    34353441          }
    34363442        }
     
    93969402      object_[iObject] = newObject;
    93979403    } else if (!obj2) {
    9398       allDynamic=false;
     9404      CbcObject * obj3 =
     9405      dynamic_cast <CbcObject *>(object_[iObject]) ;
     9406      if (!obj3 || !obj3->optionalObject())
     9407        allDynamic=false;
    93999408    } else {
    94009409      // synchronize trust
     
    94459454{
    94469455 // If integers but not enough objects fudge
    9447   if (numberIntegers_>numberObjects_)
     9456  if (numberIntegers_>numberObjects_||!numberObjects_)
    94489457    findIntegers(true);
    94499458  /* But if incoming objects inherit from simple integer we just want
     
    1303113040            name.c_str(),howOften);
    1303213041    // change name
    13033     name[0]=toupper(name[0]);
     13042    name[0]=static_cast<char>(toupper(name[0]));
    1303413043    fprintf(fp,"\"%s\",%s,%s,%s,%d,%d,%d);\n",
    1303513044            name.c_str(),normal ? "true" : "false",
     
    1432814337    otherModel->numberSolutions_ = numberSolutions_;
    1432914338    otherModel->numberHeuristicSolutions_ = numberHeuristicSolutions_;
    14330     otherModel->numberNodes_ = numberNodes_;
     14339    otherModel->numberNodes_ = 1; //numberNodes_;
    1433114340    otherModel->numberIterations_ = numberIterations_;
    1433214341#if 0
     
    1531315322  return doCuts;
    1531415323}
    15315 #include "CbcHeuristicDive.hpp"
    1531615324// Adjust heuristics based on model
    1531715325void
Note: See TracChangeset for help on using the changeset viewer.