Cbc 2.10.5
Loading...
Searching...
No Matches
CbcBranchToFixLots.hpp
Go to the documentation of this file.
1// $Id$
2// Copyright (C) 2004, International Business Machines
3// Corporation and others. All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
6// Edwin 11/13/2009-- carved out of CbcBranchCut
7
8#ifndef CbcBranchToFixLots_H
9#define CbcBranchToFixLots_H
10
11#include "CbcBranchCut.hpp"
12#include "CbcBranchBase.hpp"
13#include "OsiRowCut.hpp"
14#include "CoinPackedMatrix.hpp"
15
23
24public:
25 // Default Constructor
27
34 CbcBranchToFixLots(CbcModel *model, double djTolerance,
35 double fractionFixed, int depth,
36 int numberClean = 0,
37 const char *mark = NULL,
38 bool alwaysCreate = false);
39
40 // Copy constructor
42
44 virtual CbcObject *clone() const;
45
46 // Assignment operator
48
49 // Destructor
51
56 int shallWe() const;
57
59 virtual double infeasibility(const OsiBranchingInformation *info,
60 int &preferredWay) const;
63 virtual bool canDoHeuristics() const
64 {
65 return true;
66 }
67
69 virtual CbcBranchingObject *createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way);
71 virtual void redoSequenceEtc(CbcModel *model, int numberColumns, const int *originalColumns);
72
73protected:
75
81 char *mark_;
83 CoinPackedMatrix matrixByRow_;
85 int depth_;
90};
91#endif
92
93/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
94*/
Define a cut branching class.
Define a branch class that branches so that one way variables are fixed while the other way cuts off ...
CoinPackedMatrix matrixByRow_
Matrix by row.
int shallWe() const
Does a lot of the work, Returns 0 if no good, 1 if dj, 2 if clean, 3 if both FIXME: should use enum o...
double fractionFixed_
We only need to make sure this fraction fixed.
char * mark_
Never fix ones marked here.
int depth_
Do if depth multiple of this.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility for an integer variable - large is 0.5, but also can be infinity when known infeasible.
bool alwaysCreate_
If true then always create branch.
virtual void redoSequenceEtc(CbcModel *model, int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
virtual CbcObject * clone() const
Clone.
CbcBranchToFixLots & operator=(const CbcBranchToFixLots &rhs)
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
int numberClean_
number of ==1 rows which need to be clean
CbcBranchToFixLots(CbcModel *model, double djTolerance, double fractionFixed, int depth, int numberClean=0, const char *mark=NULL, bool alwaysCreate=false)
Useful constructor - passed reduced cost tolerance and fraction we would like fixed.
CbcBranchToFixLots(const CbcBranchToFixLots &)
Abstract branching object base class Now just difference with OsiBranchingObject.
Simple Branch and bound class.
Definition CbcModel.hpp:100
CbcModel * model() const
Return model.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.