Cbc 2.10.11
Loading...
Searching...
No Matches
CbcBranchAllDifferent.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 CbcBranchAllDifferent_H
9#define CbcBranchAllDifferent_H
10
11#include "CbcBranchBase.hpp"
12#include "OsiRowCut.hpp"
13#include "CoinPackedMatrix.hpp"
14#include "CbcBranchCut.hpp"
15
22
23public:
24 // Default Constructor
26
29 CbcBranchAllDifferent(CbcModel *model, int number, const int *which);
30
31 // Copy constructor
33
35 virtual CbcObject *clone() const;
36
37 // Assignment operator
39
40 // Destructor
42
44 virtual double infeasibility(const OsiBranchingInformation *info,
45 int &preferredWay) const;
46
48 virtual CbcBranchingObject *createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way);
49
50protected:
52
56 int *which_;
57};
58#endif
59
60/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
61*/
Define a branch class that branches so that it is only satsified if all members have different values...
CbcBranchAllDifferent(const CbcBranchAllDifferent &)
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcBranchAllDifferent(CbcModel *model, int number, const int *which)
Useful constructor - passed set of integer variables which must all be different.
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
CbcBranchAllDifferent & operator=(const CbcBranchAllDifferent &rhs)
virtual CbcObject * clone() const
Clone.
int * which_
Which variables.
Define a cut branching class.
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.