Cbc 2.10.5
Loading...
Searching...
No Matches
CbcBranchUser.hpp
Go to the documentation of this file.
1// $Id$
2// Copyright (C) 2002, 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#ifndef CbcBranchUser_H
7#define CbcBranchUser_H
8
9#include "CbcBranchBase.hpp"
10#include "CbcBranchActual.hpp"
11
15public:
16 // Default Constructor
18
19 // Copy constructor
21
23
25 virtual CbcBranchDecision *clone() const;
26
28 virtual void initialize(CbcModel *model);
29
37 virtual int betterBranch(CbcBranchingObject *thisOne,
38 CbcBranchingObject *bestSoFar,
39 double changeUp, int numberInfeasibilitiesUp,
40 double changeDown, int numberInfeasibilitiesDown);
41
49 virtual int
50 bestBranch(CbcBranchingObject **objects, int numberObjects, int numberUnsatisfied,
51 double *changeUp, int *numberInfeasibilitiesUp,
52 double *changeDown, int *numberInfeasibilitiesDown,
53 double objectiveValue);
54
55private:
58};
59
61
63
64public:
65 // Default Constructor
67
68 // Useful constructor - passed integer index and model index
69 CbcSimpleIntegerFixed(CbcModel *model, int iColumn, double breakEven = 0.5);
70
71 // Constructor from simple
73
74 // Copy constructor
76
78 virtual CbcObject *clone() const;
79
80 // Assignment operator
82
83 // Destructor
85
87 virtual double infeasibility(int &preferredWay) const;
88
93 //virtual CbcBranchingObject * createBranch(int way) ;
99 virtual CbcBranchingObject *createBranch(OsiSolverInterface *solver,
100 const OsiBranchingInformation *info, int way);
101
102protected:
104};
105
106#endif
Branching decision user class.
virtual int betterBranch(CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numberInfeasibilitiesUp, double changeDown, int numberInfeasibilitiesDown)
Returns nonzero if branching on first object is "better" than on second (if second NULL first wins).
virtual int bestBranch(CbcBranchingObject **objects, int numberObjects, int numberUnsatisfied, double *changeUp, int *numberInfeasibilitiesUp, double *changeDown, int *numberInfeasibilitiesDown, double objectiveValue)
Compare N branching objects.
virtual CbcBranchDecision * clone() const
Clone.
virtual ~CbcBranchUserDecision()
CbcBranchUserDecision(const CbcBranchUserDecision &)
CbcBranchUserDecision & operator=(const CbcBranchUserDecision &rhs)
Illegal Assignment operator.
virtual void initialize(CbcModel *model)
Initialize i.e. before start of choosing at a node.
Abstract branching object base class Now just difference with OsiBranchingObject.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:252
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:258
Define a single integer class where branching is forced until fixed.
virtual CbcBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcSimpleIntegerFixed(const CbcSimpleInteger &simple)
CbcSimpleIntegerFixed(const CbcSimpleIntegerFixed &)
CbcSimpleIntegerFixed & operator=(const CbcSimpleIntegerFixed &rhs)
virtual CbcObject * clone() const
Clone.
CbcSimpleIntegerFixed(CbcModel *model, int iColumn, double breakEven=0.5)
virtual double infeasibility(int &preferredWay) const
Infeasibility - large is 0.5.
Define a single integer class.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.