Go to the documentation of this file.
8 #ifndef CbcSimpleIntegerDynamicPseudoCost_H
9 #define CbcSimpleIntegerDynamicPseudoCost_H
14 #define MINIMUM_MOVEMENT 0.1
20 #define WEIGHT_AFTER 0.8
21 #define WEIGHT_BEFORE 0.1
23 #define WEIGHT_PRODUCT
63 virtual double infeasibility(
const OsiBranchingInformation *info,
85 virtual void updateAfter(
const OsiObject *rhs,
const OsiObject *baseObject);
87 void updateAfterMini(
int numberDown,
int numberDownInfeasible,
double sumDown,
88 int numberUp,
int numberUpInfeasible,
double sumUp);
356 void print(
int type = 0,
double value = 0.0)
const;
447 int way,
double value);
457 double lowerValue,
double upperValue);
509 #ifdef SWITCH_VARIABLES
519 CbcSwitchingBinary();
523 int nOdd,
const int *other,
const int *otherRow);
526 CbcSwitchingBinary(
const CbcSwitchingBinary &);
532 CbcSwitchingBinary &
operator=(
const CbcSwitchingBinary &rhs);
535 virtual ~CbcSwitchingBinary();
538 void addZeroSwitches(
int nAdd,
const int *columns);
540 virtual double infeasibility(
const OsiBranchingInformation *info,
541 int &preferredWay)
const;
544 bool same(
const CbcSwitchingBinary *obj)
const;
546 virtual int setAssociatedBounds(OsiSolverInterface *solver = NULL,
547 int cleanBasis = 0)
const;
549 int checkAssociatedBounds(
const OsiSolverInterface *solver,
const double *solution,
550 int printLevel,
int state[3],
int &nBadFixed)
const;
552 inline const double *zeroLowerBound()
const
554 return zeroLowerBound_;
557 inline const double *oneLowerBound()
const
559 return oneLowerBound_;
562 inline const double *zeroUpperBound()
const
564 return zeroUpperBound_;
567 inline const double *oneUpperBound()
const
569 return oneUpperBound_;
573 inline const int *otherVariable()
const
575 return otherVariable_;
578 inline int numberOther()
const
587 inline int type()
const
596 double *zeroLowerBound_;
598 double *oneLowerBound_;
600 double *zeroUpperBound_;
602 double *oneUpperBound_;
virtual OsiSolverBranch * solverBranch() const
Create an OsiSolverBranch object.
void setNumberTimesDownInfeasible(int value)
Set down number times infeasible.
int numberTimesUp_
Number of times we have gone up.
int way() const
Get the state of the branching object.
void setProbingInformation(int fixedDown, int fixedUp)
Pass in probing information.
int variable() const
Index identifying the associated CbcObject within its class.
int method() const
method - see below for details
double sumDownCost_
Sum down cost from strong or actual.
double upDynamicPseudoCost_
Up pseudo cost.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
CbcIntegerPseudoCostBranchingObject()
Default constructor.
Define a single integer class but with dynamic pseudo costs.
int numberTimesUpLocalFixed_
Number of local probing fixings going up.
void setUpInformation(double changeObjectiveUp, int changeInfeasibilityUp)
Pass in information on a up branch.
CbcSimpleIntegerDynamicPseudoCost & operator=(const CbcSimpleIntegerDynamicPseudoCost &rhs)
void addToSumDownCost(double value)
Add to down sum cost and set last and square.
int lastUpDecrease_
Last up decrease number infeasibilities from strong (i.e. as computed by last strong)
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
int numberBeforeTrust_
Number of branches before we trust.
virtual ~CbcIntegerPseudoCostBranchingObject()
Destructor.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object,...
CbcIntegerPseudoCostBranchingObject & operator=(const CbcIntegerPseudoCostBranchingObject &rhs)
Assignment operator.
void setSumUpCost(double value)
Set up sum cost.
void setNumberTimesUpInfeasible(int value)
Set up number times infeasible.
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
int numberTimesUpInfeasible_
Number of times we have been infeasible going up.
double sumDownDecrease() const
Sum down decrease number infeasibilities from strong or actual.
int numberTimesDown_
Number of times we have gone down.
double sumDownCost() const
Down sum cost.
double upDynamicPseudoCost() const
Up pseudo cost.
void addToSumUpCost(double value)
Add to up sum cost and set last and square.
double sumDownChange() const
Down sum change.
int numberTimesDownLocalFixed_
Number of local probing fixings going down.
double numberTimesUpTotalFixed_
Number of total probing fixings going up.
void updateDownDynamicPseudoCost(double value)
Modify down pseudo cost in a slightly different way.
double upDownSeparator_
Up/down separator If >0.0 then do first branch up if value-floor(value) >= this value.
double downDynamicPseudoCost_
data
int numberTimesProbingTotal_
Number of times probing done.
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
void setDownDynamicPseudoCost(double value)
Set down pseudo cost.
int numberTimesUpInfeasible() const
Up number times infeasible.
double upShadowPrice() const
Up pseudo shadow price cost.
int numberTimesUp() const
Up number times.
virtual OsiSolverBranch * solverBranch() const
Create an OsiSolverBranch object.
virtual ~CbcSimpleIntegerDynamicPseudoCost()
double upShadowPrice_
Current pseudo-shadow price estimate up.
double lastUpCost_
Last up cost from strong (i.e. as computed by last strong)
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
int numberTimesDownInfeasible() const
Down number times infeasible.
void setUpDownSeparator(double value)
Set up down separator.
void setSumDownDecrease(double value)
Set sum down decrease number infeasibilities from strong or actual.
virtual double branch()
Sets the bounds for the variable according to the current arm of the branch and advances the object s...
double sumUpChange_
Sum of all changes to x when going up.
void setNumberBeforeTrust(int value)
Set number of times before trusted.
double sumDownChange_
Sum of all changes to x when going down.
Simple Branch and bound class.
@ SimpleIntegerDynamicPseudoCostBranchObj
double upDownSeparator() const
Up down separator.
double lastDownCost_
Last down cost from strong (i.e. as computed by last strong)
double changeInGuessed() const
Change in guessed.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
virtual double upEstimate() const
Return "up" estimate.
void addToSumUpChange(double value)
Add to up sum change and set last and square.
int method_
Number of times infeasible when tested.
virtual void updateBefore(const OsiObject *rhs)
Updates stuff like pseudocosts before threads.
void updateAfterMini(int numberDown, int numberDownInfeasible, double sumDown, int numberUp, int numberUpInfeasible, double sumUp)
Updates stuff like pseudocosts after mini branch and bound.
void incrementNumberTimesDownInfeasible()
Increment down number times infeasible.
void incrementNumberTimesUp()
Increment up number times.
void setNumberTimesUp(int value)
Set up number times.
int numberTimesDown() const
Down number times.
double sumUpCost_
Sum up cost from strong or actual.
Abstract branching object base class Now just difference with OsiBranchingObject.
virtual CbcObjectUpdateData createUpdateInformation(const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject)
Fills in a created branching object.
void setUpShadowPrice(double value)
Set up pseudo shadow price cost.
void addToSumDownDecrease(double value)
Add to sum down decrease number infeasibilities from strong or actual.
void addToSumDownChange(double value)
Add to down sum change.
virtual void updateAfter(const OsiObject *rhs, const OsiObject *baseObject)
Updates stuff like pseudocosts after threads finished.
void setUpDynamicPseudoCost(double value)
Set up pseudo cost.
int numberTimesDownInfeasible_
Number of times we have been infeasible going down.
virtual void updateInformation(const CbcObjectUpdateData &data)
Update object by CbcObjectUpdateData.
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5)
double sumUpDecrease_
Sum up decrease number infeasibilities from strong or actual.
void addToSumUpDecrease(double value)
Add to sum up decrease number infeasibilities from strong or actual.
CbcModel * model() const
Return model.
void incrementNumberTimesDown()
Increment down number times.
double numberTimesDownTotalFixed_
Number of total probing fixings going down.
double downShadowPrice_
Current pseudo-shadow price estimate down.
Simple branching object for an integer variable.
double changeInGuessed_
Change in guessed objective value for next branch.
Information required while the node is live.
void setChangeInGuessed(double value)
Set change in guessed.
void setSumUpChange(double value)
Set up sum change.
double sumUpCost() const
Up sum cost.
void print(int type=0, double value=0.0) const
Print - 0 -summary, 1 just before strong.
void copySome(const CbcSimpleIntegerDynamicPseudoCost *otherObject)
Copy some information i.e. just variable stuff.
double sumUpChange() const
Up sum change.
void setSumDownChange(double value)
Set down sum change.
void updateUpDynamicPseudoCost(double value)
Modify up pseudo cost in a slightly different way.
int numberBeforeTrust() const
Number of times before trusted.
virtual CbcObject * clone() const
Clone.
CbcSimpleIntegerDynamicPseudoCost()
void incrementNumberTimesUpInfeasible()
Increment up number times infeasible.
virtual CbcBranchingObject * clone() const
Clone.
double downDynamicPseudoCost() const
Down pseudo cost.
double downShadowPrice() const
Down pseudo shadow price cost.
Define a single integer class.
void setSumDownCost(double value)
Set down sum cost.
void setMethod(int value)
Set method.
CbcModel * model() const
Return model.
void incrementNumberBeforeTrust()
Increment number of times before trusted.
double sumUpDecrease() const
Sum up decrease number infeasibilities from strong or actual.
bool same(const CbcSimpleIntegerDynamicPseudoCost *obj) const
Same - returns true if contents match(ish)
int lastDownDecrease_
Last down decrease number infeasibilities from strong (i.e. as computed by last strong)
void setSumUpDecrease(double value)
Set sum up decrease number infeasibilities from strong or actual.
void setNumberTimesDown(int value)
Set down number times.
Simple branching object for an integer variable with pseudo costs.
void setDownShadowPrice(double value)
Set down pseudo shadow price cost.
int numberTimesBranched() const
Number times branched.
double sumDownDecrease_
Sum down decrease number infeasibilities from strong or actual.
void setDownInformation(double changeObjectiveDown, int changeInfeasibilityDown)
Pass in information on a down branch.