00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _CSP_DECOMPOSITIONS_IDC_H
00025 #define _CSP_DECOMPOSITIONS_IDC_H
00026
00027
00028 CSP_NAMESPACE_BEGIN(csp);
00029 CSP_NAMESPACE_BEGIN(decompositions);
00030
00031
00032 #define IDC_DEFAULT_CHOICE_FACTOR 1.08
00033
00034
00052 class CSP_API IDC :
00053 public Decomposition
00054 {
00055 public:
00069 IDC(Problem& problem,
00070 Filter& filter,
00071 Retraction& retraction,
00072 Randomizer& randomizer,
00073 double choiceFactor = IDC_DEFAULT_CHOICE_FACTOR) :
00074 Decomposition(
00075 L"Inferred Disjunctive Constraints",
00076 L"IDC",
00077 problem,
00078 filter,
00079 retraction,
00080 randomizer),
00081 m_mcExtension(false),
00082 m_choiceFactor(choiceFactor) {}
00083
00084 protected:
00096 IDC(const wstring& fullName,
00097 const wstring& shortName,
00098 Problem& problem,
00099 Filter& filter,
00100 Retraction& retraction,
00101 Randomizer& randomizer,
00102 double choiceFactor = IDC_DEFAULT_CHOICE_FACTOR) :
00103 Decomposition(
00104 fullName,
00105 shortName,
00106 problem,
00107 filter,
00108 retraction,
00109 randomizer),
00110 m_mcExtension(false),
00111 m_choiceFactor(choiceFactor) {}
00112
00114 bool m_mcExtension;
00115
00117 double m_choiceFactor;
00118
00119 private:
00121 IDC(const IDC&);
00122
00124 IDC& operator=(const IDC&);
00125
00126
00127
00128
00129
00130
00131 long double subproblemSize(const vlist_type& vlist);
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 long double diffSize(Variable& variable, long double remainderSize);
00143
00144 virtual void decompose();
00145 };
00146
00147
00148 CSP_NAMESPACE_END(decompositions);
00149 CSP_NAMESPACE_END(csp);
00150
00151
00152 #endif // _CSP_DECOMPOSITIONS_IDC_H
00153
00154
00155
00156