source: branches/sandbox/Cbc/src/CbcChooseVariable.hpp @ 1389

Last change on this file since 1389 was 1389, checked in by caphillSNL, 10 years ago

Start at adding documentation, removing magic numbers, removing dead code, etc.
Added an enum for type in classes derived from CbCBranchingObject. It's safer,
handier for debugging (inspection in a debugger), and clearly shows the relationship
between the dozen or so special numbers. Numbers are the same as they were before to
ensure no changes in correctness.

File size: 1.1 KB
Line 
1/* $Id: CbcChooseVariable.hpp 1286 2009-11-09 23:33:07Z EdwinStraver $ */
2// Copyright (C) 2002, International Business Machines
3// Corporation and others.  All Rights Reserved.
4#ifndef CbcChooseVariable_H
5#define CbcChooseVariable_H
6
7/*  These can be alternative strategies for choosing variables
8    Any descendant can be passed in by setVariableChoice
9*/
10
11// FIXME: Do we want to define UP and DOWN constants (1 and -1) for clarity?
12class CbcChooseVariable {
13public:
14    // Default Constructor
15    CbcChooseVariable () {}
16
17    virtual ~CbcChooseVariable() {}
18    /** If strong branching, then only those passed in (and movement is that length)
19        .  If not strong
20        branching then all passed in and ignore movement.
21        Returns which one chosen (or -1 if none).  way should be +1
22        if branching up, -1 if down */
23    virtual int chosen (const CbcModel * model, int numberToLookAt,
24                        const int * which, const double * downMovement,
25                        const double * upMovement, const double * solution,
26                        int & way, double & value) = 0;
27
28};
29
30#endif
Note: See TracBrowser for help on using the repository browser.