source: trunk/Cbc/src/CbcSubProblem.hpp

Last change on this file was 2465, checked in by unxusr, 5 months ago

script to format sources

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1// $Id: CbcSubProblem.hpp 2465 2019-01-03 19:26:52Z forrest $
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 CbcSubProblem_H
9#define CbcSubProblem_H
10
11#ifdef COIN_HAS_CLP
12#include "ClpSimplex.hpp"
13#include "ClpNode.hpp"
14
15/** Defines a general subproblem
16    Basis will be made more compact later
17*/
18class CoinWarmStartDiff;
19class CbcSubProblem {
20
21public:
22  /// Default constructor
23  CbcSubProblem();
24
25  /// Constructor from model
26  CbcSubProblem(const OsiSolverInterface *solver,
27    const double *lowerBefore,
28    const double *upperBefore,
29    const unsigned char *status,
30    int depth);
31
32  /// Copy constructor
33  CbcSubProblem(const CbcSubProblem &);
34
35  /// Assignment operator
36  CbcSubProblem &operator=(const CbcSubProblem &rhs);
37
38  /// Destructor
39  virtual ~CbcSubProblem();
40
41  /// Take over
42  void takeOver(CbcSubProblem &, bool cleanup);
43  /// Apply subproblem (1=bounds, 2=basis, 3=both)
44  void apply(OsiSolverInterface *model, int what = 3) const;
45
46public:
47  /// Value of objective
48  double objectiveValue_;
49  /// Sum of infeasibilities
50  double sumInfeasibilities_;
51  /// Branch value
52  double branchValue_;
53  /// Dj on branching variable at end
54  double djValue_;
55  /** Which variable (top bit if upper bound changing)
56        next bit if changing on down branch only */
57  int *variables_;
58  /// New bound
59  double *newBounds_;
60  /// Status
61  mutable CoinWarmStartBasis *status_;
62  /// Depth
63  int depth_;
64  /// Number of Extra bound changes
65  int numberChangedBounds_;
66  /// Number of infeasibilities
67  int numberInfeasibilities_;
68  /** Status 1 bit going up on first, 2 bit set first branch infeasible on second, 4 bit redundant branch,
69        bits after 256 give reason for stopping (just last node)
70        0 - solution
71        1 - infeasible
72        2 - maximum depth
73        >2 - error or max time or something
74    */
75  int problemStatus_;
76  /// Variable branched on
77  int branchVariable_;
78};
79
80#endif //COIN_HAS_CLP
81#endif
82
83/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
84*/
Note: See TracBrowser for help on using the repository browser.