Changes from stable/2.8/Cbc/src/CbcSimpleIntegerDynamicPseudoCost.hpp at r1902 to trunk/Cbc/src/CbcSimpleIntegerDynamicPseudoCost.hpp at r2094
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcSimpleIntegerDynamicPseudoCost.hpp
r1902 r2094 72 72 73 73 /// Fills in a created branching object 74 void fillCreateBranch(CbcIntegerBranchingObject * branching, const OsiBranchingInformation * info, int way) ;74 // void fillCreateBranch(CbcIntegerBranchingObject * branching, const OsiBranchingInformation * info, int way) ; 75 75 76 76 … … 250 250 } 251 251 252 /// Number times branched 253 inline int numberTimesBranched() const { 254 return numberTimesDown_ + numberTimesUp_; 255 } 252 256 /// Down number times infeasible 253 257 inline int numberTimesDownInfeasible() const { … … 462 466 double changeInGuessed_; 463 467 }; 468 #ifdef SWITCH_VARIABLES 469 /** Define a single integer class but with associated switched variable 470 So Binary variable switches on/off a continuous variable 471 designed for badly scaled problems 472 */ 473 474 475 class CbcSwitchingBinary : public CbcSimpleIntegerDynamicPseudoCost { 476 477 public: 478 479 // Default Constructor 480 CbcSwitchingBinary (); 481 482 // Useful constructor 483 CbcSwitchingBinary (CbcSimpleIntegerDynamicPseudoCost * oldObject, 484 int nOdd,const int * other, const int * otherRow); 485 486 487 // Copy constructor 488 CbcSwitchingBinary ( const CbcSwitchingBinary &); 489 490 /// Clone 491 virtual CbcObject * clone() const; 492 493 // Assignment operator 494 CbcSwitchingBinary & operator=( const CbcSwitchingBinary& rhs); 495 496 // Destructor 497 virtual ~CbcSwitchingBinary (); 498 499 /// Add in zero switches 500 void addZeroSwitches(int nAdd,const int * columns); 501 /// Infeasibility  large is 0.5 502 virtual double infeasibility(const OsiBranchingInformation * info, 503 int &preferredWay) const; 504 505 /// Same  returns true if contents match(ish) 506 bool same(const CbcSwitchingBinary * obj) const; 507 /// Set associated bounds 508 virtual int setAssociatedBounds(OsiSolverInterface * solver=NULL, 509 int cleanBasis=0) const; 510 /// Check associated bounds 511 int checkAssociatedBounds(const OsiSolverInterface * solver,const double * solution, 512 int printLevel, int state[3], int & nBadFixed) const; 513 /// Lower bound when binary zero 514 inline const double * zeroLowerBound() const 515 { return zeroLowerBound_; } 516 /// Lower bound when binary one 517 inline const double * oneLowerBound() const 518 { return oneLowerBound_; } 519 /// Upper bound when binary zero 520 inline const double * zeroUpperBound() const 521 { return zeroUpperBound_; } 522 /// Upper bound when binary one 523 inline const double * oneUpperBound() const 524 { return oneUpperBound_; } 525 /** Continuous variable  526 */ 527 inline const int * otherVariable() const 528 { return otherVariable_;} 529 /// Number of other variables 530 inline int numberOther() const 531 { return numberOther_;} 532 /** Type 533 1  single switch 534 2  double switch 535 3  both 536 */ 537 inline int type() const 538 { return type_;} 539 protected: 540 /// data 541 542 /// Lower bound when binary zero 543 double * zeroLowerBound_; 544 /// Lower bound when binary one 545 double * oneLowerBound_; 546 /// Upper bound when binary zero 547 double * zeroUpperBound_; 548 /// Upper bound when binary one 549 double * oneUpperBound_; 550 /** Continuous variable  551 */ 552 int * otherVariable_; 553 /// Number of other variables 554 int numberOther_; 555 /** Type 556 1  single switch 557 2  double switch 558 3  both 559 */ 560 int type_; 561 }; 464 562 #endif 465 563 #endif 564
Note: See TracChangeset
for help on using the changeset viewer.