Changeset 19


Ignore:
Timestamp:
Sep 16, 2002 1:54:29 AM (17 years ago)
Author:
ladanyi
Message:

reordering Clp

Location:
branches/devel-1
Files:
1 added
33 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/ClpDualRowDantzig.cpp

    r2 r19  
    99#include "ClpSimplex.hpp"
    1010#include "ClpDualRowDantzig.hpp"
    11 #include "OsiIndexedVector.hpp"
     11#include "CoinIndexedVector.hpp"
    1212
    1313//#############################################################################
     
    8686*/
    8787void
    88 ClpDualRowDantzig::updatePrimalSolution(
    89                                         OsiIndexedVector * primalUpdate,
     88ClpDualRowDantzig::updatePrimalSolution(CoinIndexedVector * primalUpdate,
    9089                                        double primalRatio,
    9190                                        double & objectiveChange)
  • branches/devel-1/ClpDualRowPivot.cpp

    r2 r19  
    6666
    6767void
    68 ClpDualRowPivot::updateWeights(OsiIndexedVector * input,
    69                                OsiIndexedVector * spare,
    70                                OsiIndexedVector * updatedColumn)
     68ClpDualRowPivot::updateWeights(CoinIndexedVector * input,
     69                               CoinIndexedVector * spare,
     70                               CoinIndexedVector * updatedColumn)
    7171{
    7272}
  • branches/devel-1/ClpDualRowSteepest.cpp

    r17 r19  
    99#include "ClpSimplex.hpp"
    1010#include "ClpDualRowSteepest.hpp"
    11 #include "OsiIndexedVector.hpp"
     11#include "CoinIndexedVector.hpp"
    1212#include "ClpFactorization.hpp"
    1313#include "CoinHelperFunctions.hpp"
    14 #include <stdio.h>
     14#include <cstdio>
    1515
    1616//#############################################################################
     
    4343  model_ = rhs.model_;
    4444  if (rhs.infeasible_) {
    45     infeasible_= new OsiIndexedVector(rhs.infeasible_);
     45    infeasible_= new CoinIndexedVector(rhs.infeasible_);
    4646  } else {
    4747    infeasible_=NULL;
     
    5656  }
    5757  if (rhs.alternateWeights_) {
    58     alternateWeights_= new OsiIndexedVector(rhs.alternateWeights_);
     58    alternateWeights_= new CoinIndexedVector(rhs.alternateWeights_);
    5959  } else {
    6060    alternateWeights_=NULL;
    6161  }
    6262  if (rhs.savedWeights_) {
    63     savedWeights_= new OsiIndexedVector(rhs.savedWeights_);
     63    savedWeights_= new CoinIndexedVector(rhs.savedWeights_);
    6464  } else {
    6565    savedWeights_=NULL;
     
    9494    delete savedWeights_;
    9595    if (rhs.infeasible_!=NULL) {
    96       infeasible_= new OsiIndexedVector(rhs.infeasible_);
     96      infeasible_= new CoinIndexedVector(rhs.infeasible_);
    9797    } else {
    9898      infeasible_=NULL;
     
    107107    }
    108108    if (rhs.alternateWeights_!=NULL) {
    109       alternateWeights_= new OsiIndexedVector(rhs.alternateWeights_);
     109      alternateWeights_= new CoinIndexedVector(rhs.alternateWeights_);
    110110    } else {
    111111      alternateWeights_=NULL;
    112112    }
    113113    if (rhs.savedWeights_!=NULL) {
    114       savedWeights_= new OsiIndexedVector(rhs.savedWeights_);
     114      savedWeights_= new CoinIndexedVector(rhs.savedWeights_);
    115115    } else {
    116116      savedWeights_=NULL;
     
    153153// Updates weights
    154154void
    155 ClpDualRowSteepest::updateWeights(OsiIndexedVector * input,
    156                                   OsiIndexedVector * spare,
    157                                   OsiIndexedVector * updatedColumn)
     155ClpDualRowSteepest::updateWeights(CoinIndexedVector * input,
     156                                  CoinIndexedVector * spare,
     157                                  CoinIndexedVector * updatedColumn)
    158158{
    159159  // clear other region
     
    172172  {
    173173    int numberRows = model_->numberRows();
    174     OsiIndexedVector * temp = new OsiIndexedVector();
     174    CoinIndexedVector * temp = new CoinIndexedVector();
    175175    temp->reserve(numberRows+
    176176                  model_->factorization()->maximumPivots());
     
    265265void
    266266ClpDualRowSteepest::updatePrimalSolution(
    267                                         OsiIndexedVector * primalUpdate,
     267                                        CoinIndexedVector * primalUpdate,
    268268                                        double primalRatio,
    269269                                        double & objectiveChange)
     
    352352      delete alternateWeights_;
    353353      weights_ = new double[numberRows];
    354       alternateWeights_ = new OsiIndexedVector();
     354      alternateWeights_ = new CoinIndexedVector();
    355355      // enough space so can use it for factorization
    356356      alternateWeights_->reserve(numberRows+
     
    362362        }
    363363      } else {
    364         OsiIndexedVector * temp = new OsiIndexedVector();
     364        CoinIndexedVector * temp = new CoinIndexedVector();
    365365        temp->reserve(numberRows+
    366366                      model_->factorization()->maximumPivots());
     
    387387      }
    388388      // create saved weights (not really indexedvector)
    389       savedWeights_ = new OsiIndexedVector();
     389      savedWeights_ = new CoinIndexedVector();
    390390      savedWeights_->reserve(numberRows);
    391391     
     
    428428    // set up infeasibilities
    429429    if (!infeasible_) {
    430       infeasible_ = new OsiIndexedVector();
     430      infeasible_ = new CoinIndexedVector();
    431431      infeasible_->reserve(numberRows);
    432432    }
  • branches/devel-1/ClpFactorization.cpp

    r15 r19  
    1919// Default Constructor
    2020//-------------------------------------------------------------------
    21 ClpFactorization::ClpFactorization ()
    22   : OsiFactorization()
    23 {
    24 }
     21ClpFactorization::ClpFactorization () :
     22   CoinFactorization() {}
    2523
    2624//-------------------------------------------------------------------
    2725// Copy constructor
    2826//-------------------------------------------------------------------
    29 ClpFactorization::ClpFactorization (const ClpFactorization & rhs)
    30 : OsiFactorization(rhs)
    31 
    32  
    33 }
     27ClpFactorization::ClpFactorization (const ClpFactorization & rhs) :
     28   CoinFactorization(rhs) {}
    3429
    35 ClpFactorization::ClpFactorization (const OsiFactorization & rhs)
    36 : OsiFactorization(rhs)
    37 
    38  
    39 }
     30ClpFactorization::ClpFactorization (const CoinFactorization & rhs) :
     31   CoinFactorization(rhs) {}
    4032
    4133//-------------------------------------------------------------------
    4234// Destructor
    4335//-------------------------------------------------------------------
    44 ClpFactorization::~ClpFactorization ()
    45 {
    46 }
     36ClpFactorization::~ClpFactorization () {}
    4737
    4838//----------------------------------------------------------------
     
    5343{
    5444  if (this != &rhs) {
    55     OsiFactorization::operator=(rhs);
     45    CoinFactorization::operator=(rhs);
    5646  }
    5747  return *this;
     
    7060    areaFactor_ = areaFactor;
    7161  int numberBasic = 0;
    72   OsiBigIndex numberElements=0;
     62  ClpBigIndex numberElements=0;
    7363  int numberRowBasic=0;
    7464
  • branches/devel-1/ClpMessage.cpp

    r15 r19  
    6161/* Constructor */
    6262ClpMessage::ClpMessage(Language language) :
    63   OsiMessages(sizeof(us_english)/sizeof(Clp_message))
     63  CoinMessages(sizeof(us_english)/sizeof(Clp_message))
    6464{
    6565  language_=language;
     
    6868
    6969  while (message->internalNumber!=CLP_DUMMY_END) {
    70       OsiOneMessage oneMessage(message->externalNumber,message->detail,
    71                 message->message);
    72     addMessage(message->internalNumber,oneMessage);
    73     message ++;
     70     CoinOneMessage oneMessage(message->externalNumber,message->detail,
     71                               message->message);
     72     addMessage(message->internalNumber,oneMessage);
     73     message ++;
    7474}
    7575
  • branches/devel-1/ClpModel.cpp

    r17 r19  
    66#endif
    77
    8 #include <math.h>
     8#include <cmath>
     9#include <cassert>
     10#include <cfloat>
     11#include <string>
     12#include <cstdio>
     13#include <iostream>
     14
     15#include <time.h>
     16#include <sys/times.h>
     17#include <sys/resource.h>
     18#include <unistd.h>
    919
    1020#include "CoinHelperFunctions.hpp"
    1121#include "ClpModel.hpp"
    1222#include "ClpPackedMatrix.hpp"
    13 #include "OsiIndexedVector.hpp"
    14 #include "OsiMpsReader.hpp"
     23#include "CoinIndexedVector.hpp"
     24#include "CoinMpsIO.hpp"
    1525#include "ClpMessage.hpp"
    16 #include <cassert>
    17 #include <cfloat>
    18 
    19 #include <string>
    20 #include <stdio.h>
    21 #include <iostream>
    22 #include  <time.h>
    23 #include <sys/times.h>
    24 #include <sys/resource.h>
    25 #include <unistd.h>
     26
    2627// This returns a non const array filled with input from scalar
    2728// or actual array
     
    9697  integerType_(NULL)
    9798{
    98   intParam_[OsiMaxNumIteration] = 9999999;
    99   intParam_[OsiMaxNumIterationHotStart] = 9999999;
    100 
    101   dblParam_[OsiDualObjectiveLimit] = DBL_MAX;
    102   dblParam_[OsiPrimalObjectiveLimit] = DBL_MAX;
    103   dblParam_[OsiDualTolerance] = 1e-7;
    104   dblParam_[OsiPrimalTolerance] = 1e-7;
    105   dblParam_[OsiObjOffset] = 0.0;
    106 
    107   strParam_[OsiProbName] = "OsiDefaultName";
    108   handler_ = new OsiMessageHandler();
     99  intParam_[ClpMaxNumIteration] = 9999999;
     100  intParam_[ClpMaxNumIterationHotStart] = 9999999;
     101
     102  dblParam_[ClpDualObjectiveLimit] = DBL_MAX;
     103  dblParam_[ClpPrimalObjectiveLimit] = DBL_MAX;
     104  dblParam_[ClpDualTolerance] = 1e-7;
     105  dblParam_[ClpPrimalTolerance] = 1e-7;
     106  dblParam_[ClpObjOffset] = 0.0;
     107
     108  strParam_[ClpProbName] = "ClpDefaultName";
     109  handler_ = new CoinMessageHandler();
    109110  handler_->setLogLevel(2);
    110111  messages_ = ClpMessage();
     
    156157{
    157158  if (value>0.0&&value<1.0e10)
    158     dblParam_[OsiPrimalTolerance]=value;
     159    dblParam_[ClpPrimalTolerance]=value;
    159160}
    160161void ClpModel::setDualTolerance( double value)
    161162{
    162163  if (value>0.0&&value<1.0e10)
    163     dblParam_[OsiDualTolerance]=value;
     164    dblParam_[ClpDualTolerance]=value;
    164165}
    165166void ClpModel::setOptimizationDirection( int value)
     
    226227  } else {
    227228    // later may want to keep as unknown class
    228     OsiPackedMatrix matrix2;
     229    CoinPackedMatrix matrix2;
    229230    matrix2.reverseOrderedCopyOf(*matrix.getPackedMatrix());
    230231    matrix.releasePackedMatrix();
     
    233234}
    234235void
    235 ClpModel::loadProblem (  const OsiPackedMatrix& matrix,
     236ClpModel::loadProblem (  const CoinPackedMatrix& matrix,
    236237                     const double* collb, const double* colub,   
    237238                     const double* obj,
     
    244245    matrix_=new ClpPackedMatrix(matrix);
    245246  } else {
    246     OsiPackedMatrix matrix2;
     247    CoinPackedMatrix matrix2;
    247248    matrix2.reverseOrderedCopyOf(matrix);
    248249    matrix_=new ClpPackedMatrix(matrix2);
     
    261262  gutsOfLoadModel(numrows, numcols,
    262263                  collb, colub, obj, rowlb, rowub, rowObjective);
    263   OsiPackedMatrix matrix(true,numrows,numcols,start[numcols],
     264  CoinPackedMatrix matrix(true,numrows,numcols,start[numcols],
    264265                              value,index,start,NULL);
    265266  matrix_ = new ClpPackedMatrix(matrix);
     
    307308  defaultHandler_ = rhs.defaultHandler_;
    308309  if (defaultHandler_)
    309     handler_ = new OsiMessageHandler(*rhs.handler_);
     310    handler_ = new CoinMessageHandler(*rhs.handler_);
    310311   else
    311312    handler_ = rhs.handler_;
    312313  messages_ = rhs.messages_;
    313   intParam_[OsiMaxNumIteration] = rhs.intParam_[OsiMaxNumIteration];
    314   intParam_[OsiMaxNumIterationHotStart] =
    315     rhs.intParam_[OsiMaxNumIterationHotStart];
    316 
    317   dblParam_[OsiDualObjectiveLimit] = rhs.dblParam_[OsiDualObjectiveLimit];
    318   dblParam_[OsiPrimalObjectiveLimit] = rhs.dblParam_[OsiPrimalObjectiveLimit];
    319   dblParam_[OsiDualTolerance] = rhs.dblParam_[OsiDualTolerance];
    320   dblParam_[OsiPrimalTolerance] = rhs.dblParam_[OsiPrimalTolerance];
    321   dblParam_[OsiObjOffset] = rhs.dblParam_[OsiObjOffset];
    322 
    323   strParam_[OsiProbName] = rhs.strParam_[OsiProbName];
     314  intParam_[ClpMaxNumIteration] = rhs.intParam_[ClpMaxNumIteration];
     315  intParam_[ClpMaxNumIterationHotStart] =
     316    rhs.intParam_[ClpMaxNumIterationHotStart];
     317
     318  dblParam_[ClpDualObjectiveLimit] = rhs.dblParam_[ClpDualObjectiveLimit];
     319  dblParam_[ClpPrimalObjectiveLimit] = rhs.dblParam_[ClpPrimalObjectiveLimit];
     320  dblParam_[ClpDualTolerance] = rhs.dblParam_[ClpDualTolerance];
     321  dblParam_[ClpPrimalTolerance] = rhs.dblParam_[ClpPrimalTolerance];
     322  dblParam_[ClpObjOffset] = rhs.dblParam_[ClpObjOffset];
     323
     324  strParam_[ClpProbName] = rhs.strParam_[ClpProbName];
    324325
    325326  objectiveValue_=rhs.objectiveValue_;
     
    442443
    443444bool
    444 ClpModel::setIntParam(OsiIntParam key, int value)
     445ClpModel::setIntParam(ClpIntParam key, int value)
    445446{
    446447  switch (key) {
    447   case OsiMaxNumIteration:
     448  case ClpMaxNumIteration:
    448449    if (value < 0)
    449450      return false;
    450451    break;
    451   case OsiMaxNumIterationHotStart:
     452  case ClpMaxNumIterationHotStart:
    452453    if (value < 0)
    453454      return false;
    454455    break;
    455   case OsiLastIntParam:
     456  case ClpLastIntParam:
    456457    return false;
    457458  }
     
    463464
    464465bool
    465 ClpModel::setDblParam(OsiDblParam key, double value)
     466ClpModel::setDblParam(ClpDblParam key, double value)
    466467{
    467468
    468469  switch (key) {
    469   case OsiDualObjectiveLimit:
     470  case ClpDualObjectiveLimit:
    470471    break;
    471472
    472   case OsiPrimalObjectiveLimit:
     473  case ClpPrimalObjectiveLimit:
    473474    break;
    474475
    475   case OsiDualTolerance:
     476  case ClpDualTolerance:
    476477    if (value<=0.0||value>1.0e10)
    477478      return false;
    478479    break;
    479480   
    480   case OsiPrimalTolerance:
     481  case ClpPrimalTolerance:
    481482    if (value<=0.0||value>1.0e10)
    482483      return false;
    483484    break;
    484485   
    485   case OsiObjOffset:
     486  case ClpObjOffset:
    486487    break;
    487488
    488   case OsiLastDblParam:
     489  case ClpLastDblParam:
    489490    return false;
    490491  }
     
    496497
    497498bool
    498 ClpModel::setStrParam(OsiStrParam key, const std::string & value)
     499ClpModel::setStrParam(ClpStrParam key, const std::string & value)
    499500{
    500501
    501502  switch (key) {
    502   case OsiProbName:
     503  case ClpProbName:
    503504    break;
    504505
    505   case OsiLastStrParam:
     506  case ClpLastStrParam:
    506507    return false;
    507508  }
     
    723724// Pass in Message handler (not deleted at end)
    724725void
    725 ClpModel::passInMessageHandler(OsiMessageHandler * handler)
     726ClpModel::passInMessageHandler(CoinMessageHandler * handler)
    726727{
    727728  defaultHandler_=false;
     
    730731// Set language
    731732void
    732 ClpModel::newLanguage(OsiMessages::Language language)
     733ClpModel::newLanguage(CoinMessages::Language language)
    733734{
    734735  messages_ = ClpMessage(language);
     
    753754    } else {
    754755      handler_->message(CLP_UNABLE_OPEN,messages_)
    755         <<fileName<<OsiMessageEol;
     756        <<fileName<<CoinMessageEol;
    756757      return -1;
    757758    }
    758759  }
    759   OsiMpsReader m;
     760  CoinMpsIO m;
    760761  double time1 = cpuTime(),time2;
    761762  int status=m.readMps(fileName,"");
     
    772773    }
    773774    // set problem name
    774     setStrParam(OsiProbName,m.getProblemName());
     775    setStrParam(ClpProbName,m.getProblemName());
    775776    // do names
    776777    if (keepNames) {
     
    795796      lengthNames_=0;
    796797    }
    797     setDblParam(OsiObjOffset,m.objectiveOffset());
     798    setDblParam(ClpObjOffset,m.objectiveOffset());
    798799    time2 = cpuTime();
    799800    handler_->message(CLP_IMPORT_RESULT,messages_)
    800801      <<fileName
    801       <<time2-time1<<OsiMessageEol;
     802      <<time2-time1<<CoinMessageEol;
    802803  } else {
    803804    // errors
    804805    handler_->message(CLP_IMPORT_ERRORS,messages_)
    805       <<status<<fileName<<OsiMessageEol;
     806      <<status<<fileName<<CoinMessageEol;
    806807  }
    807808
     
    811812{
    812813  double limit = 0.0;
    813   getDblParam(OsiPrimalObjectiveLimit, limit);
     814  getDblParam(ClpPrimalObjectiveLimit, limit);
    814815  if (limit > 1e30) {
    815816    // was not ever set
     
    832833
    833834  double limit = 0.0;
    834   getDblParam(OsiDualObjectiveLimit, limit);
     835  getDblParam(ClpDualObjectiveLimit, limit);
    835836  if (limit > 1e30) {
    836837    // was not ever set
  • branches/devel-1/ClpNonLinearCost.cpp

    r8 r19  
    88#include <iostream>
    99
     10#include "CoinIndexedVector.hpp"
     11
    1012#include "ClpNonLinearCost.hpp"
    1113#include "ClpSimplex.hpp"
    12 #include "OsiIndexedVector.hpp"
    1314
    1415//#############################################################################
     
    447448}
    448449void
    449 ClpNonLinearCost::goBackAll(const OsiIndexedVector * update)
     450ClpNonLinearCost::goBackAll(const CoinIndexedVector * update)
    450451{
    451452  assert (model_!=NULL);
     
    502503   for costs.
    503504   On input array is empty (but indices exist).  On exit just
    504    changed costs will be stored as normal OsiIndexedVector
     505   changed costs will be stored as normal CoinIndexedVector
    505506*/
    506507void
    507 ClpNonLinearCost::checkChanged(int numberInArray, OsiIndexedVector * update)
     508ClpNonLinearCost::checkChanged(int numberInArray, CoinIndexedVector * update)
    508509{
    509510  assert (model_!=NULL);
  • branches/devel-1/ClpPackedMatrix.cpp

    r17 r19  
    66#endif
    77
     8#include <cstdio>
     9
     10#include "CoinIndexedVector.hpp"
     11#include "CoinHelperFunctions.hpp"
     12
    813#include "ClpSimplex.hpp"
    914#include "ClpFactorization.hpp"
    10 #include "OsiIndexedVector.hpp"
    11 #include "CoinHelperFunctions.hpp"
    12 #include <stdio.h>
    1315// at end to get min/max!
    1416#include "ClpPackedMatrix.hpp"
     
    3537: ClpMatrixBase(rhs)
    3638
    37   matrix_ = new OsiPackedMatrix(*(rhs.matrix_));
     39  matrix_ = new CoinPackedMatrix(*(rhs.matrix_));
    3840 
    3941}
     
    4244// assign matrix (for space reasons)
    4345//-------------------------------------------------------------------
    44 ClpPackedMatrix::ClpPackedMatrix (OsiPackedMatrix * rhs)
     46ClpPackedMatrix::ClpPackedMatrix (CoinPackedMatrix * rhs)
    4547: ClpMatrixBase()
    4648
     
    5052}
    5153
    52 ClpPackedMatrix::ClpPackedMatrix (const OsiPackedMatrix & rhs)
     54ClpPackedMatrix::ClpPackedMatrix (const CoinPackedMatrix & rhs)
    5355: ClpMatrixBase()
    5456
    55   matrix_ = new OsiPackedMatrix(rhs);
     57  matrix_ = new CoinPackedMatrix(rhs);
    5658  setType(1);
    5759 
     
    7577    ClpMatrixBase::operator=(rhs);
    7678    delete matrix_;
    77     matrix_ = new OsiPackedMatrix(*(rhs.matrix_));
     79    matrix_ = new CoinPackedMatrix(*(rhs.matrix_));
    7880  }
    7981  return *this;
     
    9294{
    9395  ClpPackedMatrix * copy = new ClpPackedMatrix();
    94   copy->matrix_= new OsiPackedMatrix();
     96  copy->matrix_= new CoinPackedMatrix();
    9597  copy->matrix_->reverseOrderedCopyOf(*matrix_);
    9698  copy->matrix_->removeGaps();
     
    207209void
    208210ClpPackedMatrix::transposeTimes(const ClpSimplex * model, double scalar,
    209                               const OsiIndexedVector * rowArray,
    210                               OsiIndexedVector * y,
    211                               OsiIndexedVector * columnArray) const
     211                              const CoinIndexedVector * rowArray,
     212                              CoinIndexedVector * y,
     213                              CoinIndexedVector * columnArray) const
    212214{
    213215  columnArray->clear();
     
    393395void
    394396ClpPackedMatrix::subsetTransposeTimes(const ClpSimplex * model,
    395                               const OsiIndexedVector * rowArray,
    396                               const OsiIndexedVector * y,
    397                               OsiIndexedVector * columnArray) const
     397                              const CoinIndexedVector * rowArray,
     398                              const CoinIndexedVector * y,
     399                              CoinIndexedVector * columnArray) const
    398400{
    399401  columnArray->clear();
     
    450452/* Returns number of elements in basis
    451453   column is basic if entry >=0 */
    452 OsiBigIndex
     454ClpBigIndex
    453455ClpPackedMatrix::numberInBasis(const int * columnIsBasic) const
    454456{
     
    456458  int numberColumns = getNumCols();
    457459  const int * columnLength = matrix_->getVectorLengths();
    458   OsiBigIndex numberElements=0;
     460  ClpBigIndex numberElements=0;
    459461  for (i=0;i<numberColumns;i++) {
    460462    if (columnIsBasic[i]>=0) {
     
    465467}
    466468// Fills in basis (Returns number of elements and updates numberBasic)
    467 OsiBigIndex
     469ClpBigIndex
    468470ClpPackedMatrix::fillBasis(const ClpSimplex * model,
    469471                                const int * columnIsBasic, int & numberBasic,
     
    478480  int i;
    479481  int numberColumns = getNumCols();
    480   OsiBigIndex numberElements=0;
     482  ClpBigIndex numberElements=0;
    481483  if (!rowScale) {
    482484    // no scaling
     
    576578  model->messageHandler()->message(CLP_PACKEDSCALE_INITIAL,*model->messagesPointer())
    577579    <<smallest<<largest
    578     <<OsiMessageEol;
     580    <<CoinMessageEol;
    579581  if (smallest>=0.5&&largest<=2.0) {
    580582    // don't bother scaling
    581583    model->messageHandler()->message(CLP_PACKEDSCALE_FORGET,*model->messagesPointer())
    582       <<OsiMessageEol;
     584      <<CoinMessageEol;
    583585    delete [] rowScale;
    584586    delete [] usefulRow;
     
    633635        <<overallSmallest
    634636        <<overallLargest
    635         <<OsiMessageEol;
     637        <<CoinMessageEol;
    636638      // skip last column round
    637639      if (numberPass==1)
     
    681683      <<overallSmallest
    682684      <<overallLargest
    683       <<OsiMessageEol;
     685      <<CoinMessageEol;
    684686   
    685687    delete [] usefulRow;
     
    711713  }
    712714}
    713 /* Unpacks a column into an OsiIndexedvector
     715/* Unpacks a column into an CoinIndexedvector
    714716      Note that model is NOT const.  Bounds and objective could
    715717      be modified if doing column generation */
    716718void
    717 ClpPackedMatrix::unpack(ClpSimplex * model,OsiIndexedVector * rowArray,
     719ClpPackedMatrix::unpack(ClpSimplex * model,CoinIndexedVector * rowArray,
    718720                   int iColumn) const
    719721{
     
    739741  }
    740742}
    741 /* Adds multiple of a column into an OsiIndexedvector
     743/* Adds multiple of a column into an CoinIndexedvector
    742744      You can use quickAdd to add to vector */
    743745void
    744 ClpPackedMatrix::add(const ClpSimplex * model,OsiIndexedVector * rowArray,
     746ClpPackedMatrix::add(const ClpSimplex * model,CoinIndexedVector * rowArray,
    745747                   int iColumn, double multiplier) const
    746748{
  • branches/devel-1/ClpPrimalColumnDantzig.cpp

    r15 r19  
    66#endif
    77
     8#include <cstdio>
     9
     10#include "CoinIndexedVector.hpp"
    811
    912#include "ClpSimplex.hpp"
    1013#include "ClpPrimalColumnDantzig.hpp"
    11 #include "OsiIndexedVector.hpp"
    1214#include "ClpFactorization.hpp"
    1315#include "ClpPackedMatrix.hpp"
    14 #include <stdio.h>
     16
    1517//#############################################################################
    1618// Constructors / Destructor / Assignment
     
    5759// Returns pivot column, -1 if none
    5860int
    59 ClpPrimalColumnDantzig::pivotColumn(OsiIndexedVector * updates,
    60                                     OsiIndexedVector * spareRow1,
    61                                     OsiIndexedVector * spareRow2,
    62                                     OsiIndexedVector * spareColumn1,
    63                                     OsiIndexedVector * spareColumn2)
     61ClpPrimalColumnDantzig::pivotColumn(CoinIndexedVector * updates,
     62                                    CoinIndexedVector * spareRow1,
     63                                    CoinIndexedVector * spareRow2,
     64                                    CoinIndexedVector * spareColumn1,
     65                                    CoinIndexedVector * spareColumn2)
    6466{
    6567  assert(model_);
  • branches/devel-1/ClpPrimalColumnPivot.cpp

    r2 r19  
    6262
    6363void
    64 ClpPrimalColumnPivot::updateWeights(OsiIndexedVector * input)
     64ClpPrimalColumnPivot::updateWeights(CoinIndexedVector * input)
    6565{
    6666}
  • branches/devel-1/ClpPrimalColumnSteepest.cpp

    r17 r19  
    99#include "ClpSimplex.hpp"
    1010#include "ClpPrimalColumnSteepest.hpp"
    11 #include "OsiIndexedVector.hpp"
     11#include "CoinIndexedVector.hpp"
    1212#include "ClpFactorization.hpp"
    1313#include "ClpMessage.hpp"
     
    5252  devex_ = rhs.devex_;
    5353  if (rhs.infeasible_) {
    54     infeasible_= new OsiIndexedVector(rhs.infeasible_);
     54    infeasible_= new CoinIndexedVector(rhs.infeasible_);
    5555  } else {
    5656    infeasible_=NULL;
     
    7373  }
    7474  if (rhs.alternateWeights_) {
    75     alternateWeights_= new OsiIndexedVector(rhs.alternateWeights_);
     75    alternateWeights_= new CoinIndexedVector(rhs.alternateWeights_);
    7676  } else {
    7777    alternateWeights_=NULL;
     
    114114    savedWeights_ = NULL;
    115115    if (rhs.infeasible_!=NULL) {
    116       infeasible_= new OsiIndexedVector(rhs.infeasible_);
     116      infeasible_= new CoinIndexedVector(rhs.infeasible_);
    117117    } else {
    118118      infeasible_=NULL;
     
    134134    }
    135135    if (rhs.alternateWeights_!=NULL) {
    136       alternateWeights_= new OsiIndexedVector(rhs.alternateWeights_);
     136      alternateWeights_= new CoinIndexedVector(rhs.alternateWeights_);
    137137    } else {
    138138      alternateWeights_=NULL;
     
    146146// Returns pivot column, -1 if none
    147147int
    148 ClpPrimalColumnSteepest::pivotColumn(OsiIndexedVector * updates,
    149                                     OsiIndexedVector * spareRow1,
    150                                     OsiIndexedVector * spareRow2,
    151                                     OsiIndexedVector * spareColumn1,
    152                                     OsiIndexedVector * spareColumn2)
     148ClpPrimalColumnSteepest::pivotColumn(CoinIndexedVector * updates,
     149                                    CoinIndexedVector * spareRow1,
     150                                    CoinIndexedVector * spareRow2,
     151                                    CoinIndexedVector * spareColumn1,
     152                                    CoinIndexedVector * spareColumn2)
    153153{
    154154  assert(model_);
     
    606606      delete alternateWeights_;
    607607      weights_ = new double[numberRows+numberColumns];
    608       alternateWeights_ = new OsiIndexedVector();
     608      alternateWeights_ = new CoinIndexedVector();
    609609      // enough space so can use it for factorization
    610610      alternateWeights_->reserve(numberRows+
     
    636636    // set up infeasibilities
    637637    if (!infeasible_) {
    638       infeasible_ = new OsiIndexedVector();
     638      infeasible_ = new CoinIndexedVector();
    639639      infeasible_->reserve(numberColumns+numberRows);
    640640    }
     
    738738}
    739739void
    740 ClpPrimalColumnSteepest::updateWeights(OsiIndexedVector * input)
     740ClpPrimalColumnSteepest::updateWeights(CoinIndexedVector * input)
    741741{
    742742  int number=input->getNumElements();
     
    828828                                        *model_->messagesPointer())
    829829                                          <<oldDevex<<devex_
    830                                           <<OsiMessageEol;
     830                                          <<CoinMessageEol;
    831831      initializeWeights();
    832832    }
     
    841841ClpPrimalColumnSteepest::checkAccuracy(int sequence,
    842842                                       double relativeTolerance,
    843                                        OsiIndexedVector * rowArray1,
    844                                        OsiIndexedVector * rowArray2)
     843                                       CoinIndexedVector * rowArray1,
     844                                       CoinIndexedVector * rowArray2)
    845845{
    846846  model_->unpack(rowArray1,sequence);
     
    912912    }
    913913  } else {
    914     OsiIndexedVector * temp = new OsiIndexedVector();
     914    CoinIndexedVector * temp = new CoinIndexedVector();
    915915    temp->reserve(numberRows+
    916916                  model_->factorization()->maximumPivots());
  • branches/devel-1/ClpSimplex.cpp

    r17 r19  
    1515#include "ClpFactorization.hpp"
    1616#include "ClpPackedMatrix.hpp"
    17 #include "OsiIndexedVector.hpp"
    18 #include "OsiWarmStartBasis.hpp"
     17#include "CoinIndexedVector.hpp"
     18#include "CoinWarmStartBasis.hpp"
    1919#include "ClpDualRowDantzig.hpp"
    2020#include "ClpDualRowSteepest.hpp"
     
    197197        <<nonLinearCost_->changeInCost()
    198198        <<nonLinearCost_->numberInfeasibilities()
    199         <<OsiMessageEol;
     199        <<CoinMessageEol;
    200200  }
    201201  if (valuesPass) {
     
    256256      <<largestPrimalError_
    257257      <<largestDualError_
    258       <<OsiMessageEol;
     258      <<CoinMessageEol;
    259259  return 0;
    260260}
     
    265265
    266266  //work space
    267   OsiIndexedVector  * workSpace = rowArray_[0];
     267  CoinIndexedVector  * workSpace = rowArray_[0];
    268268
    269269  double * array = new double [numberRows_];
     
    365365  double slackValue = factorization_->slackValue();
    366366  //work space
    367   OsiIndexedVector  * workSpace = rowArray_[0];
     367  CoinIndexedVector  * workSpace = rowArray_[0];
    368368
    369369  double * array = new double [numberRows_];
     
    838838    handler_->message(CLP_SIMPLEX_BADFACTOR,messages_)
    839839      <<status
    840       <<OsiMessageEol;
     840      <<CoinMessageEol;
    841841    return -1;
    842842  } else if (!solveType) {
     
    874874    <<directionIn_<<theta_
    875875    <<dualOut_<<dualIn_<<alpha_
    876     <<OsiMessageEol;
     876    <<CoinMessageEol;
    877877  if (getStatus(sequenceIn_)==ClpSimplex::isFree) {
    878878    handler_->message(CLP_SIMPLEX_FREEIN,messages_)
    879879      <<sequenceIn_
    880       <<OsiMessageEol;
     880      <<CoinMessageEol;
    881881  }
    882882  // change of incoming
     
    981981  handler_->printing(algorithm_<0)<<theta_<<dualOut_;
    982982  handler_->printing(algorithm_>0)<<dualIn_<<theta_;
    983   handler_->message()<<OsiMessageEol;
     983  handler_->message()<<CoinMessageEol;
    984984
    985985  if (numberIterations_>=maximumIterations_)
     
    12281228    rowArray_[i]=NULL;
    12291229    if (rhs.rowArray_[i])
    1230       rowArray_[i] = new OsiIndexedVector(*rhs.rowArray_[i]);
     1230      rowArray_[i] = new CoinIndexedVector(*rhs.rowArray_[i]);
    12311231    columnArray_[i]=NULL;
    12321232    if (rhs.columnArray_[i])
    1233       columnArray_[i] = new OsiIndexedVector(*rhs.columnArray_[i]);
     1233      columnArray_[i] = new CoinIndexedVector(*rhs.columnArray_[i]);
    12341234  }
    12351235  if (rhs.status_) {
     
    15541554*/
    15551555void
    1556 ClpSimplex::unpack(OsiIndexedVector * rowArray)
     1556ClpSimplex::unpack(CoinIndexedVector * rowArray)
    15571557{
    15581558  rowArray->clear();
     
    15661566}
    15671567void
    1568 ClpSimplex::unpack(OsiIndexedVector * rowArray,int sequence)
     1568ClpSimplex::unpack(CoinIndexedVector * rowArray,int sequence)
    15691569{
    15701570  rowArray->clear();
     
    16321632    // clean up any mismatches on infinity
    16331633    for (i=0;i<numberColumns_;i++) {
    1634       if (columnLowerWork_[i]<-1.0e30)
     1634      if (columnLowerWork_[i]<-CLP_INFINITY)
    16351635        columnLowerWork_[i] = -DBL_MAX;
    1636       if (columnUpperWork_[i]>1.0e30)
     1636      if (columnUpperWork_[i]>CLP_INFINITY)
    16371637        columnUpperWork_[i] = DBL_MAX;
    16381638    }
     
    17131713    for (iRow=0;iRow<4;iRow++) {
    17141714      if (!rowArray_[iRow]) {
    1715         rowArray_[iRow]=new OsiIndexedVector();
     1715        rowArray_[iRow]=new CoinIndexedVector();
    17161716        int length =numberRows_+factorization_->maximumPivots();
    17171717        if (iRow==3)
     
    17231723    for (iColumn=0;iColumn<2;iColumn++) {
    17241724      if (!columnArray_[iColumn]) {
    1725         columnArray_[iColumn]=new OsiIndexedVector();
     1725        columnArray_[iColumn]=new CoinIndexedVector();
    17261726        columnArray_[iColumn]->reserve(numberColumns_);
    17271727      }
     
    18211821// Sets up basis
    18221822void
    1823 ClpSimplex::setBasis ( const OsiWarmStartBasis & basis)
     1823ClpSimplex::setBasis ( const CoinWarmStartBasis & basis)
    18241824{
    18251825  // transform basis to status arrays
     
    18281828    /*
    18291829      get status arrays
    1830       OsiWarmStartBasis would seem to have overheads and we will need
     1830      CoinWarmStartBasis would seem to have overheads and we will need
    18311831      extra bits anyway.
    18321832    */
     
    18341834    memset(status_,0,(numberColumns_+numberRows_)*sizeof(char));
    18351835  }
    1836   OsiWarmStartBasis basis2 = basis;
     1836  CoinWarmStartBasis basis2 = basis;
    18371837  // resize if necessary
    18381838  basis2.resize(numberRows_,numberColumns_);
     
    18551855}
    18561856// Warm start
    1857 OsiWarmStartBasis 
     1857CoinWarmStartBasis 
    18581858ClpSimplex::getBasis() const
    18591859{
    18601860  int iRow,iColumn;
    1861   OsiWarmStartBasis basis;
     1861  CoinWarmStartBasis basis;
    18621862  basis.setSize(numberColumns_,numberRows_);
    18631863
     
    18651865    for (iRow=0;iRow<numberRows_;iRow++) {
    18661866      basis.setArtifStatus(iRow,
    1867                            (OsiWarmStartBasis::Status) getRowStatus(iRow));
     1867                           (CoinWarmStartBasis::Status) getRowStatus(iRow));
    18681868    }
    18691869    for (iColumn=0;iColumn<numberColumns_;iColumn++) {
    18701870      basis.setStructStatus(iColumn,
    1871                        (OsiWarmStartBasis::Status) getColumnStatus(iColumn));
     1871                       (CoinWarmStartBasis::Status) getColumnStatus(iColumn));
    18721872    }
    18731873  }
     
    19321932 
    19331933  // Get a row copy in standard format
    1934   OsiPackedMatrix copy;
     1934  CoinPackedMatrix copy;
    19351935  copy.reverseOrderedCopyOf(*matrix());
    19361936  // get matrix data pointers
     
    21202120    handler_->message(CLP_SIMPLEX_BOUNDTIGHTEN,messages_)
    21212121      <<totalTightened
    2122       <<OsiMessageEol;
     2122      <<CoinMessageEol;
    21232123    // Set bounds slightly loose
    21242124    for (iColumn=0;iColumn<numberColumns_;iColumn++) {
     
    21452145    handler_->message(CLP_SIMPLEX_INFEASIBILITIES,messages_)
    21462146      <<numberInfeasible
    2147       <<OsiMessageEol;
     2147      <<CoinMessageEol;
    21482148    // restore column bounds
    21492149    memcpy(columnLower_,saveLower,numberColumns_*sizeof(double));
     
    21972197typedef struct {
    21982198  double optimizationDirection;
    2199   double dblParam[OsiLastDblParam];
     2199  double dblParam[ClpLastDblParam];
    22002200  double objectiveValue;
    22012201  double dualBound;
     
    22072207  int numberRows;
    22082208  int numberColumns;
    2209   int intParam[OsiLastIntParam];
     2209  int intParam[ClpLastIntParam];
    22102210  int numberIterations;
    22112211  int problemStatus;
     
    22522252    // Fill in scalars
    22532253    scalars.optimizationDirection = optimizationDirection_;
    2254     memcpy(scalars.dblParam, dblParam_,OsiLastDblParam * sizeof(double));
     2254    memcpy(scalars.dblParam, dblParam_,ClpLastDblParam * sizeof(double));
    22552255    scalars.objectiveValue = objectiveValue_;
    22562256    scalars.dualBound = dualBound_;
     
    22622262    scalars.numberRows = numberRows_;
    22632263    scalars.numberColumns = numberColumns_;
    2264     memcpy(scalars.intParam, intParam_,OsiLastIntParam * sizeof(double));
     2264    memcpy(scalars.intParam, intParam_,ClpLastIntParam * sizeof(double));
    22652265    scalars.numberIterations = numberIterations_;
    22662266    scalars.problemStatus = problemStatus_;
     
    22852285    // strings
    22862286    int length;
    2287     for (i=0;i<OsiLastStrParam;i++) {
     2287    for (i=0;i<ClpLastStrParam;i++) {
    22882288      length = strParam_[i].size();
    22892289      numberWritten = fwrite(&length,sizeof(int),1,fp);
     
    24452445    // Fill in scalars
    24462446    optimizationDirection_ = scalars.optimizationDirection;
    2447     memcpy(dblParam_, scalars.dblParam, OsiLastDblParam * sizeof(double));
     2447    memcpy(dblParam_, scalars.dblParam, ClpLastDblParam * sizeof(double));
    24482448    objectiveValue_ = scalars.objectiveValue;
    24492449    dualBound_ = scalars.dualBound;
     
    24552455    numberRows_ = scalars.numberRows;
    24562456    numberColumns_ = scalars.numberColumns;
    2457     memcpy(intParam_, scalars.intParam,OsiLastIntParam * sizeof(double));
     2457    memcpy(intParam_, scalars.intParam,ClpLastIntParam * sizeof(double));
    24582458    numberIterations_ = scalars.numberIterations;
    24592459    problemStatus_ = scalars.problemStatus;
     
    24702470    // strings
    24712471    int length;
    2472     for (i=0;i<OsiLastStrParam;i++) {
     2472    for (i=0;i<ClpLastStrParam;i++) {
    24732473      numberRead = fread(&length,sizeof(int),1,fp);
    24742474      if (numberRead!=1)
     
    26082608      return 1;
    26092609    // assign matrix
    2610     OsiPackedMatrix * matrix = new OsiPackedMatrix();
     2610    CoinPackedMatrix * matrix = new CoinPackedMatrix();
    26112611    matrix->assignMatrix(true, numberRows_, numberColumns_,
    26122612                         length, elements, indices, starts, lengths);
  • branches/devel-1/ClpSimplexDual.cpp

    r17 r19  
    9797#include "ClpSimplexDual.hpp"
    9898#include "ClpFactorization.hpp"
    99 #include "OsiPackedMatrix.hpp"
    100 #include "OsiIndexedVector.hpp"
    101 #include "OsiWarmStartBasis.hpp"
     99#include "CoinPackedMatrix.hpp"
     100#include "CoinIndexedVector.hpp"
     101#include "CoinWarmStartBasis.hpp"
    102102#include "ClpDualRowDantzig.hpp"
    103103#include "ClpMessage.hpp"
     
    237237
    238238  algorithm_ = -1;
    239   dualTolerance_=dblParam_[OsiDualTolerance];
    240   primalTolerance_=dblParam_[OsiPrimalTolerance];
     239  dualTolerance_=dblParam_[ClpDualTolerance];
     240  primalTolerance_=dblParam_[ClpPrimalTolerance];
    241241
    242242  // put in standard form (and make row copy)
     
    266266    handler_->message(CLP_SINGULARITIES,messages_)
    267267    <<factorizationStatus
    268     <<OsiMessageEol;
     268    <<CoinMessageEol;
    269269
    270270  // If user asked for perturbation - do it
     
    342342  handler_->message(CLP_SIMPLEX_FINISHED+problemStatus_,messages_)
    343343    <<objectiveValue()
    344     <<OsiMessageEol;
     344    <<CoinMessageEol;
    345345  // Restore any saved stuff
    346346  perturbation_ = savePerturbation;
     
    442442      handler_->message(CLP_SIMPLEX_PIVOTROW,messages_)
    443443        <<pivotRow_
    444         <<OsiMessageEol;
     444        <<CoinMessageEol;
    445445      // check accuracy of weights
    446446      dualRowPivot_->checkAccuracy();
     
    475475            <<btranAlpha
    476476            <<alpha_
    477             <<OsiMessageEol;
     477            <<CoinMessageEol;
    478478          dualRowPivot_->unrollWeights();
    479479          if (factorization_->pivots()) {
     
    492492              handler_->message(CLP_SIMPLEX_FLAG,messages_)
    493493                <<x<<sequenceWithin(sequenceOut_)
    494                 <<OsiMessageEol;
     494                <<CoinMessageEol;
    495495              setFlagged(sequenceOut_);
    496496              lastBadIteration_ = numberIterations_; // say be more cautious
     
    584584            handler_->message(CLP_SIMPLEX_FLAG,messages_)
    585585              <<x<<sequenceWithin(sequenceOut_)
    586               <<OsiMessageEol;
     586              <<CoinMessageEol;
    587587            setFlagged(sequenceOut_);
    588588            lastBadIteration_ = numberIterations_; // say be more cautious
     
    691691   The output vector has movement (row length array) */
    692692int
    693 ClpSimplexDual::updateDualsInDual(OsiIndexedVector * rowArray,
    694                                   OsiIndexedVector * columnArray,
    695                                   OsiIndexedVector * outputArray,
     693ClpSimplexDual::updateDualsInDual(CoinIndexedVector * rowArray,
     694                                  CoinIndexedVector * columnArray,
     695                                  CoinIndexedVector * outputArray,
    696696                                  double theta,
    697697                                  double & objectiveChange)
     
    915915int
    916916ClpSimplexDual::changeBounds(bool initialize,
    917                                  OsiIndexedVector * outputArray,
     917                                 CoinIndexedVector * outputArray,
    918918                                 double & changeCost)
    919919{
     
    10461046*/
    10471047void
    1048 ClpSimplexDual::dualColumn(OsiIndexedVector * rowArray,
    1049                        OsiIndexedVector * columnArray,
    1050                        OsiIndexedVector * spareArray,
    1051                        OsiIndexedVector * spareArray2)
     1048ClpSimplexDual::dualColumn(CoinIndexedVector * rowArray,
     1049                       CoinIndexedVector * columnArray,
     1050                       CoinIndexedVector * spareArray,
     1051                       CoinIndexedVector * spareArray2)
    10521052{
    10531053  double * work;
     
    16331633  }
    16341634  if (thisIncrease) {
    1635     newTolerance = dualTolerance_+1.0e-4*dblParam_[OsiDualTolerance];
     1635    newTolerance = dualTolerance_+1.0e-4*dblParam_[ClpDualTolerance];
    16361636  }
    16371637
     
    16471647   Returns -3 if not, 2 if is unbounded */
    16481648int
    1649 ClpSimplexDual::checkUnbounded(OsiIndexedVector * ray,
    1650                                    OsiIndexedVector * spare,
     1649ClpSimplexDual::checkUnbounded(CoinIndexedVector * ray,
     1650                                   CoinIndexedVector * spare,
    16511651                                   double changeCost)
    16521652{
     
    17921792                       <<numberDualInfeasibilities_-
    17931793    numberDualInfeasibilitiesWithoutFree_;
    1794   handler_->message()<<OsiMessageEol;
     1794  handler_->message()<<CoinMessageEol;
    17951795  while (problemStatus_<=-3) {
    17961796    bool cleanDuals=false;
     
    18051805        handler_->message(CLP_DUAL_BOUNDS,messages_)
    18061806          <<dualBound_
    1807           <<OsiMessageEol;
     1807          <<CoinMessageEol;
    18081808        // save solution in case unbounded
    18091809        CoinDisjointCopyN(columnActivityWork_,numberColumns_,
     
    18271827            if (lastCleaned<numberIterations_) {
    18281828              handler_->message(CLP_SIMPLEX_GIVINGUP,messages_)
    1829                 <<OsiMessageEol;
     1829                <<CoinMessageEol;
    18301830            }
    18311831          }
     
    18621862        handler_->message(CLP_DUAL_CHECKB,messages_)
    18631863          <<dualBound_
    1864           <<OsiMessageEol;
     1864          <<CoinMessageEol;
    18651865        numberChangedBounds=changeBounds(false,NULL,changeCost);
    18661866        if (numberChangedBounds<=0||dualBound_>1.0e20||
     
    18841884        lastCleaned=numberIterations_;
    18851885        handler_->message(CLP_DUAL_ORIGINAL,messages_)
    1886           <<OsiMessageEol;
     1886          <<CoinMessageEol;
    18871887
    18881888        perturbation_=102; // stop any perturbations
     
    19621962*/
    19631963void
    1964 ClpSimplexDual::flipBounds(OsiIndexedVector * rowArray,
    1965                   OsiIndexedVector * columnArray,
     1964ClpSimplexDual::flipBounds(CoinIndexedVector * rowArray,
     1965                  CoinIndexedVector * columnArray,
    19661966                  double change)
    19671967{
     
    21162116  handler_->message(CLP_SIMPLEX_PERTURB,messages_)
    21172117    <<perturbation
    2118     <<OsiMessageEol;
     2118    <<CoinMessageEol;
    21192119  for (iRow=0;iRow<numberRows_;iRow++) {
    21202120    double value = perturbation;
     
    21972197    handler_->message(CLP_SINGULARITIES,messages_)
    21982198      <<factorizationStatus
    2199       <<OsiMessageEol;
     2199      <<CoinMessageEol;
    22002200  if (saveSparse) {
    22012201    // use default at present
     
    24362436{
    24372437  algorithm_ = -1;
    2438   dualTolerance_=dblParam_[OsiDualTolerance];
    2439   primalTolerance_=dblParam_[OsiPrimalTolerance];
     2438  dualTolerance_=dblParam_[ClpDualTolerance];
     2439  primalTolerance_=dblParam_[ClpPrimalTolerance];
    24402440
    24412441  // save dual bound
     
    25092509      if (!alwaysFinish&&returnCode<1) {
    25102510        double limit = 0.0;
    2511         getDblParam(OsiDualObjectiveLimit, limit);
     2511        getDblParam(ClpDualObjectiveLimit, limit);
    25122512        if(objectiveValue()*optimizationDirection_<limit||
    25132513           numberAtFakeBound()) {
  • branches/devel-1/ClpSimplexPrimal.cpp

    r17 r19  
    8888#include "ClpFactorization.hpp"
    8989#include "ClpNonLinearCost.hpp"
    90 #include "OsiPackedMatrix.hpp"
    91 #include "OsiIndexedVector.hpp"
    92 #include "OsiWarmStartBasis.hpp"
     90#include "CoinPackedMatrix.hpp"
     91#include "CoinIndexedVector.hpp"
     92#include "CoinWarmStartBasis.hpp"
    9393#include "ClpPrimalColumnPivot.hpp"
    9494#include "ClpMessage.hpp"
     
    218218
    219219  algorithm_ = +1;
    220   primalTolerance_=dblParam_[OsiPrimalTolerance];
    221   dualTolerance_=dblParam_[OsiDualTolerance];
     220  primalTolerance_=dblParam_[ClpPrimalTolerance];
     221  dualTolerance_=dblParam_[ClpDualTolerance];
    222222
    223223  // put in standard form (and make row copy)
     
    283283    handler_->message(CLP_SINGULARITIES,messages_)
    284284    <<totalNumberThrownOut
    285     <<OsiMessageEol;
     285    <<CoinMessageEol;
    286286
    287287  problemStatus_ = -1;
     
    369369  handler_->message(CLP_SIMPLEX_FINISHED+problemStatus_,messages_)
    370370    <<objectiveValue()
    371     <<OsiMessageEol;
     371    <<CoinMessageEol;
    372372  // Restore any saved stuff
    373373  perturbation_ = savePerturbation;
     
    505505            handler_->message(CLP_SIMPLEX_FLAG,messages_)
    506506              <<x<<sequenceWithin(sequenceIn_)
    507               <<OsiMessageEol;
     507              <<CoinMessageEol;
    508508            setFlagged(sequenceIn_);
    509509            lastBadIteration_ = numberIterations_; // say be more cautious
     
    523523        handler_->message(CLP_PRIMAL_DJ,messages_)
    524524          <<saveDj<<dualIn_
    525           <<OsiMessageEol;
     525          <<CoinMessageEol;
    526526        if(saveNumber != numberIterations_) {
    527527          problemStatus_=-2; // factorize now
     
    538538            handler_->message(CLP_SIMPLEX_FLAG,messages_)
    539539              <<x<<sequenceWithin(sequenceIn_)
    540               <<OsiMessageEol;
     540              <<CoinMessageEol;
    541541            setFlagged(sequenceIn_);
    542542            lastBadIteration_ = numberIterations_; // say be more cautious
     
    570570            handler_->message(CLP_SIMPLEX_FLAG,messages_)
    571571              <<x<<sequenceWithin(sequenceIn_)
    572               <<OsiMessageEol;
     572              <<CoinMessageEol;
    573573            setFlagged(sequenceIn_);
    574574            lastBadIteration_ = numberIterations_; // say be more cautious
     
    720720                       <<numberDualInfeasibilities_-
    721721    numberDualInfeasibilitiesWithoutFree_;
    722   handler_->message()<<OsiMessageEol;
     722  handler_->message()<<CoinMessageEol;
    723723  assert (primalFeasible());
    724724  // we may wish to say it is optimal even if infeasible
     
    764764        handler_->message(CLP_PRIMAL_WEIGHT,messages_)
    765765          <<infeasibilityCost_
    766           <<OsiMessageEol;
     766          <<CoinMessageEol;
    767767        // put back original bounds and then check
    768768        createRim(7);
     
    779779        handler_->message(CLP_PRIMAL_OPTIMAL,messages_)
    780780          <<primalTolerance_
    781           <<OsiMessageEol;
     781          <<CoinMessageEol;
    782782        if (numberTimesOptimal_<4) {
    783783          numberTimesOptimal_++;
     
    789789          lastCleaned=numberIterations_;
    790790          handler_->message(CLP_PRIMAL_ORIGINAL,messages_)
    791             <<OsiMessageEol;
    792           primalTolerance_=dblParam_[OsiPrimalTolerance];
     791            <<CoinMessageEol;
     792          primalTolerance_=dblParam_[ClpPrimalTolerance];
    793793         
    794794          // put back original bounds and then check
     
    801801          if (lastCleaned<numberIterations_) {
    802802            handler_->message(CLP_SIMPLEX_GIVINGUP,messages_)
    803               <<OsiMessageEol;
     803              <<CoinMessageEol;
    804804          }
    805805        }
     
    818818          handler_->message(CLP_PRIMAL_WEIGHT,messages_)
    819819            <<infeasibilityCost_
    820             <<OsiMessageEol;
     820            <<CoinMessageEol;
    821821          // put back original bounds and then check
    822822          createRim(7);
     
    867867*/
    868868void
    869 ClpSimplexPrimal::primalRow(OsiIndexedVector * rowArray,
    870                             OsiIndexedVector * rhsArray,
    871                             OsiIndexedVector * spareArray,
    872                             OsiIndexedVector * spareArray2,
     869ClpSimplexPrimal::primalRow(CoinIndexedVector * rowArray,
     870                            CoinIndexedVector * rhsArray,
     871                            CoinIndexedVector * spareArray,
     872                            CoinIndexedVector * spareArray2,
    873873                            int valuesPass)
    874874{
     
    12741274*/
    12751275void
    1276 ClpSimplexPrimal::primalColumn(OsiIndexedVector * updates,
    1277                                OsiIndexedVector * spareRow1,
    1278                                OsiIndexedVector * spareRow2,
    1279                                OsiIndexedVector * spareColumn1,
    1280                                OsiIndexedVector * spareColumn2)
     1276ClpSimplexPrimal::primalColumn(CoinIndexedVector * updates,
     1277                               CoinIndexedVector * spareRow1,
     1278                               CoinIndexedVector * spareRow2,
     1279                               CoinIndexedVector * spareColumn1,
     1280                               CoinIndexedVector * spareColumn2)
    12811281{
    12821282  sequenceIn_ = primalColumnPivot_->pivotColumn(updates,spareRow1,
     
    13011301*/
    13021302int
    1303 ClpSimplexPrimal::updatePrimalsInPrimal(OsiIndexedVector * rowArray,
     1303ClpSimplexPrimal::updatePrimalsInPrimal(CoinIndexedVector * rowArray,
    13041304                  double theta,
    13051305                  double & objectiveChange)
  • branches/devel-1/Makefile

    r18 r19  
    55# highest level of optimization the compiler supports. If want something in
    66# between then specify the exact level you want, e.g., -O1 or -O2
    7 OptLevel := -O2
    8 #OptLevel := -g
    9 # I seem to need this at present
    10 #OPTFLAG := -O2
    11 #OPTFLAG := -g
     7#OptLevel := -O2
     8OptLevel := -g
     9
    1210ifeq ($(OptLevel),-g)
    1311    CXXFLAGS += -DCLP_DEBUG
     
    3836##############################################################################
    3937# The location of the customized Makefiles
    40 export MakefileDir := ../Common/make
     38export CoinDir = $(shell cd ..; pwd)
     39export MakefileDir := $(CoinDir)/Makefiles
    4140include ${MakefileDir}/Makefile.coin
    4241include ${MakefileDir}/Makefile.location
    43 # This modification seems to be needed
    44 export ExtraIncDir := ../Osi/include
    45 export ExtraLibDir :=
    46 export ExtraLibName :=
    47 export ExtraDefine :=
     42
     43export ExtraIncDir  := ${CoinIncDir} ${zlibIncDir} ${bzlibIncDir}
     44export ExtraLibDir  := ${CoinLibDir} ${zlibLibDir} ${bzlibLibDir}
     45export ExtraLibName := ${CoinLibName} ${zlibLibName} ${bzlibLibName}
     46export ExtraDefine  := ${CoinDefine} ${zlibDefine} ${bzlibDefine}
    4847
    4948export LibType OptLevel LIBNAME LIBSRC
     
    5554.PHONY: default install libClp library clean doc
    5655
     56default: install
     57
    5758unitTest : install
    5859        (cd Test && ${MAKE} unitTest)
    5960
    60 default: install
    61 
    62 install clean doc library: % :
     61install clean doc: % :
    6362        $(MAKE) -f ${MakefileDir}/Makefile.lib $*
    6463
    6564libClp:
     65        (cd $(CoinDir)/Coin && $(MAKE))
    6666        $(MAKE) -f ${MakefileDir}/Makefile.lib library
  • branches/devel-1/Test/ClpMain.cpp

    r18 r19  
    77
    88#include <cassert>
     9#include <cstdio>
     10#include <cmath>
     11#include <cfloat>
     12#include <string>
     13#include <iostream>
     14
     15#include <time.h>
     16#include <sys/times.h>
     17#include <sys/resource.h>
     18#include <unistd.h>
     19
    920#define CLPVERSION "0.92"
    1021
     22//#include "CoinPackedMatrix.hpp"
     23//#include "CoinPackedVector.hpp"
     24#include "CoinWarmStartBasis.hpp"
     25#include "CoinMpsIO.hpp"
     26
    1127#include "ClpFactorization.hpp"
    12 #include "OsiMpsReader.hpp"
    1328#include "ClpSimplex.hpp"
    1429#include "ClpDualRowSteepest.hpp"
     
    1631#include "ClpPrimalColumnSteepest.hpp"
    1732#include "ClpPrimalColumnDantzig.hpp"
    18 #include "OsiPackedMatrix.hpp"
    19 #include "OsiPackedVector.hpp"
    20 #include "OsiWarmStartBasis.hpp"
    2133// For Branch and bound
    22 #include "OsiClpSolverInterface.hpp"
    23 #include "OsiCuts.hpp"
    24 #include "OsiRowCut.hpp"
    25 #include "OsiColCut.hpp"
    26 #include "OsiOsiMessage.hpp"
    27 
    28 #include <stdio.h>
    29 
    30 #include <cmath>
    31 #include <cfloat>
    32 
    33 #include <string>
    34 #include <iostream>
    35 #include  <time.h>
    36 #include <sys/times.h>
    37 #include <sys/resource.h>
    38 #include <unistd.h>
     34//  #include "OsiClpSolverInterface.hpp"
     35//  #include "OsiCuts.hpp"
     36//  #include "OsiRowCut.hpp"
     37//  #include "OsiColCut.hpp"
     38
    3939#ifdef DMALLOC
    4040#include "dmalloc.h"
     
    11571157                if (!status||(status>0&&allowImportErrors)) {
    11581158                  // I don't think there is any need for this but ..
    1159                   OsiWarmStartBasis allSlack;
     1159                  CoinWarmStartBasis allSlack;
    11601160                  goodModels[iModel]=true;
    11611161                  models[iModel].setBasis(allSlack);
     
    11901190              }
    11911191              if (canOpen) {
    1192                 // get OsiClp stuff
    1193                 OsiClpSolverInterface m(models+iModel);
    11941192                // Convert names
    11951193                int iRow;
     
    12091207                    strdup(models[iModel].columnName(iColumn).c_str());
    12101208                }
    1211                 m.writeMps(fileName.c_str(),
    1212                            (const char **) rowNames,
    1213                            (const char **) columnNames);
     1209
     1210                ClpSimplex& m = models[iModel];
     1211                CoinMpsIO writer;
     1212                writer.setMpsData(*m.matrix(), CLP_INFINITY,
     1213                                  m.getColLower(), m.getColUpper(),
     1214                                  m.getObjCoefficients(),
     1215                                  (const char*) 0 /*integrality*/,
     1216                                  m.getRowLower(), m.getRowUpper(),
     1217                                  columnNames, rowNames);
     1218                writer.writeMps(fileName.c_str());
    12141219                for (iRow=0;iRow<numberRows;iRow++) {
    12151220                  free(rowNames[iRow]);
     
    12201225                }
    12211226                delete [] columnNames;
    1222                 m.releaseClp();
    12231227                time2 = cpuTime();
    12241228                totalTime += time2-time1;
  • branches/devel-1/Test/Makefile

    r18 r19  
    88##############################################################################
    99# The location of the customized Makefiles
    10 export MakefileDir := $(CoinDir)/Common/make
     10# also inherited from the parent Makefile
     11export CoinDir = $(shell cd ../..; pwd)
     12export MakefileDir := $(CoinDir)/Makefiles
    1113include ${MakefileDir}/Makefile.coin
    1214include ${MakefileDir}/Makefile.location
    1315
    14 IncDir :=
    15 IncDir += ${OsiSolverIncDir}
    16 IncDir += ${OsiIncDir}
    17 IncDir += ${ClpIncDir}
    18 IncDir += ${zlibIncDir}
    19 IncDir += ${bzlibIncDir}
    20 
    21 LibDir :=
    22 LibDir += ${OsiLibDir}
    23 LibDir += ${ClpLibDir}
    24 LibDir += ${zlibLibDir}
    25 LibDir += ${bzlibLibDir}
    26 
    27 LibName :=
    28 LibName += ${OsiLibName}
    29 LibName += ${ClpLibName}
    30 LibName += ${zlibLibName}
    31 LibName += ${bzlibLibName}
    32 
    33 Define :=
    34 Define += ${ClpDefine}
    35 Define += ${OsiDefine}
    36 Define += ${zlibDefine}
    37 Define += ${bzlibDefine}
     16IncDir := ${ClpIncDir} ${CoinIncDir} ${bzlibIncDir} ${zlibIncDir}
     17LibDir := ${ClpLibDir} ${CoinLibDir} ${bzlibLibDir} ${zlibLibDir}
     18LibName := ${ClpLibName} ${CoinLibName} ${bzlibLibName} ${zlibLibName}
     19Define := ${ClpDefine} ${CoinDefine} ${bzlibDefine} ${zlibDefine}
    3820
    3921##############################################################################
     
    4527    CXXFLAGS += -DOSI_DEBUG
    4628endif
     29
     30TESTSRC := ClpMain.cpp
     31TESTSRC += unitTest.cpp
    4732
    4833###############################################################################
     
    6348LIBDIRS := ${LibDir}
    6449LIBS    := ${LibName}
    65 LIBS    += libOsiClp
    6650
    6751LDFLAGS := $(addprefix -L,$(LIBDIRS))
     
    7660###############################################################################
    7761
    78 TESTSRC := ClpMain.cpp
    79 TESTSRC += unitTest.cpp
    8062TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.cpp=.o))
    8163TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.cpp=.d))
  • branches/devel-1/Test/unitTest.cpp

    r2 r19  
    77
    88#include <cassert>
     9#include <cstdio>
     10#include <cmath>
     11#include <cfloat>
     12#include <string>
     13#include <iostream>
     14
     15#include <time.h>
     16#include <sys/times.h>
     17#include <sys/resource.h>
     18#include <unistd.h>
     19
     20#include "CoinMpsIO.hpp"
     21#include "CoinPackedMatrix.hpp"
     22#include "CoinPackedVector.hpp"
     23#include "CoinWarmStartBasis.hpp"
    924
    1025#include "ClpFactorization.hpp"
    11 #include "OsiMpsReader.hpp"
    1226#include "ClpSimplex.hpp"
    1327#include "ClpDualRowSteepest.hpp"
     
    1529#include "ClpPrimalColumnSteepest.hpp"
    1630#include "ClpPrimalColumnDantzig.hpp"
    17 #include "OsiPackedMatrix.hpp"
    18 #include "OsiPackedVector.hpp"
    19 #include "OsiWarmStartBasis.hpp"
    20 #include <stdio.h>
    21 
    22 #include <cmath>
    23 #include <cfloat>
    24 
    25 #include <string>
    26 #include <iostream>
    27 #include  <time.h>
    28 #include <sys/times.h>
    29 #include <sys/resource.h>
    30 #include <unistd.h>
     31#include "ClpParameters.hpp"
    3132
    3233//#############################################################################
     
    243244      // Read data mps file,
    244245      std::string fn = netlibDir+mpsName[m];
    245       OsiMpsReader mps;
     246      CoinMpsIO mps;
    246247      mps.readMps(fn.c_str(),"mps");
    247248      ClpSimplex solution=empty;
     
    264265        solution.setDualRowPivotAlgorithm(steep);
    265266#endif
    266         solution.setDblParam(OsiObjOffset,mps.objectiveOffset());
     267        solution.setDblParam(ClpObjOffset,mps.objectiveOffset());
    267268        solution.dual();
    268269      } else {
     
    279280        solution.setInfeasibilityCost(1.0e6);
    280281#endif
    281         solution.setDblParam(OsiObjOffset,mps.objectiveOffset());
     282        solution.setDblParam(ClpObjOffset,mps.objectiveOffset());
    282283        solution.primal();
    283284      }
     
    285286      {
    286287        double soln = solution.objectiveValue();
    287         OsiRelFltEq eq(objValueTol[m]);
     288        CoinRelFltEq eq(objValueTol[m]);
    288289        std::cerr <<soln <<",  " <<objValue[m] <<" diff "<<
    289290          soln-objValue[m]<<std::endl;
     
    319320{
    320321 
    321   OsiRelFltEq eq(0.000001);
     322  CoinRelFltEq eq(0.000001);
    322323
    323324  {
     
    330331    int rows[11]={0,2,-1,-1,0,1,2,0,1,2};
    331332    double elements[11]={7.0,2.0,1.0e10,1.0e10,-2.0,1.0,-2.0,1,1,1};
    332     OsiPackedMatrix matrix(true,3,5,8,elements,rows,start,length);
     333    CoinPackedMatrix matrix(true,3,5,8,elements,rows,start,length);
    333334   
    334335    // rim data
     
    343344    int colBasis1[5]={1,1,-1,-1,1};
    344345    int i;
    345     OsiWarmStartBasis warm;
     346    CoinWarmStartBasis warm;
    346347    warm.setSize(5,3);
    347348    for (i=0;i<3;i++) {
    348349      if (rowBasis1[i]<0) {
    349         warm.setArtifStatus(i,OsiWarmStartBasis::atLowerBound);
     350        warm.setArtifStatus(i,CoinWarmStartBasis::atLowerBound);
    350351      } else {
    351         warm.setArtifStatus(i,OsiWarmStartBasis::basic);
     352        warm.setArtifStatus(i,CoinWarmStartBasis::basic);
    352353      }
    353354    }
    354355    for (i=0;i<5;i++) {
    355356      if (colBasis1[i]<0) {
    356         warm.setStructStatus(i,OsiWarmStartBasis::atLowerBound);
     357        warm.setStructStatus(i,CoinWarmStartBasis::atLowerBound);
    357358      } else {
    358         warm.setStructStatus(i,OsiWarmStartBasis::basic);
     359        warm.setStructStatus(i,CoinWarmStartBasis::basic);
    359360      }
    360361    }
     
    401402  }
    402403  {   
    403     OsiMpsReader m;
     404    CoinMpsIO m;
    404405    std::string fn = mpsDir+"exmip1";
    405406    m.readMps(fn.c_str(),"mps");
     
    412413  // test steepest edge
    413414  {   
    414     OsiMpsReader m;
     415    CoinMpsIO m;
    415416    std::string fn = netlibDir+"finnis";
    416417    m.readMps(fn.c_str(),"mps");
     
    430431    ClpDualRowSteepest steep;
    431432    solution.setDualRowPivotAlgorithm(steep);
    432     solution.setDblParam(OsiObjOffset,m.objectiveOffset());
     433    solution.setDblParam(ClpObjOffset,m.objectiveOffset());
    433434    solution.dual();
    434435  }
    435436  // test normal solution
    436437  {   
    437     OsiMpsReader m;
     438    CoinMpsIO m;
    438439    std::string fn = netlibDir+"afiro";
    439440    m.readMps(fn.c_str(),"mps");
     
    461462      int numberColumns = solution.numberColumns();
    462463      int numberRows = solution.numberRows();
    463       OsiPackedVector colsol(numberColumns,solution.primalColumnSolution());
     464      CoinPackedVector colsol(numberColumns,solution.primalColumnSolution());
    464465      double * objective = solution.objective();
    465466      double objValue = colsol.dotProduct(objective);
    466       OsiRelFltEq eq(1.0e-8);
     467      CoinRelFltEq eq(1.0e-8);
    467468      assert(eq(objValue,-4.6475314286e+02));
    468469      double * lower = solution.columnLower();
     
    501502      CoinDisjointCopyN(solution.dualRowSolution(),numberRows,rowObjective);
    502503      CoinDisjointCopyN(solution.dualColumnSolution(),numberColumns,objective);
    503       OsiWarmStartBasis basis;
     504      CoinWarmStartBasis basis;
    504505      solution.setBasis(basis);
    505506      solution.dual();
     
    511512  // test unbounded
    512513  {   
    513     OsiMpsReader m;
     514    CoinMpsIO m;
    514515    std::string fn = netlibDir+"brandy";
    515516    m.readMps(fn.c_str(),"mps");
     
    583584  // test infeasible
    584585  {   
    585     OsiMpsReader m;
     586    CoinMpsIO m;
    586587    std::string fn = netlibDir+"brandy";
    587588    m.readMps(fn.c_str(),"mps");
  • branches/devel-1/include/ClpDualRowDantzig.hpp

    r2 r19  
    2828      Computes change in objective function
    2929  */
    30   virtual void updatePrimalSolution(OsiIndexedVector * input,
     30  virtual void updatePrimalSolution(CoinIndexedVector * input,
    3131                                    double theta,
    3232                                    double & changeInObjective);
  • branches/devel-1/include/ClpDualRowPivot.hpp

    r17 r19  
    55
    66class ClpSimplex;
    7 class OsiIndexedVector;
     7class CoinIndexedVector;
    88
    99//#############################################################################
     
    2828 
    2929  /// Updates weights (may be empty)
    30   virtual void updateWeights(OsiIndexedVector * input,
    31                              OsiIndexedVector * spare,
    32                              OsiIndexedVector * updatedColumn);
     30  virtual void updateWeights(CoinIndexedVector * input,
     31                             CoinIndexedVector * spare,
     32                             CoinIndexedVector * updatedColumn);
    3333 
    3434  /** Updates primal solution (and maybe list of candidates)
     
    3838      means everything is always in sync
    3939  */
    40   virtual void updatePrimalSolution(OsiIndexedVector * input,
     40   /* FIXME: this was pure virtul (=0). Why? */
     41  virtual void updatePrimalSolution(CoinIndexedVector * input,
    4142                                    double theta,
    42                                     double & changeInObjective) =0;
     43                                    double & changeInObjective) = 0;
    4344  /** Saves any weights round factorization as pivot rows may change
    4445      Will be empty unless steepest edge (will save model)
  • branches/devel-1/include/ClpDualRowSteepest.hpp

    r17 r19  
    1414*/
    1515
    16 class OsiIndexedVector;
     16class CoinIndexedVector;
    1717
    1818class ClpDualRowSteepest : public ClpDualRowPivot {
     
    2727 
    2828  /// Updates weights (may be empty)
    29   virtual void updateWeights(OsiIndexedVector * input,
    30                              OsiIndexedVector * spare,
    31                              OsiIndexedVector * updatedColumn);
     29  virtual void updateWeights(CoinIndexedVector * input,
     30                             CoinIndexedVector * spare,
     31                             CoinIndexedVector * updatedColumn);
    3232 
    3333  /** Updates primal solution (and maybe list of candidates)
     
    3535      Computes change in objective function
    3636  */
    37   virtual void updatePrimalSolution(OsiIndexedVector * input,
     37  virtual void updatePrimalSolution(CoinIndexedVector * input,
    3838                                    double theta,
    3939                                    double & changeInObjective);
     
    9797  double * weights_;
    9898  /// square of infeasibility array (just for infeasible rows)
    99   OsiIndexedVector * infeasible_;
     99  CoinIndexedVector * infeasible_;
    100100  /// alternate weight array (so we can unroll)
    101   OsiIndexedVector * alternateWeights_;
     101  CoinIndexedVector * alternateWeights_;
    102102  /// save weight array (so we can use checkpoint)
    103   OsiIndexedVector * savedWeights_;
     103  CoinIndexedVector * savedWeights_;
    104104  //@}
    105105};
  • branches/devel-1/include/ClpFactorization.hpp

    r2 r19  
    99#endif
    1010
    11 #include "OsiFactorization.hpp"
     11#include "CoinFactorization.hpp"
    1212
    13 /** This just implements OsiFactorization when an ClpMatrixBase object
     13/** This just implements CoinFactorization when an ClpMatrixBase object
    1414    is passed.  It has no data.
    1515*/
     
    1717class ClpSimplex;
    1818
    19 class ClpFactorization : public OsiFactorization {
     19class ClpFactorization : public CoinFactorization {
    2020 
    2121public:
     
    5151   /** The copy constructor. */
    5252   ClpFactorization(const ClpFactorization&);
    53    /** The copy constructor from an OsiFactorization. */
    54    ClpFactorization(const OsiFactorization&);
     53   /** The copy constructor from an CoinFactorization. */
     54   ClpFactorization(const CoinFactorization&);
    5555
    5656   ClpFactorization& operator=(const ClpFactorization&);
  • branches/devel-1/include/ClpMatrixBase.hpp

    r2 r19  
    1111using std::max;
    1212
    13 #include "OsiPackedMatrix.hpp"
    14 class OsiIndexedVector;
     13#include "CoinPackedMatrix.hpp"
     14class CoinIndexedVector;
    1515class ClpSimplex;
    16 typedef int OsiBigIndex; // synchronize with OsiFactorization.hpp
     16typedef int ClpBigIndex;
    1717
    1818/** Abstract base class for Clp Matrices
     
    3434   /**@name Virtual methods that the derived classes must provide */
    3535   //@{
    36    /// Return a complete OsiPackedMatrix
    37    virtual OsiPackedMatrix * getPackedMatrix() const = 0;
     36   /// Return a complete CoinPackedMatrix
     37   virtual CoinPackedMatrix * getPackedMatrix() const = 0;
    3838    /** Whether the packed matrix is column major ordered or not. */
    3939  virtual bool isColOrdered() const = 0;
     
    7171  /** Returns number of elements in basis
    7272      column is basic if entry >=0 */
    73   virtual OsiBigIndex numberInBasis(const int * columnIsBasic) const = 0;
     73  virtual ClpBigIndex numberInBasis(const int * columnIsBasic) const = 0;
    7474  /// Fills in basis (Returns number of elements and updates numberBasic)
    75   virtual OsiBigIndex fillBasis(const ClpSimplex * model,
     75  virtual ClpBigIndex fillBasis(const ClpSimplex * model,
    7676                                const int * columnIsBasic, int & numberBasic,
    7777                                int * row, int * column,
     
    8383  { return 1;};
    8484
    85   /** Unpacks a column into an OsiIndexedvector
     85  /** Unpacks a column into an CoinIndexedvector
    8686      Note that model is NOT const.  Bounds and objective could
    8787      be modified if doing column generation (just for this variable) */
    88   virtual void unpack(ClpSimplex * model,OsiIndexedVector * rowArray,
     88  virtual void unpack(ClpSimplex * model,CoinIndexedVector * rowArray,
    8989                   int column) const =0;
    9090  /** Purely for column generation and similar ideas.  Allows
     
    9595    { return 0;};
    9696
    97   /** Adds multiple of a column into an OsiIndexedvector
     97  /** Adds multiple of a column into an CoinIndexedvector
    9898      You can use quickAdd to add to vector */
    99   virtual void add(const ClpSimplex * model,OsiIndexedVector * rowArray,
     99  virtual void add(const ClpSimplex * model,CoinIndexedVector * rowArray,
    100100                   int column, double multiplier) const =0;
    101    /// Allow any parts of a created OsiPackedMatrix to be deleted
     101   /// Allow any parts of a created CoinPackedMatrix to be deleted
    102102   virtual void releasePackedMatrix() const {};
    103103   //@}
     
    132132        Squashes small elements and knows about ClpSimplex */
    133133  virtual void transposeTimes(const ClpSimplex * model, double scalar,
    134                               const OsiIndexedVector * x,
    135                               OsiIndexedVector * y,
    136                               OsiIndexedVector * z) const = 0;
     134                              const CoinIndexedVector * x,
     135                              CoinIndexedVector * y,
     136                              CoinIndexedVector * z) const = 0;
    137137    /** Return <code>x *A in <code>z</code> but
    138138        just for indices in y.
     
    140140        Squashes small elements and knows about ClpSimplex */
    141141  virtual void subsetTransposeTimes(const ClpSimplex * model,
    142                               const OsiIndexedVector * x,
    143                               const OsiIndexedVector * y,
    144                               OsiIndexedVector * z) const = 0;
     142                              const CoinIndexedVector * x,
     143                              const CoinIndexedVector * y,
     144                              CoinIndexedVector * z) const = 0;
    145145  //@}
    146146  //@{
  • branches/devel-1/include/ClpMessage.hpp

    r15 r19  
    1212 */
    1313
    14 #include "OsiMessageHandler.hpp"
     14#include "CoinMessageHandler.hpp"
    1515enum CLP_Message
    1616{
     
    5353};
    5454
    55 class ClpMessage : public OsiMessages {
     55class ClpMessage : public CoinMessages {
    5656
    5757public:
  • branches/devel-1/include/ClpModel.hpp

    r18 r19  
    99#include <vector>
    1010#include <string>
    11 // This is only in to use OsiDblParam etc
    12 #include "OsiSolverInterface.hpp"
     11
    1312#include "ClpMatrixBase.hpp"
    14 #include "OsiMessageHandler.hpp"
    15 
     13#include "CoinMessageHandler.hpp"
     14#include "ClpParameters.hpp"
     15
     16#define CLP_INFINITY 1e30
    1617
    1718/** This is the base class for Linear Models
     
    3435   */
    3536  //@{
    36   /// Default constructor
     37    /// Default constructor
    3738    ClpModel (  );
    3839
    39   /// Copy constructor.
    40   ClpModel(const ClpModel &);
    41   /// Assignment operator. This copies the data
     40    /// Copy constructor.
     41    ClpModel(const ClpModel &);
     42    /// Assignment operator. This copies the data
    4243    ClpModel & operator=(const ClpModel & rhs);
    43   /// Destructor
    44    ~ClpModel (  );
     44    /// Destructor
     45    ~ClpModel (  );
    4546  //@}
    4647
     
    6364                     const double* rowlb, const double* rowub,
    6465                      const double * rowObjective=NULL);
    65   void loadProblem (  const OsiPackedMatrix& matrix,
     66  void loadProblem (  const CoinPackedMatrix& matrix,
    6667                     const double* collb, const double* colub,   
    6768                     const double* obj,
     
    100101  /**@name gets and sets */
    101102  //@{
    102   /// Number of rows
    103   inline int numberRows() const
    104     { return numberRows_;};
    105   inline int getNumRows() const
    106     { return numberRows_;};
    107   /// Number of columns
    108   inline int getNumCols() const
    109     { return numberColumns_;};
    110   inline int numberColumns() const
    111     { return numberColumns_;};
    112   /// Primal tolerance to use
    113   inline double primalTolerance() const
    114           { return dblParam_[OsiPrimalTolerance];} ;
    115   void setPrimalTolerance( double value) ;
    116   /// Dual tolerance to use
    117   inline double dualTolerance() const
    118           { return dblParam_[OsiDualTolerance];} ;
    119   void setDualTolerance( double value) ;
    120   /// Number of iterations
    121   inline int numberIterations() const
    122     { return numberIterations_;};
    123   inline int getIterationCount() const
    124     { return numberIterations_;};
    125   /// Maximum number of iterations
    126   inline int maximumIterations() const
    127     { return maximumIterations_;};
    128   void setMaximumIterations(int value);
    129   /** Status of problem:
    130       0 - optimal
    131       1 - primal infeasible
    132       2 - dual infeasible
    133       3 - stopped on iterations etc
    134       4 - stopped due to errors
    135   */
    136   inline int status() const
    137   { return problemStatus_;};
    138   /// Are there a numerical difficulties?
    139   bool isAbandoned() const
    140   { return problemStatus_==4;};
    141   /// Is optimality proven?
    142   bool isProvenOptimal() const
    143   { return problemStatus_==0;};
    144   /// Is primal infeasiblity proven?
    145   bool isProvenPrimalInfeasible() const
    146   { return problemStatus_==1;};
    147   /// Is dual infeasiblity proven?
    148   bool isProvenDualInfeasible() const
    149   { return problemStatus_==2;};
    150   /// Is the given primal objective limit reached?
    151   bool isPrimalObjectiveLimitReached() const ;
    152   /// Is the given dual objective limit reached?
    153   bool isDualObjectiveLimitReached() const ;
    154   /// Iteration limit reached?
    155   bool isIterationLimitReached() const
    156   { return problemStatus_==3;};
    157   /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
    158   inline int optimizationDirection() const
    159           { return (int) optimizationDirection_;};
    160   inline double getObjSense() const
    161           { return optimizationDirection_;};
    162   void setOptimizationDirection(int value);
    163   /// Primal row solution
    164   inline double * primalRowSolution() const
    165           { return rowActivity_;} ;
    166   inline const double * getRowActivity() const
    167           { return rowActivity_;} ;
    168   /// Primal column solution
    169   inline double * primalColumnSolution() const
    170           { return columnActivity_;} ;
    171   inline const double * getColSolution() const
    172           { return columnActivity_;} ;
    173   /// Dual row solution
    174   inline double * dualRowSolution() const
    175           { return dual_;} ;
    176   inline const double * getRowPrice() const
    177           { return dual_;} ;
    178   /// Reduced costs
    179   inline double * dualColumnSolution() const
    180           { return reducedCost_;} ;
    181   inline const double * getReducedCost() const
    182           { return reducedCost_;} ;
    183   /// Row lower
    184   inline double* rowLower() const
    185           { return rowLower_;};
    186   inline const double* getRowLower() const
    187           { return rowLower_;};
    188   /// Row upper
    189   inline double* rowUpper() const
    190           { return rowUpper_;};
    191   inline const double* getRowUpper() const
    192           { return rowUpper_;};
    193   /// Objective
    194   inline double * objective() const
    195           { return objective_;};
    196   inline const double * getObjCoefficients() const
    197           { return objective_;};
    198   /// Row Objective
    199   inline double * rowObjective() const
    200           { return rowObjective_;};
    201   inline const double * getRowObjCoefficients() const
    202           { return rowObjective_;};
    203   /// Column Lower
    204   inline double * columnLower() const
    205           { return columnLower_;};
    206   inline const double * getColLower() const
    207           { return columnLower_;};
    208   /// Column Upper
    209   inline double * columnUpper() const
    210           { return columnUpper_;};
    211   inline const double * getColUpper() const
    212           { return columnUpper_;};
    213   /// Matrix (if not ClpPackedmatrix be careful about memory leak
    214   inline OsiPackedMatrix * matrix() const
    215           { return matrix_->getPackedMatrix();};
    216   /// Row Matrix
    217   inline ClpMatrixBase * rowCopy() const
    218           { return rowCopy_;};
    219   /// Clp Matrix
    220   inline ClpMatrixBase * clpMatrix() const
    221           { return matrix_;};
    222   /// Objective value
    223   inline double objectiveValue() const
    224   { return objectiveValue_*optimizationDirection_ - dblParam_[OsiObjOffset];};
    225   inline double getObjValue() const
    226   { return objectiveValue_*optimizationDirection_ - dblParam_[OsiObjOffset];};
    227   /// Integer information
    228   inline char * integerInformation() const
    229   {return integerType_;};
    230   /** Infeasibility/unbounded ray (NULL returned if none/wrong)
    231       Up to user to use delete [] on these arrays.  */
    232   double * infeasibilityRay() const;
    233   double * unboundedRay() const;
     103   /// Number of rows
     104   inline int numberRows() const {
     105      return numberRows_;
     106   }
     107   inline int getNumRows() const {
     108      return numberRows_;
     109   }
     110   /// Number of columns
     111   inline int getNumCols() const {
     112      return numberColumns_;
     113   }
     114   inline int numberColumns() const {
     115      return numberColumns_;
     116   }
     117   /// Primal tolerance to use
     118   inline double primalTolerance() const {
     119      return dblParam_[ClpPrimalTolerance];
     120   }
     121   void setPrimalTolerance( double value) ;
     122   /// Dual tolerance to use
     123   inline double dualTolerance() const  { return dblParam_[ClpDualTolerance]; }
     124   void setDualTolerance( double value) ;
     125   /// Number of iterations
     126   inline int numberIterations() const  { return numberIterations_; }
     127   inline int getIterationCount() const { return numberIterations_; }
     128   /// Maximum number of iterations
     129   inline int maximumIterations() const { return maximumIterations_; }
     130   void setMaximumIterations(int value);
     131   /** Status of problem:
     132       0 - optimal
     133       1 - primal infeasible
     134       2 - dual infeasible
     135       3 - stopped on iterations etc
     136       4 - stopped due to errors
     137   */
     138   inline int status() const            { return problemStatus_; }
     139   /// Are there a numerical difficulties?
     140   bool isAbandoned() const             { return problemStatus_==4; }
     141   /// Is optimality proven?
     142   bool isProvenOptimal() const         { return problemStatus_==0; }
     143   /// Is primal infeasiblity proven?
     144   bool isProvenPrimalInfeasible() const { return problemStatus_==1; }
     145   /// Is dual infeasiblity proven?
     146   bool isProvenDualInfeasible() const  { return problemStatus_==2; }
     147   /// Is the given primal objective limit reached?
     148   bool isPrimalObjectiveLimitReached() const ;
     149   /// Is the given dual objective limit reached?
     150   bool isDualObjectiveLimitReached() const ;
     151   /// Iteration limit reached?
     152   bool isIterationLimitReached() const { return problemStatus_==3; }
     153   /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
     154   inline int optimizationDirection() const {
     155      return (int) optimizationDirection_;
     156   }
     157   inline double getObjSense() const    { return optimizationDirection_; }
     158   void setOptimizationDirection(int value);
     159   /// Primal row solution
     160   inline double * primalRowSolution() const    { return rowActivity_; }
     161   inline const double * getRowActivity() const { return rowActivity_; }
     162   /// Primal column solution
     163   inline double * primalColumnSolution() const { return columnActivity_; }
     164   inline const double * getColSolution() const { return columnActivity_; }
     165   /// Dual row solution
     166   inline double * dualRowSolution() const      { return dual_; }
     167   inline const double * getRowPrice() const    { return dual_; }
     168   /// Reduced costs
     169   inline double * dualColumnSolution() const   { return reducedCost_; }
     170   inline const double * getReducedCost() const { return reducedCost_; }
     171   /// Row lower
     172   inline double* rowLower() const              { return rowLower_; }
     173   inline const double* getRowLower() const     { return rowLower_; }
     174   /// Row upper
     175   inline double* rowUpper() const              { return rowUpper_; }
     176   inline const double* getRowUpper() const     { return rowUpper_; }
     177   /// Objective
     178   inline double * objective() const            { return objective_; }
     179   inline const double * getObjCoefficients() const { return objective_; }
     180   /// Row Objective
     181   inline double * rowObjective() const         { return rowObjective_; }
     182   inline const double * getRowObjCoefficients() const {
     183      return rowObjective_;
     184   }
     185   /// Column Lower
     186   inline double * columnLower() const          { return columnLower_; }
     187   inline const double * getColLower() const    { return columnLower_; }
     188   /// Column Upper
     189   inline double * columnUpper() const          { return columnUpper_; }
     190   inline const double * getColUpper() const    { return columnUpper_; }
     191   /// Matrix (if not ClpPackedmatrix be careful about memory leak
     192   inline CoinPackedMatrix * matrix() const {
     193      return matrix_->getPackedMatrix();
     194   }
     195   /// Row Matrix
     196   inline ClpMatrixBase * rowCopy() const       { return rowCopy_; }
     197   /// Clp Matrix
     198   inline ClpMatrixBase * clpMatrix() const     { return matrix_; }
     199   /// Objective value
     200   inline double objectiveValue() const {
     201      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
     202   }
     203   inline double getObjValue() const {
     204      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
     205   }
     206   /// Integer information
     207   inline char * integerInformation() const     { return integerType_; }
     208   /** Infeasibility/unbounded ray (NULL returned if none/wrong)
     209       Up to user to use delete [] on these arrays.  */
     210   double * infeasibilityRay() const;
     211   double * unboundedRay() const;
    234212  //@}
    235213  /**@name Message handling */
    236214  //@{
    237   /// Pass in Message handler (not deleted at end)
    238   void passInMessageHandler(OsiMessageHandler * handler);
    239   /// Set language
    240   void newLanguage(OsiMessages::Language language);
    241   void setLanguage(OsiMessages::Language language)
    242   {newLanguage(language);};
    243   /// Return handler
    244   OsiMessageHandler * messageHandler() const
    245   {return handler_;};
    246   /// Return messages
    247   OsiMessages messages() const
    248   {return messages_;};
    249   /// Return pointer to messages
    250   OsiMessages * messagesPointer()
    251   {return & messages_;};
    252   /// Log level
    253   void setLogLevel(int value)
    254   {handler_->setLogLevel(value);};
    255   int logLevel() const
    256   { return handler_->logLevel();};
    257   /// length of names (0 means no names0
    258   inline int lengthNames() const
    259   {return lengthNames_;};
    260   /// Row names
    261   const std::vector<std::string> * rowNames() const
    262   {return &rowNames_;};
    263   const std::string rowName(int iRow) const
    264   {return rowNames_[iRow];};
    265   /// Column names
    266   const std::vector<std::string> * columnNames() const
    267   {return &columnNames_;};
    268   const std::string columnName(int iColumn) const
    269   {return columnNames_[iColumn];};
     215   /// Pass in Message handler (not deleted at end)
     216   void passInMessageHandler(CoinMessageHandler * handler);
     217   /// Set language
     218   void newLanguage(CoinMessages::Language language);
     219   void setLanguage(CoinMessages::Language language) { newLanguage(language); }
     220   /// Return handler
     221   CoinMessageHandler * messageHandler() const       { return handler_; }
     222   /// Return messages
     223   CoinMessages messages() const                     { return messages_; }
     224   /// Return pointer to messages
     225   CoinMessages * messagesPointer()                  { return & messages_; }
     226   /// Log level
     227   void setLogLevel(int value)    { handler_->setLogLevel(value); }
     228   int logLevel() const           { return handler_->logLevel(); }
     229   /// length of names (0 means no names0
     230   inline int lengthNames() const { return lengthNames_; }
     231   /// Row names
     232   const std::vector<std::string> * rowNames() const {
     233      return &rowNames_;
     234   }
     235   const std::string& rowName(int iRow) const {
     236      return rowNames_[iRow];
     237   }
     238   /// Column names
     239   const std::vector<std::string> * columnNames() const {
     240      return &columnNames_;
     241   }
     242   const std::string& columnName(int iColumn) const {
     243      return columnNames_[iColumn];
     244   }
    270245  //@}
    271246
     
    290265  //@{
    291266    /// Set an integer parameter
    292     bool setIntParam(OsiIntParam key, int value) ;
     267    bool setIntParam(ClpIntParam key, int value) ;
    293268    /// Set an double parameter
    294     bool setDblParam(OsiDblParam key, double value) ;
     269    bool setDblParam(ClpDblParam key, double value) ;
    295270    /// Set an string parameter
    296     bool setStrParam(OsiStrParam key, const std::string & value);
     271    bool setStrParam(ClpStrParam key, const std::string & value);
    297272    // Get an integer parameter
    298     inline bool getIntParam(OsiIntParam key, int& value) const {
    299       if (key!=OsiLastIntParam) {
     273    inline bool getIntParam(ClpIntParam key, int& value) const {
     274      if (key!=ClpLastIntParam) {
    300275        value = intParam_[key];
    301276        return true;
     
    305280    }
    306281    // Get an double parameter
    307     inline bool getDblParam(OsiDblParam key, double& value) const {
    308       if (key!=OsiLastDblParam) {
     282    inline bool getDblParam(ClpDblParam key, double& value) const {
     283      if (key!=ClpLastDblParam) {
    309284        value = dblParam_[key];
    310285        return true;
     
    314289    }
    315290    // Get a string parameter
    316     inline bool getStrParam(OsiStrParam key, std::string& value) const {
    317       if (key!=OsiLastStrParam) {
     291    inline bool getStrParam(ClpStrParam key, std::string& value) const {
     292      if (key!=ClpLastStrParam) {
    318293        value = strParam_[key];
    319294        return true;
     
    381356  double * ray_;
    382357  /// Array of integer parameters
    383   int intParam_[OsiLastIntParam];
     358  int intParam_[ClpLastIntParam];
    384359  /// Array of double parameters
    385   double dblParam_[OsiLastDblParam];
     360  double dblParam_[ClpLastDblParam];
    386361  /// Array of string parameters
    387   std::string strParam_[OsiLastStrParam];
     362  std::string strParam_[ClpLastStrParam];
    388363  /// Objective value
    389364  double objectiveValue_;
     
    395370  int maximumIterations_;
    396371  /// Message handler
    397   OsiMessageHandler * handler_;
     372  CoinMessageHandler * handler_;
    398373  /// Flag to say if default handler (so delete)
    399374  bool defaultHandler_;
    400375  /// Messages
    401   OsiMessages messages_;
     376  CoinMessages messages_;
    402377  /// length of names (0 means no names)
    403378  int lengthNames_;
  • branches/devel-1/include/ClpNonLinearCost.hpp

    r8 r19  
    1010
    1111class ClpSimplex;
    12 class OsiIndexedVector;
     12class CoinIndexedVector;
    1313
    1414/** Trivial class to deal with non linear costs
     
    7575      for costs.
    7676      On input array is empty (but indices exist).  On exit just
    77       changed costs will be stored as normal OsiIndexedVector
     77      changed costs will be stored as normal CoinIndexedVector
    7878  */
    79   void checkChanged(int numberInArray, OsiIndexedVector * update);
     79  void checkChanged(int numberInArray, CoinIndexedVector * update);
    8080  /** Goes through one bound for each variable.
    8181      If multiplier*work[iRow]>0 goes down, otherwise up.
     
    9696      At the end of this all temporary offsets are zero
    9797  */
    98   void goBackAll(const OsiIndexedVector * update);
     98  void goBackAll(const CoinIndexedVector * update);
    9999  /** Sets bounds and cost for one variable
    100100      Returns change in cost
  • branches/devel-1/include/ClpPackedMatrix.hpp

    r17 r19  
    2222  /**@name Useful methods */
    2323   //@{
    24    /// Return a complete OsiPackedMatrix
    25   virtual OsiPackedMatrix * getPackedMatrix() const { return matrix_;};
     24   /// Return a complete CoinPackedMatrix
     25  virtual CoinPackedMatrix * getPackedMatrix() const { return matrix_;};
    2626    /** Whether the packed matrix is column major ordered or not. */
    2727    virtual bool isColOrdered() const { return matrix_->isColOrdered(); }
     
    7070  /** Returns number of elements in basis
    7171      column is basic if entry >=0 */
    72   virtual OsiBigIndex numberInBasis(const int * columnIsBasic) const ;
     72  virtual ClpBigIndex numberInBasis(const int * columnIsBasic) const ;
    7373  /// Fills in basis (Returns number of elements and updates numberBasic)
    74   virtual OsiBigIndex fillBasis(const ClpSimplex * model,
     74  virtual ClpBigIndex fillBasis(const ClpSimplex * model,
    7575                                const int * columnIsBasic, int & numberBasic,
    7676                                int * row, int * column,
     
    7979      returns non-zero if no scaling done */
    8080  virtual int scale(ClpSimplex * model) const ;
    81   /** Unpacks a column into an OsiIndexedvector
     81  /** Unpacks a column into an CoinIndexedvector
    8282      Note that model is NOT const.  Bounds and objective could
    8383      be modified if doing column generation */
    84   virtual void unpack(ClpSimplex * model,OsiIndexedVector * rowArray,
     84  virtual void unpack(ClpSimplex * model,CoinIndexedVector * rowArray,
    8585                   int column) const ;
    86   /** Adds multiple of a column into an OsiIndexedvector
     86  /** Adds multiple of a column into an CoinIndexedvector
    8787      You can use quickAdd to add to vector */
    88   virtual void add(const ClpSimplex * model,OsiIndexedVector * rowArray,
     88  virtual void add(const ClpSimplex * model,CoinIndexedVector * rowArray,
    8989                   int column, double multiplier) const ;
    90    /// Allow any parts of a created OsiPackedMatrix to be deleted
     90   /// Allow any parts of a created CoinPackedMatrix to be deleted
    9191   virtual void releasePackedMatrix() const { };
    9292   //@}
     
    118118        Squashes small elements and knows about ClpSimplex */
    119119  virtual void transposeTimes(const ClpSimplex * model, double scalar,
    120                               const OsiIndexedVector * x,
    121                               OsiIndexedVector * y,
    122                               OsiIndexedVector * z) const;
     120                              const CoinIndexedVector * x,
     121                              CoinIndexedVector * y,
     122                              CoinIndexedVector * z) const;
    123123    /** Return <code>x *A in <code>z</code> but
    124124        just for indices in y.
    125125        Squashes small elements and knows about ClpSimplex */
    126126  virtual void subsetTransposeTimes(const ClpSimplex * model,
    127                               const OsiIndexedVector * x,
    128                               const OsiIndexedVector * y,
    129                               OsiIndexedVector * z) const;
     127                              const CoinIndexedVector * x,
     128                              const CoinIndexedVector * y,
     129                              CoinIndexedVector * z) const;
    130130  //@}
    131131
    132132  /**@name Other */
    133133   //@{
    134   /// Returns OsiPackedMatrix (non const)
    135   inline OsiPackedMatrix * matrix() const { return matrix_;};
     134  /// Returns CoinPackedMatrix (non const)
     135  inline CoinPackedMatrix * matrix() const { return matrix_;};
    136136   //@}
    137137
     
    149149   /** The copy constructor. */
    150150   ClpPackedMatrix(const ClpPackedMatrix&);
    151    /** The copy constructor from an OsiPackedMatrix. */
    152    ClpPackedMatrix(const OsiPackedMatrix&);
     151   /** The copy constructor from an CoinPackedMatrix. */
     152   ClpPackedMatrix(const CoinPackedMatrix&);
    153153
    154154  /** This takes over ownership (for space reasons) */
    155    ClpPackedMatrix(OsiPackedMatrix * matrix);
     155   ClpPackedMatrix(CoinPackedMatrix * matrix);
    156156
    157157   ClpPackedMatrix& operator=(const ClpPackedMatrix&);
     
    166166   //@{
    167167  /// Data
    168   OsiPackedMatrix * matrix_;
     168  CoinPackedMatrix * matrix_;
    169169   //@}
    170170};
  • branches/devel-1/include/ClpPrimalColumnDantzig.hpp

    r2 r19  
    2626      Can just do full price if you really want to be slow
    2727  */
    28   virtual int pivotColumn(OsiIndexedVector * updates,
    29                           OsiIndexedVector * spareRow1,
    30                           OsiIndexedVector * spareRow2,
    31                           OsiIndexedVector * spareColumn1,
    32                           OsiIndexedVector * spareColumn2);
     28  virtual int pivotColumn(CoinIndexedVector * updates,
     29                          CoinIndexedVector * spareRow1,
     30                          CoinIndexedVector * spareRow2,
     31                          CoinIndexedVector * spareColumn1,
     32                          CoinIndexedVector * spareColumn2);
    3333
    3434  /// Just sets model
  • branches/devel-1/include/ClpPrimalColumnPivot.hpp

    r17 r19  
    55
    66class ClpSimplex;
    7 class OsiIndexedVector;
     7class CoinIndexedVector;
    88
    99//#############################################################################
     
    2828      We can use other arrays to help updates
    2929  */
    30   virtual int pivotColumn(OsiIndexedVector * updates,
    31                           OsiIndexedVector * spareRow1,
    32                           OsiIndexedVector * spareRow2,
    33                           OsiIndexedVector * spareColumn1,
    34                           OsiIndexedVector * spareColumn2) = 0;
     30  virtual int pivotColumn(CoinIndexedVector * updates,
     31                          CoinIndexedVector * spareRow1,
     32                          CoinIndexedVector * spareRow2,
     33                          CoinIndexedVector * spareColumn1,
     34                          CoinIndexedVector * spareColumn2) = 0;
    3535 
    3636  /// Updates weights - part 1 (may be empty)
    37   virtual void updateWeights(OsiIndexedVector * input);
     37  virtual void updateWeights(CoinIndexedVector * input);
    3838 
    3939  /** Saves any weights round factorization as pivot rows may change
  • branches/devel-1/include/ClpPrimalColumnSteepest.hpp

    r17 r19  
    1515*/
    1616
    17 class OsiIndexedVector;
     17class CoinIndexedVector;
    1818
    1919class ClpPrimalColumnSteepest : public ClpPrimalColumnPivot {
     
    2727      updateArray has cost updates (also use pivotRow_ from last iteration)
    2828  */
    29   virtual int pivotColumn(OsiIndexedVector * updates,
    30                           OsiIndexedVector * spareRow1,
    31                           OsiIndexedVector * spareRow2,
    32                           OsiIndexedVector * spareColumn1,
    33                           OsiIndexedVector * spareColumn2);
     29  virtual int pivotColumn(CoinIndexedVector * updates,
     30                          CoinIndexedVector * spareRow1,
     31                          CoinIndexedVector * spareRow2,
     32                          CoinIndexedVector * spareColumn1,
     33                          CoinIndexedVector * spareColumn2);
    3434
    3535  /// Updates weights - part 1 - also checks accuracy
    36   virtual void updateWeights(OsiIndexedVector * input);
     36  virtual void updateWeights(CoinIndexedVector * input);
    3737
    3838  /// Checks accuracy - just for debug
    3939  void checkAccuracy(int sequence,double relativeTolerance,
    40                      OsiIndexedVector * rowArray1,
    41                      OsiIndexedVector * rowArray2);
     40                     CoinIndexedVector * rowArray1,
     41                     CoinIndexedVector * rowArray2);
    4242
    4343  /// Initialize weights
     
    108108  double * weights_;
    109109  /// square of infeasibility array (just for infeasible columns)
    110   OsiIndexedVector * infeasible_;
     110  CoinIndexedVector * infeasible_;
    111111  /// alternate weight array (so we can unroll)
    112   OsiIndexedVector * alternateWeights_;
     112  CoinIndexedVector * alternateWeights_;
    113113  /// save weight array (so we can use checkpoint)
    114114  double * savedWeights_;
  • branches/devel-1/include/ClpSimplex.hpp

    r17 r19  
    1818class ClpPrimalColumnPivot;
    1919class ClpFactorization;
    20 class OsiWarmStartBasis;
    21 class OsiIndexedVector;
     20class CoinWarmStartBasis;
     21class CoinIndexedVector;
    2222class ClpNonLinearCost;
    2323
     
    4646public:
    4747
    48   /// enums for status of various sorts (matches OsiWarmStartBasis)
     48  /// enums for status of various sorts (matches CoinWarmStartBasis)
    4949  enum Status {
    5050    isFree = 0x00,
     
    8989  int primal(int ifValuesPass=0);
    9090  /// Sets up working basis as a copy of input
    91   void setBasis( const OsiWarmStartBasis & basis);
     91  void setBasis( const CoinWarmStartBasis & basis);
    9292  /// Passes in factorization
    9393  void setFactorization( ClpFactorization & factorization);
     
    174174          { return numberPrimalInfeasibilities_;} ;
    175175  /// Warm start
    176   OsiWarmStartBasis getBasis() const;
     176  CoinWarmStartBasis getBasis() const;
    177177  /** Save model to file, returns 0 if success.  This is designed for
    178178      use outside algorithms so does not save iterating arrays etc.
     
    219219     Also applies scaling if needed
    220220  */
    221   void unpack(OsiIndexedVector * rowArray);
     221  void unpack(CoinIndexedVector * rowArray);
    222222  /**
    223223     Unpacks one column of the matrix into indexed array
     
    225225     Also applies scaling if needed
    226226  */
    227   void unpack(OsiIndexedVector * rowArray,int sequence);
     227  void unpack(CoinIndexedVector * rowArray,int sequence);
    228228 
    229229  /**
     
    535535  double * objectiveWork_;
    536536  /// Useful row length arrays
    537   OsiIndexedVector * rowArray_[6];
     537  CoinIndexedVector * rowArray_[6];
    538538  /// Useful column length arrays
    539   OsiIndexedVector * columnArray_[6];
     539  CoinIndexedVector * columnArray_[6];
    540540  /// Alpha (pivot element)
    541541  double alpha_;
  • branches/devel-1/include/ClpSimplexDual.hpp

    r17 r19  
    148148      The output vector has movement of primal
    149149      solution (row length array) */
    150   int updateDualsInDual(OsiIndexedVector * rowArray,
    151                   OsiIndexedVector * columnArray,
    152                   OsiIndexedVector * outputArray,
     150  int updateDualsInDual(CoinIndexedVector * rowArray,
     151                  CoinIndexedVector * columnArray,
     152                  CoinIndexedVector * outputArray,
    153153                  double theta,
    154154                  double & objectiveChange);
     
    157157      If change >0.0 then value in array >0.0 => from lower to upper
    158158  */
    159   void flipBounds(OsiIndexedVector * rowArray,
    160                   OsiIndexedVector * columnArray,
     159  void flipBounds(CoinIndexedVector * rowArray,
     160                  CoinIndexedVector * columnArray,
    161161                  double change);
    162162  /**
     
    170170      variables are being flipped
    171171  */
    172   void dualColumn(OsiIndexedVector * rowArray,
    173                   OsiIndexedVector * columnArray,
    174                   OsiIndexedVector * spareArray,
    175                   OsiIndexedVector * spareArray2);
     172  void dualColumn(CoinIndexedVector * rowArray,
     173                  CoinIndexedVector * columnArray,
     174                  CoinIndexedVector * spareArray,
     175                  CoinIndexedVector * spareArray2);
    176176  /**
    177177      Chooses dual pivot row
     
    189189      and cost of change vector
    190190  */
    191   int changeBounds(bool initialize,OsiIndexedVector * outputArray,
     191  int changeBounds(bool initialize,CoinIndexedVector * outputArray,
    192192                   double & changeCost);
    193193  /** As changeBounds but just changes new bounds for a single variable.
     
    198198  /** Checks if tentative optimal actually means unbounded in dual
    199199      Returns -3 if not, 2 if is unbounded */
    200   int checkUnbounded(OsiIndexedVector * ray,OsiIndexedVector * spare,
     200  int checkUnbounded(CoinIndexedVector * ray,CoinIndexedVector * spare,
    201201                     double changeCost);
    202202  /**  Refactorizes if necessary
  • branches/devel-1/include/ClpSimplexPrimal.hpp

    r17 r19  
    140140      After rowArray will have cost changes for use next iteration
    141141  */
    142   int updatePrimalsInPrimal(OsiIndexedVector * rowArray,
     142  int updatePrimalsInPrimal(CoinIndexedVector * rowArray,
    143143                  double theta,
    144144                  double & objectiveChange);
     
    152152      If valuesPass non-zero then compute dj for direction
    153153  */
    154   void primalRow(OsiIndexedVector * rowArray,
    155                  OsiIndexedVector * rhsArray,
    156                  OsiIndexedVector * spareArray,
    157                  OsiIndexedVector * spareArray2,
     154  void primalRow(CoinIndexedVector * rowArray,
     155                 CoinIndexedVector * rhsArray,
     156                 CoinIndexedVector * spareArray,
     157                 CoinIndexedVector * spareArray2,
    158158                 int valuesPass);
    159159  /**
     
    164164      For easy problems we can just choose one of the first columns we look at
    165165  */
    166   void primalColumn(OsiIndexedVector * updateArray,
    167                     OsiIndexedVector * spareRow1,
    168                     OsiIndexedVector * spareRow2,
    169                     OsiIndexedVector * spareColumn1,
    170                     OsiIndexedVector * spareColumn2);
     166  void primalColumn(CoinIndexedVector * updateArray,
     167                    CoinIndexedVector * spareRow1,
     168                    CoinIndexedVector * spareRow2,
     169                    CoinIndexedVector * spareColumn1,
     170                    CoinIndexedVector * spareColumn2);
    171171
    172172  /** Checks if tentative optimal actually means unbounded in primal
    173173      Returns -3 if not, 2 if is unbounded */
    174   int checkUnbounded(OsiIndexedVector * ray,OsiIndexedVector * spare,
     174  int checkUnbounded(CoinIndexedVector * ray,CoinIndexedVector * spare,
    175175                     double changeCost);
    176176  /**  Refactorizes if necessary
Note: See TracChangeset for help on using the changeset viewer.