source: trunk/Cbc/src/CbcSubProblem.hpp

Last change on this file was 2465, checked in by unxusr, 10 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
RevLine 
[1573]1// $Id: CbcSubProblem.hpp 2465 2019-01-03 19:26:52Z unxusr $
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
[1357]6// Edwin 11/10/2009-- carved out of CbcBranchActual
[1573]7
[1357]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:
[2464]22  /// Default constructor
23  CbcSubProblem();
[1357]24
[2464]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);
[1357]31
[2464]32  /// Copy constructor
33  CbcSubProblem(const CbcSubProblem &);
[1357]34
[2464]35  /// Assignment operator
36  CbcSubProblem &operator=(const CbcSubProblem &rhs);
[1357]37
[2464]38  /// Destructor
39  virtual ~CbcSubProblem();
[1357]40
[2464]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;
[1357]45
46public:
[2464]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)
[1357]56        next bit if changing on down branch only */
[2464]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,
[1880]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    */
[2464]75  int problemStatus_;
76  /// Variable branched on
77  int branchVariable_;
[1357]78};
79
80#endif //COIN_HAS_CLP
[1427]81#endif
[2465]82
83/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
84*/
Note: See TracBrowser for help on using the repository browser.