- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

BlisHeurRound.h
Go to the documentation of this file.
1 /*===========================================================================*
2 * This file is part of the BiCePS Linear Integer Solver (BLIS). *
3 * *
4 * BLIS is distributed under the Eclipse Public License as part of the *
5 * COIN-OR repository (http://www.coin-or.org). *
6 * *
7 * Authors: *
8 * *
9 * Yan Xu, Lehigh University *
10 * Ted Ralphs, Lehigh University *
11 * *
12 * Conceptual Design: *
13 * *
14 * Yan Xu, Lehigh University *
15 * Ted Ralphs, Lehigh University *
16 * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17 * Matthew Saltzman, Clemson University *
18 * *
19 * *
20 * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21 * All Rights Reserved. *
22 *===========================================================================*/
23
24 //#############################################################################
25 // This file is modified from CbcHeuristic.hpp
26 //#############################################################################
27
28 #ifndef BlisHeurRound_h_
29 #define BlisHeurRound_h_
30
31 #include <string>
32 #include <vector>
33
34 #include "CoinPackedMatrix.hpp"
35 #include "OsiCuts.hpp"
36
37 #include "BlisHeuristic.h"
38
39 class BlisModel;
40
41 //#############################################################################
42
44 class BlisHeurRound : public BlisHeuristic {
45 private:
47 BlisHeurRound & operator=(const BlisHeurRound& rhs);
48
49 protected:
51 CoinPackedMatrix matrix_;
52
54 CoinPackedMatrix matrixByRow_;
55
57 int seed_;
58
59 public:
61 BlisHeurRound() {}
62
64 BlisHeurRound(BlisModel * model, const char *name,
65 BlisHeurStrategy strategy, int freq)
66 :
67 BlisHeuristic(model, name, strategy, freq)
68 {
69 assert(model->solver());
70 }
71
73 ~BlisHeurRound() {}
74
76 BlisHeurRound( const BlisHeurRound &);
77
79 virtual BlisHeuristic * clone() const;
80
82 virtual void setModel(BlisModel * model);
83
84 //using BlisHeuristic::searchSolution ;
90 virtual bool searchSolution(double & objectiveValue,
91 double * newSolution);
92
94 void setSeed(int value) { seed_ = value; }
95
96 };
97 #endif
BlisHeurStrategy
BlisHeurStrategy
Definition: Blis.h:77
BlisModel
Definition: BlisModel.h:60
CoinPackedMatrix.hpp
BlisHeurRound::seed_
int seed_
Seed for random stuff.
Definition: BlisHeurRound.h:57
BlisHeuristic
Heuristic base class.
Definition: BlisHeuristic.h:46
BlisHeurRound::matrix_
CoinPackedMatrix matrix_
Column majored matrix.
Definition: BlisHeurRound.h:51
BlisHeurRound::operator=
BlisHeurRound & operator=(const BlisHeurRound &rhs)
Illegal Assignment operator.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
BlisHeurRound::searchSolution
virtual bool searchSolution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
BlisHeurRound::~BlisHeurRound
~BlisHeurRound()
Destructor.
Definition: BlisHeurRound.h:73
BlisHeurRound::setSeed
void setSeed(int value)
Set seed.
Definition: BlisHeurRound.h:94
BlisHeurRound
Rounding Heuristic.
Definition: BlisHeurRound.h:44
BlisHeurRound::setModel
virtual void setModel(BlisModel *model)
update model (This is needed if cliques update matrix etc).
BlisHeuristic.h
BlisModel::solver
virtual OsiSolverInterface * solver()
Get lp solver.
Definition: BlisModel.h:310
BlisHeuristic::name
const char * name() const
return name of generator.
Definition: BlisHeuristic.h:177
BlisHeurRound::clone
virtual BlisHeuristic * clone() const
Clone a rounding heuristic.
BlisHeurRound::matrixByRow_
CoinPackedMatrix matrixByRow_
Row majored matrix.
Definition: BlisHeurRound.h:54
OsiCuts.hpp
BlisHeurRound::BlisHeurRound
BlisHeurRound(BlisModel *model, const char *name, BlisHeurStrategy strategy, int freq)
Constructor with model - assumed before cuts.
Definition: BlisHeurRound.h:64
BlisHeuristic::strategy
virtual int strategy()
Get/set strategy.
Definition: BlisHeuristic.h:124
BlisHeurRound::BlisHeurRound
BlisHeurRound()
Default Constructor.
Definition: BlisHeurRound.h:61