-
Notifications
You must be signed in to change notification settings - Fork 3
/
Torc.h
39 lines (30 loc) · 1.69 KB
/
Torc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using NSPACE::vec;
// A singleton which manages TorcOpenWbo's additional (w.r.t OpenWboInc) parameters and functionality
class Torc{
public:
static Torc* Instance();
void SetPolConservative(bool isConservative) { polIsConservative = isConservative; }
void SetConservativeAllVars(bool isConservativeAllVars) { conservativeUseAllVars = isConservativeAllVars; }
void SetPolOptimistic(bool isOptimistic) { polIsOptimistic = isOptimistic;}
void SetTargetVarsBumpVal(int targetVarsBumpVal) { varTargetsBumpVal = targetVarsBumpVal; }
void SetBumpRelWeights(bool isBumpRelWeights) { bumpRelWeights = isBumpRelWeights; }
void SetTargetBumpMaxRandVal(int targetVarsBumpRandVal) { varTargetsBumpMaxRandVal = targetVarsBumpRandVal; }
bool GetPolConservative() const { return polIsConservative; }
bool GetConservativeAllVars() const { return conservativeUseAllVars; }
bool GetPolOptimistic() const { return polIsOptimistic; }
int GetTargetVarsBumpVal() const { return varTargetsBumpVal; }
bool GetBumpRelWeights() const { return bumpRelWeights; }
int GetTargetBumpMaxRandVal() const { return varTargetsBumpMaxRandVal; }
int GetRandBump() const;
vec<bool>& TargetIsVarTarget() { return isVarTarget; }
private:
Torc() : polIsConservative(true), conservativeUseAllVars(true), polIsOptimistic(true), varTargetsBumpVal(113), bumpRelWeights(false), varTargetsBumpMaxRandVal(0) {}; // Private so that it can not be called
static Torc* m_pInstance;
bool polIsConservative;
bool conservativeUseAllVars;
bool polIsOptimistic;
int varTargetsBumpVal;
bool bumpRelWeights;
int varTargetsBumpMaxRandVal;
vec<bool> isVarTarget;
};