Blis 0.95.0
Loading...
Searching...
No Matches
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-2023, 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 "BlisConfig.h"
38#include "BlisHeuristic.h"
39
40class BlisModel;
41
42//#############################################################################
43
46 private:
48 BlisHeurRound & operator=(const BlisHeurRound& rhs);
49
50 protected:
52 CoinPackedMatrix matrix_;
53
55 CoinPackedMatrix matrixByRow_;
56
58 int seed_;
59
60 public:
63
65 BlisHeurRound(BlisModel * model, const char *name,
66 BlisHeurStrategy strategy, int freq)
67 :
68 BlisHeuristic(model, name, strategy, freq)
69 {
70 assert(model->solver());
71 }
72
75
78
80 virtual BlisHeuristic * clone() const;
81
83 virtual void setModel(BlisModel * model);
84
85 //using BlisHeuristic::searchSolution ;
91 virtual bool searchSolution(double & objectiveValue,
92 double * newSolution);
93
95 void setSeed(int value) { seed_ = value; }
96
97};
98#endif
BlisHeurStrategy
Definition Blis.h:77
Rounding Heuristic.
CoinPackedMatrix matrix_
Column majored matrix.
int seed_
Seed for random stuff.
virtual void setModel(BlisModel *model)
update model (This is needed if cliques update matrix etc).
BlisHeurRound(const BlisHeurRound &)
Copy constructor.
~BlisHeurRound()
Destructor.
BlisHeurRound(BlisModel *model, const char *name, BlisHeurStrategy strategy, int freq)
Constructor with model - assumed before cuts.
void setSeed(int value)
Set seed.
virtual BlisHeuristic * clone() const
Clone a rounding heuristic.
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...
CoinPackedMatrix matrixByRow_
Row majored matrix.
BlisHeurRound()
Default Constructor.
Heuristic base class.
virtual OsiSolverInterface * solver()
Get lp solver.
Definition BlisModel.h:450
#define BLISLIB_EXPORT
Definition config.h:5