Changeset 2385 for trunk/Clp/src/ClpInterior.hpp
 Timestamp:
 Jan 6, 2019 2:43:06 PM (4 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpInterior.hpp
r1665 r2385 26 26 /// ******** DATA to be moved into protected section of ClpInterior 27 27 typedef struct { 28 doubleatolmin;29 doubler3norm;30 doubleLSdamp;31 double*deltay;28 double atolmin; 29 double r3norm; 30 double LSdamp; 31 double *deltay; 32 32 } Info; 33 33 /// ******** DATA to be moved into protected section of ClpInterior 34 34 35 35 typedef struct { 36 doubleatolold;37 doubleatolnew;38 doubler3ratio;39 intistop;40 intitncg;36 double atolold; 37 double atolnew; 38 double r3ratio; 39 int istop; 40 int itncg; 41 41 } Outfo; 42 42 /// ******** DATA to be moved into protected section of ClpInterior 43 43 44 44 typedef struct { 45 doublegamma;46 doubledelta;47 48 doubleFeaTol;49 doubleOptTol;50 doubleStepTol;51 doublex0min;52 doublez0min;53 doublemu0;54 int LSmethod;// 1=Cholesky 2=QR 3=LSQR55 int LSproblem;// See below56 57 doubleLSQRatol1; // Initial atol58 doubleLSQRatol2; // Smallest atol (unless atol1 is smaller)59 doubleLSQRconlim;60 intwait;45 double gamma; 46 double delta; 47 int MaxIter; 48 double FeaTol; 49 double OptTol; 50 double StepTol; 51 double x0min; 52 double z0min; 53 double mu0; 54 int LSmethod; // 1=Cholesky 2=QR 3=LSQR 55 int LSproblem; // See below 56 int LSQRMaxIter; 57 double LSQRatol1; // Initial atol 58 double LSQRatol2; // Smallest atol (unless atol1 is smaller) 59 double LSQRconlim; 60 int wait; 61 61 } Options; 62 62 class Lsqr; … … 71 71 72 72 class ClpInterior : public ClpModel { 73 friend void ClpInteriorUnitTest(const std::string &mpsDir,74 const std::string &netlibDir);73 friend void ClpInteriorUnitTest(const std::string &mpsDir, 74 const std::string &netlibDir); 75 75 76 76 public: 77 78 /**@name Constructors and destructor and copy */ 79 //@{ 80 /// Default constructor 81 ClpInterior ( ); 82 83 /// Copy constructor. 84 ClpInterior(const ClpInterior &); 85 /// Copy constructor from model. 86 ClpInterior(const ClpModel &); 87 /** Subproblem constructor. A subset of whole model is created from the 77 /**@name Constructors and destructor and copy */ 78 //@{ 79 /// Default constructor 80 ClpInterior(); 81 82 /// Copy constructor. 83 ClpInterior(const ClpInterior &); 84 /// Copy constructor from model. 85 ClpInterior(const ClpModel &); 86 /** Subproblem constructor. A subset of whole model is created from the 88 87 row and column lists given. The new order is given by list order and 89 88 duplicates are allowed. Name and integer information can be dropped 90 89 */ 91 ClpInterior (const ClpModel *wholeModel,92 int numberRows, const int *whichRows,93 int numberColumns, const int *whichColumns,94 95 96 ClpInterior & operator=(const ClpInterior &rhs);97 98 ~ClpInterior ();99 100 90 ClpInterior(const ClpModel *wholeModel, 91 int numberRows, const int *whichRows, 92 int numberColumns, const int *whichColumns, 93 bool dropNames = true, bool dropIntegers = true); 94 /// Assignment operator. This copies the data 95 ClpInterior &operator=(const ClpInterior &rhs); 96 /// Destructor 97 ~ClpInterior(); 98 // Ones below are just ClpModel with some changes 99 /** Loads a problem (the constraints on the 101 100 rows are given by lower and upper bounds). If a pointer is 0 then the 102 101 following values are the default: … … 109 108 </ul> 110 109 */ 111 void loadProblem ( const ClpMatrixBase&matrix,112 const double* collb, const double*colub,113 const double*obj,114 const double* rowlb, const double*rowub,115 const double *rowObjective = NULL);116 void loadProblem ( const CoinPackedMatrix&matrix,117 const double* collb, const double*colub,118 const double*obj,119 const double* rowlb, const double*rowub,120 const double *rowObjective = NULL);121 122 110 void loadProblem(const ClpMatrixBase &matrix, 111 const double *collb, const double *colub, 112 const double *obj, 113 const double *rowlb, const double *rowub, 114 const double *rowObjective = NULL); 115 void loadProblem(const CoinPackedMatrix &matrix, 116 const double *collb, const double *colub, 117 const double *obj, 118 const double *rowlb, const double *rowub, 119 const double *rowObjective = NULL); 120 121 /** Just like the other loadProblem() method except that the matrix is 123 122 given in a standard column major ordered format (without gaps). */ 124 void loadProblem (const int numcols, const int numrows,125 const CoinBigIndex* start, const int*index,126 const double*value,127 const double* collb, const double*colub,128 const double*obj,129 const double* rowlb, const double*rowub,130 const double *rowObjective = NULL);131 132 void loadProblem (const int numcols, const int numrows,133 const CoinBigIndex* start, const int*index,134 const double* value, const int *length,135 const double* collb, const double*colub,136 const double*obj,137 const double* rowlb, const double*rowub,138 const double *rowObjective = NULL);139 140 141 142 143 123 void loadProblem(const int numcols, const int numrows, 124 const CoinBigIndex *start, const int *index, 125 const double *value, 126 const double *collb, const double *colub, 127 const double *obj, 128 const double *rowlb, const double *rowub, 129 const double *rowObjective = NULL); 130 /// This one is for after presolve to save memory 131 void loadProblem(const int numcols, const int numrows, 132 const CoinBigIndex *start, const int *index, 133 const double *value, const int *length, 134 const double *collb, const double *colub, 135 const double *obj, 136 const double *rowlb, const double *rowub, 137 const double *rowObjective = NULL); 138 /// Read an mps file from the given filename 139 int readMps(const char *filename, 140 bool keepNames = false, 141 bool ignoreErrors = false); 142 /** Borrow model. This is so we dont have to copy large amounts 144 143 of data around. It assumes a derived class wants to overwrite 145 144 an empty model with a real one  while it does an algorithm. 146 145 This is same as ClpModel one. */ 147 void borrowModel(ClpModel & otherModel); 148 /** Return model  updates any scalars */ 149 void returnModel(ClpModel & otherModel); 150 //@} 151 152 /**@name Functions most useful to user */ 153 //@{ 154 /** Pdco algorithm  see ClpPdco.hpp for method */ 155 int pdco(); 156 // ** Temporary version 157 int pdco( ClpPdcoBase * stuff, Options &options, Info &info, Outfo &outfo); 158 /// PrimalDual PredictorCorrector barrier 159 int primalDual(); 160 //@} 161 162 /**@name most useful gets and sets */ 163 //@{ 164 /// If problem is primal feasible 165 inline bool primalFeasible() const { 166 return (sumPrimalInfeasibilities_ <= 1.0e5); 167 } 168 /// If problem is dual feasible 169 inline bool dualFeasible() const { 170 return (sumDualInfeasibilities_ <= 1.0e5); 171 } 172 /// Current (or last) algorithm 173 inline int algorithm() const { 174 return algorithm_; 175 } 176 /// Set algorithm 177 inline void setAlgorithm(int value) { 178 algorithm_ = value; 179 } 180 /// Sum of dual infeasibilities 181 inline CoinWorkDouble sumDualInfeasibilities() const { 182 return sumDualInfeasibilities_; 183 } 184 /// Sum of primal infeasibilities 185 inline CoinWorkDouble sumPrimalInfeasibilities() const { 186 return sumPrimalInfeasibilities_; 187 } 188 /// dualObjective. 189 inline CoinWorkDouble dualObjective() const { 190 return dualObjective_; 191 } 192 /// primalObjective. 193 inline CoinWorkDouble primalObjective() const { 194 return primalObjective_; 195 } 196 /// diagonalNorm 197 inline CoinWorkDouble diagonalNorm() const { 198 return diagonalNorm_; 199 } 200 /// linearPerturbation 201 inline CoinWorkDouble linearPerturbation() const { 202 return linearPerturbation_; 203 } 204 inline void setLinearPerturbation(CoinWorkDouble value) { 205 linearPerturbation_ = value; 206 } 207 /// projectionTolerance 208 inline CoinWorkDouble projectionTolerance() const { 209 return projectionTolerance_; 210 } 211 inline void setProjectionTolerance(CoinWorkDouble value) { 212 projectionTolerance_ = value; 213 } 214 /// diagonalPerturbation 215 inline CoinWorkDouble diagonalPerturbation() const { 216 return diagonalPerturbation_; 217 } 218 inline void setDiagonalPerturbation(CoinWorkDouble value) { 219 diagonalPerturbation_ = value; 220 } 221 /// gamma 222 inline CoinWorkDouble gamma() const { 223 return gamma_; 224 } 225 inline void setGamma(CoinWorkDouble value) { 226 gamma_ = value; 227 } 228 /// delta 229 inline CoinWorkDouble delta() const { 230 return delta_; 231 } 232 inline void setDelta(CoinWorkDouble value) { 233 delta_ = value; 234 } 235 /// ComplementarityGap 236 inline CoinWorkDouble complementarityGap() const { 237 return complementarityGap_; 238 } 239 //@} 240 241 /**@name most useful gets and sets */ 242 //@{ 243 /// Largest error on Axb 244 inline CoinWorkDouble largestPrimalError() const { 245 return largestPrimalError_; 246 } 247 /// Largest error on basic duals 248 inline CoinWorkDouble largestDualError() const { 249 return largestDualError_; 250 } 251 /// Maximum iterations 252 inline int maximumBarrierIterations() const { 253 return maximumBarrierIterations_; 254 } 255 inline void setMaximumBarrierIterations(int value) { 256 maximumBarrierIterations_ = value; 257 } 258 /// Set cholesky (and delete present one) 259 void setCholesky(ClpCholeskyBase * cholesky); 260 /// Return number fixed to see if worth presolving 261 int numberFixed() const; 262 /** fix variables interior says should be. If reallyFix false then just 146 void borrowModel(ClpModel &otherModel); 147 /** Return model  updates any scalars */ 148 void returnModel(ClpModel &otherModel); 149 //@} 150 151 /**@name Functions most useful to user */ 152 //@{ 153 /** Pdco algorithm  see ClpPdco.hpp for method */ 154 int pdco(); 155 // ** Temporary version 156 int pdco(ClpPdcoBase *stuff, Options &options, Info &info, Outfo &outfo); 157 /// PrimalDual PredictorCorrector barrier 158 int primalDual(); 159 //@} 160 161 /**@name most useful gets and sets */ 162 //@{ 163 /// If problem is primal feasible 164 inline bool primalFeasible() const 165 { 166 return (sumPrimalInfeasibilities_ <= 1.0e5); 167 } 168 /// If problem is dual feasible 169 inline bool dualFeasible() const 170 { 171 return (sumDualInfeasibilities_ <= 1.0e5); 172 } 173 /// Current (or last) algorithm 174 inline int algorithm() const 175 { 176 return algorithm_; 177 } 178 /// Set algorithm 179 inline void setAlgorithm(int value) 180 { 181 algorithm_ = value; 182 } 183 /// Sum of dual infeasibilities 184 inline CoinWorkDouble sumDualInfeasibilities() const 185 { 186 return sumDualInfeasibilities_; 187 } 188 /// Sum of primal infeasibilities 189 inline CoinWorkDouble sumPrimalInfeasibilities() const 190 { 191 return sumPrimalInfeasibilities_; 192 } 193 /// dualObjective. 194 inline CoinWorkDouble dualObjective() const 195 { 196 return dualObjective_; 197 } 198 /// primalObjective. 199 inline CoinWorkDouble primalObjective() const 200 { 201 return primalObjective_; 202 } 203 /// diagonalNorm 204 inline CoinWorkDouble diagonalNorm() const 205 { 206 return diagonalNorm_; 207 } 208 /// linearPerturbation 209 inline CoinWorkDouble linearPerturbation() const 210 { 211 return linearPerturbation_; 212 } 213 inline void setLinearPerturbation(CoinWorkDouble value) 214 { 215 linearPerturbation_ = value; 216 } 217 /// projectionTolerance 218 inline CoinWorkDouble projectionTolerance() const 219 { 220 return projectionTolerance_; 221 } 222 inline void setProjectionTolerance(CoinWorkDouble value) 223 { 224 projectionTolerance_ = value; 225 } 226 /// diagonalPerturbation 227 inline CoinWorkDouble diagonalPerturbation() const 228 { 229 return diagonalPerturbation_; 230 } 231 inline void setDiagonalPerturbation(CoinWorkDouble value) 232 { 233 diagonalPerturbation_ = value; 234 } 235 /// gamma 236 inline CoinWorkDouble gamma() const 237 { 238 return gamma_; 239 } 240 inline void setGamma(CoinWorkDouble value) 241 { 242 gamma_ = value; 243 } 244 /// delta 245 inline CoinWorkDouble delta() const 246 { 247 return delta_; 248 } 249 inline void setDelta(CoinWorkDouble value) 250 { 251 delta_ = value; 252 } 253 /// ComplementarityGap 254 inline CoinWorkDouble complementarityGap() const 255 { 256 return complementarityGap_; 257 } 258 //@} 259 260 /**@name most useful gets and sets */ 261 //@{ 262 /// Largest error on Axb 263 inline CoinWorkDouble largestPrimalError() const 264 { 265 return largestPrimalError_; 266 } 267 /// Largest error on basic duals 268 inline CoinWorkDouble largestDualError() const 269 { 270 return largestDualError_; 271 } 272 /// Maximum iterations 273 inline int maximumBarrierIterations() const 274 { 275 return maximumBarrierIterations_; 276 } 277 inline void setMaximumBarrierIterations(int value) 278 { 279 maximumBarrierIterations_ = value; 280 } 281 /// Set cholesky (and delete present one) 282 void setCholesky(ClpCholeskyBase *cholesky); 283 /// Return number fixed to see if worth presolving 284 int numberFixed() const; 285 /** fix variables interior says should be. If reallyFix false then just 263 286 set values to exact bounds */ 264 void fixFixed(bool reallyFix = true); 265 /// Primal erturbation vector 266 inline CoinWorkDouble * primalR() const { 267 return primalR_; 268 } 269 /// Dual erturbation vector 270 inline CoinWorkDouble * dualR() const { 271 return dualR_; 272 } 273 //@} 287 void fixFixed(bool reallyFix = true); 288 /// Primal erturbation vector 289 inline CoinWorkDouble *primalR() const 290 { 291 return primalR_; 292 } 293 /// Dual erturbation vector 294 inline CoinWorkDouble *dualR() const 295 { 296 return dualR_; 297 } 298 //@} 274 299 275 300 protected: 276 277 278 279 280 281 void gutsOfCopy(const ClpInterior &rhs);282 283 284 285 286 287 288 289 301 /**@name protected methods */ 302 //@{ 303 /// Does most of deletion 304 void gutsOfDelete(); 305 /// Does most of copying 306 void gutsOfCopy(const ClpInterior &rhs); 307 /// Returns true if data looks okay, false if not 308 bool createWorkingData(); 309 void deleteWorkingData(); 310 /// Sanity check on input rim data 311 bool sanityCheck(); 312 /// This does housekeeping 313 int housekeeping(); 314 //@} 290 315 public: 291 /**@name public methods */ 292 //@{ 293 /// Raw objective value (so always minimize) 294 inline CoinWorkDouble rawObjectiveValue() const { 295 return objectiveValue_; 296 } 297 /// Returns 1 if sequence indicates column 298 inline int isColumn(int sequence) const { 299 return sequence < numberColumns_ ? 1 : 0; 300 } 301 /// Returns sequence number within section 302 inline int sequenceWithin(int sequence) const { 303 return sequence < numberColumns_ ? sequence : sequence  numberColumns_; 304 } 305 /// Checks solution 306 void checkSolution(); 307 /** Modifies djs to allow for quadratic. 316 /**@name public methods */ 317 //@{ 318 /// Raw objective value (so always minimize) 319 inline CoinWorkDouble rawObjectiveValue() const 320 { 321 return objectiveValue_; 322 } 323 /// Returns 1 if sequence indicates column 324 inline int isColumn(int sequence) const 325 { 326 return sequence < numberColumns_ ? 1 : 0; 327 } 328 /// Returns sequence number within section 329 inline int sequenceWithin(int sequence) const 330 { 331 return sequence < numberColumns_ ? sequence : sequence  numberColumns_; 332 } 333 /// Checks solution 334 void checkSolution(); 335 /** Modifies djs to allow for quadratic. 308 336 returns quadratic offset */ 309 CoinWorkDouble quadraticDjs(CoinWorkDouble * djRegion, const CoinWorkDouble * solution, 310 CoinWorkDouble scaleFactor); 311 312 /// To say a variable is fixed 313 inline void setFixed( int sequence) { 314 status_[sequence] = static_cast<unsigned char>(status_[sequence]  1) ; 315 } 316 inline void clearFixed( int sequence) { 317 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~1) ; 318 } 319 inline bool fixed(int sequence) const { 320 return ((status_[sequence] & 1) != 0); 321 } 322 323 /// To flag a variable 324 inline void setFlagged( int sequence) { 325 status_[sequence] = static_cast<unsigned char>(status_[sequence]  2) ; 326 } 327 inline void clearFlagged( int sequence) { 328 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~2) ; 329 } 330 inline bool flagged(int sequence) const { 331 return ((status_[sequence] & 2) != 0); 332 } 333 334 /// To say a variable is fixed OR free 335 inline void setFixedOrFree( int sequence) { 336 status_[sequence] = static_cast<unsigned char>(status_[sequence]  4) ; 337 } 338 inline void clearFixedOrFree( int sequence) { 339 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~4) ; 340 } 341 inline bool fixedOrFree(int sequence) const { 342 return ((status_[sequence] & 4) != 0); 343 } 344 345 /// To say a variable has lower bound 346 inline void setLowerBound( int sequence) { 347 status_[sequence] = static_cast<unsigned char>(status_[sequence]  8) ; 348 } 349 inline void clearLowerBound( int sequence) { 350 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~8) ; 351 } 352 inline bool lowerBound(int sequence) const { 353 return ((status_[sequence] & 8) != 0); 354 } 355 356 /// To say a variable has upper bound 357 inline void setUpperBound( int sequence) { 358 status_[sequence] = static_cast<unsigned char>(status_[sequence]  16) ; 359 } 360 inline void clearUpperBound( int sequence) { 361 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~16) ; 362 } 363 inline bool upperBound(int sequence) const { 364 return ((status_[sequence] & 16) != 0); 365 } 366 367 /// To say a variable has fake lower bound 368 inline void setFakeLower( int sequence) { 369 status_[sequence] = static_cast<unsigned char>(status_[sequence]  32) ; 370 } 371 inline void clearFakeLower( int sequence) { 372 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32) ; 373 } 374 inline bool fakeLower(int sequence) const { 375 return ((status_[sequence] & 32) != 0); 376 } 377 378 /// To say a variable has fake upper bound 379 inline void setFakeUpper( int sequence) { 380 status_[sequence] = static_cast<unsigned char>(status_[sequence]  64) ; 381 } 382 inline void clearFakeUpper( int sequence) { 383 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64) ; 384 } 385 inline bool fakeUpper(int sequence) const { 386 return ((status_[sequence] & 64) != 0); 387 } 388 //@} 389 390 ////////////////// data ////////////////// 337 CoinWorkDouble quadraticDjs(CoinWorkDouble *djRegion, const CoinWorkDouble *solution, 338 CoinWorkDouble scaleFactor); 339 340 /// To say a variable is fixed 341 inline void setFixed(int sequence) 342 { 343 status_[sequence] = static_cast< unsigned char >(status_[sequence]  1); 344 } 345 inline void clearFixed(int sequence) 346 { 347 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~1); 348 } 349 inline bool fixed(int sequence) const 350 { 351 return ((status_[sequence] & 1) != 0); 352 } 353 354 /// To flag a variable 355 inline void setFlagged(int sequence) 356 { 357 status_[sequence] = static_cast< unsigned char >(status_[sequence]  2); 358 } 359 inline void clearFlagged(int sequence) 360 { 361 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~2); 362 } 363 inline bool flagged(int sequence) const 364 { 365 return ((status_[sequence] & 2) != 0); 366 } 367 368 /// To say a variable is fixed OR free 369 inline void setFixedOrFree(int sequence) 370 { 371 status_[sequence] = static_cast< unsigned char >(status_[sequence]  4); 372 } 373 inline void clearFixedOrFree(int sequence) 374 { 375 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~4); 376 } 377 inline bool fixedOrFree(int sequence) const 378 { 379 return ((status_[sequence] & 4) != 0); 380 } 381 382 /// To say a variable has lower bound 383 inline void setLowerBound(int sequence) 384 { 385 status_[sequence] = static_cast< unsigned char >(status_[sequence]  8); 386 } 387 inline void clearLowerBound(int sequence) 388 { 389 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~8); 390 } 391 inline bool lowerBound(int sequence) const 392 { 393 return ((status_[sequence] & 8) != 0); 394 } 395 396 /// To say a variable has upper bound 397 inline void setUpperBound(int sequence) 398 { 399 status_[sequence] = static_cast< unsigned char >(status_[sequence]  16); 400 } 401 inline void clearUpperBound(int sequence) 402 { 403 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~16); 404 } 405 inline bool upperBound(int sequence) const 406 { 407 return ((status_[sequence] & 16) != 0); 408 } 409 410 /// To say a variable has fake lower bound 411 inline void setFakeLower(int sequence) 412 { 413 status_[sequence] = static_cast< unsigned char >(status_[sequence]  32); 414 } 415 inline void clearFakeLower(int sequence) 416 { 417 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~32); 418 } 419 inline bool fakeLower(int sequence) const 420 { 421 return ((status_[sequence] & 32) != 0); 422 } 423 424 /// To say a variable has fake upper bound 425 inline void setFakeUpper(int sequence) 426 { 427 status_[sequence] = static_cast< unsigned char >(status_[sequence]  64); 428 } 429 inline void clearFakeUpper(int sequence) 430 { 431 status_[sequence] = static_cast< unsigned char >(status_[sequence] & ~64); 432 } 433 inline bool fakeUpper(int sequence) const 434 { 435 return ((status_[sequence] & 64) != 0); 436 } 437 //@} 438 439 ////////////////// data ////////////////// 391 440 protected: 392 393 /**@name data. Many arrays have a row part and a column part. 441 /**@name data. Many arrays have a row part and a column part. 394 442 There is a single array with both  columns then rows and 395 443 then normally two arrays pointing to rows and columns. The 396 444 single array is the owner of memory 397 445 */ 398 399 400 401 402 403 404 405 406 407 408 409 446 //@{ 447 /// Largest error on Axb 448 CoinWorkDouble largestPrimalError_; 449 /// Largest error on basic duals 450 CoinWorkDouble largestDualError_; 451 /// Sum of dual infeasibilities 452 CoinWorkDouble sumDualInfeasibilities_; 453 /// Sum of primal infeasibilities 454 CoinWorkDouble sumPrimalInfeasibilities_; 455 /// Worst complementarity 456 CoinWorkDouble worstComplementarity_; 457 /// 410 458 public: 411 CoinWorkDouble xsize_; 412 CoinWorkDouble zsize_; 459 CoinWorkDouble xsize_; 460 CoinWorkDouble zsize_; 461 413 462 protected: 414 /// Working copy of lower bounds (Owner of arrays below) 415 CoinWorkDouble * lower_; 416 /// Row lower bounds  working copy 417 CoinWorkDouble * rowLowerWork_; 418 /// Column lower bounds  working copy 419 CoinWorkDouble * columnLowerWork_; 420 /// Working copy of upper bounds (Owner of arrays below) 421 CoinWorkDouble * upper_; 422 /// Row upper bounds  working copy 423 CoinWorkDouble * rowUpperWork_; 424 /// Column upper bounds  working copy 425 CoinWorkDouble * columnUpperWork_; 426 /// Working copy of objective 427 CoinWorkDouble * cost_; 463 /// Working copy of lower bounds (Owner of arrays below) 464 CoinWorkDouble *lower_; 465 /// Row lower bounds  working copy 466 CoinWorkDouble *rowLowerWork_; 467 /// Column lower bounds  working copy 468 CoinWorkDouble *columnLowerWork_; 469 /// Working copy of upper bounds (Owner of arrays below) 470 CoinWorkDouble *upper_; 471 /// Row upper bounds  working copy 472 CoinWorkDouble *rowUpperWork_; 473 /// Column upper bounds  working copy 474 CoinWorkDouble *columnUpperWork_; 475 /// Working copy of objective 476 CoinWorkDouble *cost_; 477 428 478 public: 429 /// Rhs 430 CoinWorkDouble * rhs_; 431 CoinWorkDouble * x_; 432 CoinWorkDouble * y_; 433 CoinWorkDouble * dj_; 479 /// Rhs 480 CoinWorkDouble *rhs_; 481 CoinWorkDouble *x_; 482 CoinWorkDouble *y_; 483 CoinWorkDouble *dj_; 484 434 485 protected: 435 436 ClpLsqr *lsqrObject_;437 438 ClpPdcoBase *pdcoStuff_;439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 486 /// Pointer to Lsqr object 487 ClpLsqr *lsqrObject_; 488 /// Pointer to stuff 489 ClpPdcoBase *pdcoStuff_; 490 /// Below here is standard barrier stuff 491 /// mu. 492 CoinWorkDouble mu_; 493 /// objectiveNorm. 494 CoinWorkDouble objectiveNorm_; 495 /// rhsNorm. 496 CoinWorkDouble rhsNorm_; 497 /// solutionNorm. 498 CoinWorkDouble solutionNorm_; 499 /// dualObjective. 500 CoinWorkDouble dualObjective_; 501 /// primalObjective. 502 CoinWorkDouble primalObjective_; 503 /// diagonalNorm. 504 CoinWorkDouble diagonalNorm_; 505 /// stepLength 506 CoinWorkDouble stepLength_; 507 /// linearPerturbation 508 CoinWorkDouble linearPerturbation_; 509 /// diagonalPerturbation 510 CoinWorkDouble diagonalPerturbation_; 511 // gamma from Saunders and Tomlin regularized 512 CoinWorkDouble gamma_; 513 // delta from Saunders and Tomlin regularized 514 CoinWorkDouble delta_; 515 /// targetGap 516 CoinWorkDouble targetGap_; 517 /// projectionTolerance 518 CoinWorkDouble projectionTolerance_; 519 /// maximumRHSError. maximum Ax 520 CoinWorkDouble maximumRHSError_; 521 /// maximumBoundInfeasibility. 522 CoinWorkDouble maximumBoundInfeasibility_; 523 /// maximumDualError. 524 CoinWorkDouble maximumDualError_; 525 /// diagonalScaleFactor. 526 CoinWorkDouble diagonalScaleFactor_; 527 /// scaleFactor. For scaling objective 528 CoinWorkDouble scaleFactor_; 529 /// actualPrimalStep 530 CoinWorkDouble actualPrimalStep_; 531 /// actualDualStep 532 CoinWorkDouble actualDualStep_; 533 /// smallestInfeasibility 534 CoinWorkDouble smallestInfeasibility_; 535 /// historyInfeasibility. 485 536 #define LENGTH_HISTORY 5 486 487 488 489 490 491 492 493 494 495 496 CoinWorkDouble *errorRegion_;497 498 CoinWorkDouble *rhsFixRegion_;499 500 CoinWorkDouble *upperSlack_;501 502 CoinWorkDouble *lowerSlack_;503 504 CoinWorkDouble *diagonal_;505 506 CoinWorkDouble *solution_;507 508 CoinWorkDouble *workArray_;509 510 CoinWorkDouble *deltaX_;511 512 CoinWorkDouble *deltaY_;513 514 CoinWorkDouble *deltaZ_;515 516 CoinWorkDouble *deltaW_;517 518 CoinWorkDouble *deltaSU_;519 CoinWorkDouble *deltaSL_;520 521 CoinWorkDouble *primalR_;522 523 CoinWorkDouble *dualR_;524 525 CoinWorkDouble *rhsB_;526 527 CoinWorkDouble *rhsU_;528 529 CoinWorkDouble *rhsL_;530 531 CoinWorkDouble *rhsZ_;532 533 CoinWorkDouble *rhsW_;534 535 CoinWorkDouble *rhsC_;536 537 CoinWorkDouble *zVec_;538 539 CoinWorkDouble *wVec_;540 541 ClpCholeskyBase *cholesky_;542 543 544 545 546 547 548 549 550 551 552 553 554 537 CoinWorkDouble historyInfeasibility_[LENGTH_HISTORY]; 538 /// complementarityGap. 539 CoinWorkDouble complementarityGap_; 540 /// baseObjectiveNorm 541 CoinWorkDouble baseObjectiveNorm_; 542 /// worstDirectionAccuracy 543 CoinWorkDouble worstDirectionAccuracy_; 544 /// maximumRHSChange 545 CoinWorkDouble maximumRHSChange_; 546 /// errorRegion. i.e. Ax 547 CoinWorkDouble *errorRegion_; 548 /// rhsFixRegion. 549 CoinWorkDouble *rhsFixRegion_; 550 /// upperSlack 551 CoinWorkDouble *upperSlack_; 552 /// lowerSlack 553 CoinWorkDouble *lowerSlack_; 554 /// diagonal 555 CoinWorkDouble *diagonal_; 556 /// solution 557 CoinWorkDouble *solution_; 558 /// work array 559 CoinWorkDouble *workArray_; 560 /// delta X 561 CoinWorkDouble *deltaX_; 562 /// delta Y 563 CoinWorkDouble *deltaY_; 564 /// deltaZ. 565 CoinWorkDouble *deltaZ_; 566 /// deltaW. 567 CoinWorkDouble *deltaW_; 568 /// deltaS. 569 CoinWorkDouble *deltaSU_; 570 CoinWorkDouble *deltaSL_; 571 /// Primal regularization array 572 CoinWorkDouble *primalR_; 573 /// Dual regularization array 574 CoinWorkDouble *dualR_; 575 /// rhs B 576 CoinWorkDouble *rhsB_; 577 /// rhsU. 578 CoinWorkDouble *rhsU_; 579 /// rhsL. 580 CoinWorkDouble *rhsL_; 581 /// rhsZ. 582 CoinWorkDouble *rhsZ_; 583 /// rhsW. 584 CoinWorkDouble *rhsW_; 585 /// rhs C 586 CoinWorkDouble *rhsC_; 587 /// zVec 588 CoinWorkDouble *zVec_; 589 /// wVec 590 CoinWorkDouble *wVec_; 591 /// cholesky. 592 ClpCholeskyBase *cholesky_; 593 /// numberComplementarityPairs i.e. ones with lower and/or upper bounds (not fixed) 594 int numberComplementarityPairs_; 595 /// numberComplementarityItems_ i.e. number of active bounds 596 int numberComplementarityItems_; 597 /// Maximum iterations 598 int maximumBarrierIterations_; 599 /// gonePrimalFeasible. 600 bool gonePrimalFeasible_; 601 /// goneDualFeasible. 602 bool goneDualFeasible_; 603 /// Which algorithm being used 604 int algorithm_; 605 //@} 555 606 }; 556 607 //############################################################################# … … 563 614 It also does some testing of ClpFactorization class 564 615 */ 565 void 566 ClpInteriorUnitTest(const std::string & mpsDir, 567 const std::string & netlibDir); 568 616 void ClpInteriorUnitTest(const std::string &mpsDir, 617 const std::string &netlibDir); 569 618 570 619 #endif 620 621 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 622 */
Note: See TracChangeset
for help on using the changeset viewer.