Changeset 2026


Ignore:
Timestamp:
Mar 20, 2014 5:06:26 AM (5 years ago)
Author:
forrest
Message:

fix compile error for abc

Location:
trunk/Clp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/AbcSimplex.hpp

    r2024 r2026  
    6464  //const CoinIndexedVector * constVector; // can get rid of
    6565  //CoinIndexedVector * vectors[2]; // can get rid of
     66  void * extraInfo;
    6667  int status;
    6768  int stuff[4];
  • trunk/Clp/src/ClpSimplex.cpp

    r2025 r2026  
    28622862     double relaxedToleranceP = primalTolerance_;
    28632863     // we can't really trust infeasibilities if there is primal error
    2864      double error = CoinMin(1.0e-2, CoinMax(largestPrimalError_,5.0*primalTolerance_));
     2864     double error = CoinMin(1.0e-2, CoinMax(largestPrimalError_,0.0*primalTolerance_));
    28652865     // allow tolerance at least slightly bigger than standard
    28662866     relaxedToleranceP = relaxedToleranceP +  error;
     
    1104611046                         bestStatus = CoinCopyOfArray(status_, numberTotal);
    1104711047                         bestObjective = objectiveValue - increment;
    11048                          if (perturbation_<100)
    11049                            bestObjective += 1.0e-2+1.0e-7*fabs(bestObjective);
     11048                         if (perturbation_<100) {
     11049                           // be safer - but still cut off others
     11050                           bestObjective += 1.0e-5+1.0e-7*fabs(bestObjective);
     11051                           bestObjective = CoinMin(bestObjective,
     11052                                                   objectiveValue-1.0e-5);
     11053                         }
    1105011054                         setDblParam(ClpDualObjectiveLimit, bestObjective * optimizationDirection_);
    1105111055                    } else {
     
    1175811762     delete [] solution;
    1175911763#endif
     11764     computeObjectiveValue(); // without perturbation
    1176011765     return objectiveValue() * optimizationDirection_;
    1176111766}
  • trunk/Clp/src/ClpSolve.cpp

    r2025 r2026  
    52185218}
    52195219#ifdef ABC_INHERIT
     5220// Use pthreads
     5221#include <pthread.h>
     5222class AbcPthreadStuff {
     5223public:
     5224  /**@name Constructors and destructor and copy */
     5225  //@{
     5226  /** Main constructor
     5227  */
     5228  AbcPthreadStuff (int numberThreads=0);
     5229  /// Assignment operator. This copies the data
     5230  AbcPthreadStuff & operator=(const AbcPthreadStuff & rhs);
     5231  /// Destructor
     5232  ~AbcPthreadStuff (  );
     5233  /// set stop start
     5234  inline void setStopStart(int value)
     5235  { stopStart_=value;}
     5236#ifndef NUMBER_THREADS
     5237#define NUMBER_THREADS 8
     5238#endif
     5239  // For waking up thread
     5240  inline pthread_mutex_t * mutexPointer(int which,int thread=0)
     5241  { return mutex_+which+3*thread;}
     5242  inline pthread_barrier_t * barrierPointer()
     5243  { return &barrier_;}
     5244  inline int whichLocked(int thread=0) const
     5245  { return locked_[thread];}
     5246  inline CoinAbcThreadInfo * threadInfoPointer(int thread=0)
     5247  { return threadInfo_+thread;}
     5248  void startParallelTask(int type,int iThread,void * info=NULL);
     5249  int waitParallelTask(int type, int & iThread,bool allowIdle);
     5250  void waitAllTasks();
     5251  /// so thread can find out which one it is
     5252  int whichThread() const;
     5253  //void startThreads(int numberThreads);
     5254  //void stopThreads();
     5255  // For waking up thread
     5256  pthread_mutex_t mutex_[3*(NUMBER_THREADS+1)];
     5257  pthread_barrier_t barrier_;
     5258  CoinAbcThreadInfo threadInfo_[NUMBER_THREADS+1];
     5259  pthread_t abcThread_[NUMBER_THREADS+1];
     5260  int locked_[NUMBER_THREADS+1];
     5261  int stopStart_;
     5262  int numberThreads_;
     5263};
    52205264static void * abc_parallelManager(void * stuff)
    52215265{
Note: See TracChangeset for help on using the changeset viewer.