Minotaur 0.4.1
Docs for developers
WarmStart.h
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2008 - 2025 The Minotaur Team.
5//
6
7// /**
8// \file WarmStart.h
9// \brief Define the base class WarmStart for storing the warm starting
10// information for different types of engines.
11// \author Ashutosh Mahajan, Argonne National Laboratory
12// */
13
14
15#ifndef MINOTAURWARMSTART_H
16#define MINOTAURWARMSTART_H
17
18#include "Types.h"
19
20namespace Minotaur {
21
22 class WarmStart;
23 typedef WarmStart* WarmStartPtr;
24 typedef const WarmStart* ConstWarmStartPtr;
25
26 // /**
27 // Warm starting information enables an engine to quickly resolve a problem
28 // after that has been modified.
29 //
30 // We save warm start information on all those
31 // nodes of the branch-and-bound tree whose at least one child is saved for
32 // later processing. If all the children of a node are pruned or if the node
33 // has only one child and we decide to process it next, then we don't need
34 // to save warm start information for that node.
35 //
36 // For now we save complete warm-start information on each active node. A more
37 // memory efficient method is to save warm-start information for each node
38 // by just storing the differences from the parent.
39 // However, the benefits of saving the complete information are:
40 // -# Ease of coding.
41 // -# We can delete warm-start information of a node when it is processed.
42 // Thus, we have at most `A' nodes that have warm-start information saved
43 // on them, where `A' is the total number of active nodes in the tree.
44 // */
45 class WarmStart {
46 public:
48 WarmStart() {cnt_ = 0;} ;
49
51 virtual ~WarmStart() {} ;
52
53 virtual void decrUseCnt()
54 {--cnt_;} ;
55
56 virtual int getUseCnt()
57 {return cnt_;} ;
58
61 virtual bool hasInfo() = 0;
62
63 virtual void incrUseCnt()
64 {++cnt_;} ;
65
67 virtual void write(std::ostream &out) const = 0;
68
69 protected:
76 int cnt_;
77 };
78}
79#endif
80
Declare important 'types' used in Minotaur.
Definition: WarmStart.h:45
virtual ~WarmStart()
Destroy.
Definition: WarmStart.h:51
WarmStart()
Default constructor.
Definition: WarmStart.h:48
virtual bool hasInfo()=0
virtual void write(std::ostream &out) const =0
Write to an output stream.
int cnt_
Definition: WarmStart.h:76
Definition: ActiveNodeStore.h:20

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025