Changeset 369 for trunk/ClpInterior.cpp


Ignore:
Timestamp:
May 18, 2004 10:06:56 AM (16 years ago)
Author:
forrest
Message:

improving interior point code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpInterior.cpp

    r335 r369  
    7777  errorRegion_(NULL),
    7878  rhsFixRegion_(NULL),
    79   updateRegion_(NULL),
    8079  upperSlack_(NULL),
    8180  lowerSlack_(NULL),
    8281  diagonal_(NULL),
    83   weights_(NULL),
    8482  solution_(NULL),
     83  workArray_(NULL),
     84  deltaX_(NULL),
     85  deltaY_(NULL),
    8586  deltaZ_(NULL),
    86   deltaW_(NULL),
    87   deltaS_(NULL),
    8887  deltaT_(NULL),
     88  deltaSU_(NULL),
     89  deltaSL_(NULL),
     90  rhsB_(NULL),
     91  rhsU_(NULL),
     92  rhsL_(NULL),
     93  rhsZ_(NULL),
     94  rhsT_(NULL),
     95  rhsC_(NULL),
    8996  zVec_(NULL),
    90   wVec_(NULL),
     97  tVec_(NULL),
    9198  cholesky_(NULL),
    9299  numberComplementarityPairs_(0),
     100  numberComplementarityItems_(0),
    93101  maximumBarrierIterations_(200),
    94102  gonePrimalFeasible_(false),
     
    154162    errorRegion_(NULL),
    155163    rhsFixRegion_(NULL),
    156     updateRegion_(NULL),
    157164    upperSlack_(NULL),
    158165    lowerSlack_(NULL),
    159166    diagonal_(NULL),
    160     weights_(NULL),
    161167    solution_(NULL),
     168    workArray_(NULL),
     169    deltaX_(NULL),
     170    deltaY_(NULL),
    162171    deltaZ_(NULL),
    163     deltaW_(NULL),
    164     deltaS_(NULL),
    165172    deltaT_(NULL),
     173    deltaSU_(NULL),
     174    deltaSL_(NULL),
     175    rhsB_(NULL),
     176    rhsU_(NULL),
     177    rhsL_(NULL),
     178    rhsZ_(NULL),
     179    rhsT_(NULL),
     180    rhsC_(NULL),
    166181    zVec_(NULL),
    167     wVec_(NULL),
     182    tVec_(NULL),
    168183    cholesky_(NULL),
    169184    numberComplementarityPairs_(0),
     185    numberComplementarityItems_(0),
    170186    maximumBarrierIterations_(200),
    171187    gonePrimalFeasible_(false),
     
    219235  errorRegion_(NULL),
    220236  rhsFixRegion_(NULL),
    221   updateRegion_(NULL),
    222237  upperSlack_(NULL),
    223238  lowerSlack_(NULL),
    224239  diagonal_(NULL),
    225   weights_(NULL),
    226240  solution_(NULL),
     241  workArray_(NULL),
     242  deltaX_(NULL),
     243  deltaY_(NULL),
    227244  deltaZ_(NULL),
    228   deltaW_(NULL),
    229   deltaS_(NULL),
    230245  deltaT_(NULL),
     246  deltaSU_(NULL),
     247  deltaSL_(NULL),
     248  rhsB_(NULL),
     249  rhsU_(NULL),
     250  rhsL_(NULL),
     251  rhsZ_(NULL),
     252  rhsT_(NULL),
     253  rhsC_(NULL),
    231254  zVec_(NULL),
    232   wVec_(NULL),
     255  tVec_(NULL),
    233256  cholesky_(NULL)
    234257{
     
    286309  errorRegion_(NULL),
    287310  rhsFixRegion_(NULL),
    288   updateRegion_(NULL),
    289311  upperSlack_(NULL),
    290312  lowerSlack_(NULL),
    291313  diagonal_(NULL),
    292   weights_(NULL),
    293314  solution_(NULL),
     315  workArray_(NULL),
     316  deltaX_(NULL),
     317  deltaY_(NULL),
    294318  deltaZ_(NULL),
    295   deltaW_(NULL),
    296   deltaS_(NULL),
    297319  deltaT_(NULL),
     320  deltaSU_(NULL),
     321  deltaSL_(NULL),
     322  rhsB_(NULL),
     323  rhsU_(NULL),
     324  rhsL_(NULL),
     325  rhsZ_(NULL),
     326  rhsT_(NULL),
     327  rhsC_(NULL),
    298328  zVec_(NULL),
    299   wVec_(NULL),
     329  tVec_(NULL),
    300330  cholesky_(NULL),
    301331  numberComplementarityPairs_(0),
     332  numberComplementarityItems_(0),
    302333  maximumBarrierIterations_(200),
    303334  gonePrimalFeasible_(false),
     
    373404  errorRegion_ = ClpCopyOfArray(rhs.errorRegion_,numberRows_);
    374405  rhsFixRegion_ = ClpCopyOfArray(rhs.rhsFixRegion_,numberRows_);
    375   updateRegion_ = ClpCopyOfArray(rhs.updateRegion_,numberRows_);
     406  deltaY_ = ClpCopyOfArray(rhs.deltaY_,numberRows_);
    376407  upperSlack_ = ClpCopyOfArray(rhs.upperSlack_,numberRows_+numberColumns_);
    377408  lowerSlack_ = ClpCopyOfArray(rhs.lowerSlack_,numberRows_+numberColumns_);
    378409  diagonal_ = ClpCopyOfArray(rhs.diagonal_,numberRows_+numberColumns_);
    379   weights_ = ClpCopyOfArray(rhs.weights_,numberRows_+numberColumns_);
     410  deltaX_ = ClpCopyOfArray(rhs.deltaX_,numberRows_+numberColumns_);
     411  deltaZ_ = ClpCopyOfArray(rhs.deltaZ_,numberRows_+numberColumns_);
     412  deltaT_ = ClpCopyOfArray(rhs.deltaT_,numberRows_+numberColumns_);
     413  deltaSU_ = ClpCopyOfArray(rhs.deltaSU_,numberRows_+numberColumns_);
     414  deltaSL_ = ClpCopyOfArray(rhs.deltaSL_,numberRows_+numberColumns_);
     415  rhsB_ = ClpCopyOfArray(rhs.rhsB_,numberRows_);
     416  rhsU_ = ClpCopyOfArray(rhs.rhsU_,numberRows_+numberColumns_);
     417  rhsL_ = ClpCopyOfArray(rhs.rhsL_,numberRows_+numberColumns_);
     418  rhsZ_ = ClpCopyOfArray(rhs.rhsZ_,numberRows_+numberColumns_);
     419  rhsT_ = ClpCopyOfArray(rhs.rhsT_,numberRows_+numberColumns_);
     420  rhsC_ = ClpCopyOfArray(rhs.rhsC_,numberRows_+numberColumns_);
    380421  solution_ = ClpCopyOfArray(rhs.solution_,numberRows_+numberColumns_);
    381   deltaZ_ = ClpCopyOfArray(rhs.deltaZ_,numberRows_+numberColumns_);
    382   deltaW_ = ClpCopyOfArray(rhs.deltaW_,numberRows_+numberColumns_);
    383   deltaS_ = ClpCopyOfArray(rhs.deltaS_,numberRows_+numberColumns_);
    384   deltaT_ = ClpCopyOfArray(rhs.deltaT_,numberRows_+numberColumns_);
     422  workArray_ = ClpCopyOfArray(rhs.workArray_,numberRows_+numberColumns_);
    385423  zVec_ = ClpCopyOfArray(rhs.zVec_,numberRows_+numberColumns_);
    386   wVec_ = ClpCopyOfArray(rhs.wVec_,numberRows_+numberColumns_);
     424  tVec_ = ClpCopyOfArray(rhs.tVec_,numberRows_+numberColumns_);
    387425  cholesky_ = rhs.cholesky_->clone();
    388426  numberComplementarityPairs_ = rhs.numberComplementarityPairs_;
     427  numberComplementarityItems_ = rhs.numberComplementarityItems_;
    389428  maximumBarrierIterations_ = rhs.maximumBarrierIterations_;
    390429  gonePrimalFeasible_ = rhs.gonePrimalFeasible_;
     
    424463  delete [] rhsFixRegion_;
    425464  rhsFixRegion_ = NULL;
    426   delete [] updateRegion_;
    427   updateRegion_ = NULL;
     465  delete [] deltaY_;
     466  deltaY_ = NULL;
    428467  delete [] upperSlack_;
    429468  upperSlack_ = NULL;
     
    432471  delete [] diagonal_;
    433472  diagonal_ = NULL;
    434   delete [] weights_;
    435   weights_ = NULL;
     473  delete [] deltaX_;
     474  deltaX_ = NULL;
     475  delete [] deltaZ_;
     476  deltaZ_ = NULL;
     477  delete [] deltaT_;
     478  deltaT_ = NULL;
     479  delete [] deltaSU_;
     480  deltaSU_ = NULL;
     481  delete [] deltaSL_;
     482  deltaSL_ = NULL;
     483  delete [] rhsB_;
     484  rhsB_ = NULL;
     485  delete [] rhsU_;
     486  rhsU_ = NULL;
     487  delete [] rhsL_;
     488  rhsL_ = NULL;
     489  delete [] rhsZ_;
     490  rhsZ_ = NULL;
     491  delete [] rhsT_;
     492  rhsT_ = NULL;
     493  delete [] rhsC_;
     494  rhsC_ = NULL;
    436495  delete [] solution_;
    437496  solution_ = NULL;
    438   delete [] deltaZ_;
    439   deltaZ_ = NULL;
    440   delete [] deltaW_;
    441   deltaW_ = NULL;
    442   delete [] deltaS_;
    443   deltaS_ = NULL;
    444   delete [] deltaT_;
    445   deltaT_ = NULL;
     497  delete [] workArray_;
     498  workArray_ = NULL;
    446499  delete [] zVec_;
    447500  zVec_ = NULL;
    448   delete [] wVec_;
    449   wVec_ = NULL;
     501  delete [] tVec_;
     502  tVec_ = NULL;
    450503  delete cholesky_;
    451504}
     
    510563  assert (!rhsFixRegion_);
    511564  rhsFixRegion_ = new double [numberRows_];
    512   assert (!updateRegion_);
    513   updateRegion_ = new double [numberRows_];
     565  assert (!deltaY_);
     566  deltaY_ = new double [numberRows_];
     567  CoinZeroN(deltaY_,numberRows_);
    514568  assert (!upperSlack_);
    515569  upperSlack_ = new double [nTotal];
     
    518572  assert (!diagonal_);
    519573  diagonal_ = new double [nTotal];
    520   assert (!weights_);
    521   weights_ = new double [nTotal];
     574  assert (!deltaX_);
     575  deltaX_ = new double [nTotal];
     576  CoinZeroN(deltaX_,nTotal);
    522577  assert (!deltaZ_);
    523578  deltaZ_ = new double [nTotal];
    524579  CoinZeroN(deltaZ_,nTotal);
    525   assert (!deltaW_);
    526   deltaW_ = new double [nTotal];
    527   CoinZeroN(deltaW_,nTotal);
    528   assert (!deltaS_);
    529   deltaS_ = new double [nTotal];
    530580  assert (!deltaT_);
    531581  deltaT_ = new double [nTotal];
     582  CoinZeroN(deltaT_,nTotal);
     583  assert (!deltaSU_);
     584  deltaSU_ = new double [nTotal];
     585  CoinZeroN(deltaSU_,nTotal);
     586  assert (!deltaSL_);
     587  deltaSL_ = new double [nTotal];
     588  CoinZeroN(deltaSL_,nTotal);
     589  assert (!rhsB_);
     590  rhsB_ = new double [numberRows_];
     591  CoinZeroN(rhsB_,numberRows_);
     592  assert (!rhsU_);
     593  rhsU_ = new double [nTotal];
     594  CoinZeroN(rhsU_,nTotal);
     595  assert (!rhsL_);
     596  rhsL_ = new double [nTotal];
     597  CoinZeroN(rhsL_,nTotal);
     598  assert (!rhsZ_);
     599  rhsZ_ = new double [nTotal];
     600  CoinZeroN(rhsZ_,nTotal);
     601  assert (!rhsT_);
     602  rhsT_ = new double [nTotal];
     603  CoinZeroN(rhsT_,nTotal);
     604  assert (!rhsC_);
     605  rhsC_ = new double [nTotal];
     606  CoinZeroN(rhsC_,nTotal);
     607  assert (!workArray_);
     608  workArray_ = new double [nTotal];
     609  CoinZeroN(workArray_,nTotal);
    532610  assert (!zVec_);
    533611  zVec_ = new double [nTotal];
    534612  CoinZeroN(zVec_,nTotal);
    535   assert (!wVec_);
    536   wVec_ = new double [nTotal];
    537   CoinZeroN(wVec_,nTotal);
     613  assert (!tVec_);
     614  tVec_ = new double [nTotal];
     615  CoinZeroN(tVec_,nTotal);
    538616  assert (!dj_);
    539617  dj_ = new double [nTotal];
     
    566644  delete [] rhsFixRegion_;
    567645  rhsFixRegion_ = NULL;
    568   delete [] updateRegion_;
    569   updateRegion_ = NULL;
     646  delete [] deltaY_;
     647  deltaY_ = NULL;
    570648  delete [] upperSlack_;
    571649  upperSlack_ = NULL;
     
    574652  delete [] diagonal_;
    575653  diagonal_ = NULL;
    576   delete [] weights_;
    577   weights_ = NULL;
    578   delete [] deltaZ_;
    579   deltaZ_ = NULL;
    580   delete [] deltaW_;
    581   deltaW_ = NULL;
    582   delete [] deltaS_;
    583   deltaS_ = NULL;
    584   delete [] deltaT_;
    585   deltaT_ = NULL;
     654  delete [] deltaX_;
     655  deltaX_ = NULL;
     656  delete [] workArray_;
     657  workArray_ = NULL;
    586658  delete [] zVec_;
    587659  zVec_ = NULL;
    588   delete [] wVec_;
    589   wVec_ = NULL;
     660  delete [] tVec_;
     661  tVec_ = NULL;
    590662  delete [] dj_;
    591663  dj_ = NULL;
Note: See TracChangeset for help on using the changeset viewer.