source: trunk/Cbc/src/CbcFixVariable.hpp @ 1899

Last change on this file since 1899 was 1899, checked in by stefan, 5 years ago

fixup svn properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1// $Id: CbcFixVariable.hpp 1899 2013-04-09 18:12:08Z stefan $
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// Edwin 11/10/2009-- carved out of CbcBranchActual
7
8#ifndef CbcFixVariable_H
9#define CbcFixVariable_H
10
11#include "CbcBranchBase.hpp"
12/** Class for consequent bounds.
13    When a variable is branched on it normally interacts with other variables by
14    means of equations.  There are cases where we want to step outside LP and do something
15    more directly e.g. fix bounds.  This class is for that.
16
17    A state of -9999 means at LB, +9999 means at UB,
18    others mean if fixed to that value.
19
20 */
21
22class CbcFixVariable : public CbcConsequence {
23
24public:
25
26    // Default Constructor
27    CbcFixVariable ();
28
29    // One useful Constructor
30    CbcFixVariable (int numberStates, const int * states, const int * numberNewLower, const int ** newLowerValue,
31                    const int ** lowerColumn,
32                    const int * numberNewUpper, const int ** newUpperValue,
33                    const int ** upperColumn);
34
35    // Copy constructor
36    CbcFixVariable ( const CbcFixVariable & rhs);
37
38    // Assignment operator
39    CbcFixVariable & operator=( const CbcFixVariable & rhs);
40
41    /// Clone
42    virtual CbcConsequence * clone() const;
43
44    /// Destructor
45    virtual ~CbcFixVariable ();
46
47    /** Apply to an LP solver.  Action depends on state
48     */
49    virtual void applyToSolver(OsiSolverInterface * solver, int state) const;
50
51protected:
52    /// Number of states
53    int numberStates_;
54    /// Values of integers for various states
55    int * states_;
56    /// Start of information for each state (setting new lower)
57    int * startLower_;
58    /// Start of information for each state (setting new upper)
59    int * startUpper_;
60    /// For each variable new bounds
61    double * newBound_;
62    /// Variable
63    int * variable_;
64};
65
66#endif
67
Note: See TracBrowser for help on using the repository browser.