11 #ifndef CouenneSdpCuts_hpp
12 #define CouenneSdpCuts_hpp
14 #include "CglConfig.h"
15 #include "CglCutGenerator.hpp"
17 #include "IpOptionsList.hpp"
23 class CouenneExprMatrix;
53 std::vector <CouenneExprMatrix *>
minors_;
74 virtual CglCutGenerator *
clone ()
const;
81 const CglTreeInfo = CglTreeInfo ())
82 #if CGL_VERSION_MAJOR == 0 && CGL_VERSION_MINOR <= 57
97 const OsiSolverInterface &, OsiCuts &,
98 const CglTreeInfo = CglTreeInfo ())
const;
101 int n,
int m,
const double *sol,
102 double *z,
double *
w,FILE *out)
const;
106 const double *A,
double **sparse_v_mat,
107 int *card_v_mat,
int min_nz,
int *evdec_num)
const;
109 void genSDPcut (
const OsiSolverInterface &si,
112 double *v1,
double *v2,
118 int np,
const double *A,
119 const double *vector,
int **)
const;
123 void zero_comp (
const int ind_i,
const double delta,
124 const int np,
const int *selected,
126 int *ploc_card_selected,
int *ploc_card_new_selected,
128 double *locmargin,
double *locmat,
130 const int evidx,
bool wise,
136 const int np,
const int *order,
137 const int * selected,
138 const int min_card_new_selected,
139 const double min_delta,
const int start_point,
142 int *ploc_card_selected,
143 int *ploc_card_new_selected,
145 double *locmargin,
double *locmat,
148 const int evidx,
bool wise,
double *recomp_gap,
double *
threshold,
149 int *evdec_num)
const;
152 const int *loc_selected,
153 const int loc_card_selected,
155 const int init_card_selected,
int *has_init_vect,
156 int *selected,
int *pcard_selected,
158 double **sparse_v_mat,
159 int *pcard_v_mat)
const;
162 double *v,
double* margin,
163 double *A,
double *lhs,
const int *zeroed,
164 int evidx,
bool decompose,
int *evdec_num)
const;
167 const int evidx,
const double eigen_val,
168 const double *v,
const int n,
169 const double *sol,
double **sparse_v_mat,
171 int *evdec_num)
const;
CouenneProblem * problem_
pointer to problem info
void sparsify(bool sparsify_new, const int evidx, const double eigen_val, const double *v, const int n, const double *sol, double **sparse_v_mat, int *card_v_mat, int *evdec_num) const
void genSDPcut(const OsiSolverInterface &si, OsiCuts &cs, CouenneExprMatrix *XX, double *v1, double *v2, int **) const
These are cuts of the form.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Add list of options to be read from file.
bool fillMissingTerms_
If minor not fully dense, create fictitious auxiliary variables that will be used in sdp cuts only (t...
void zero_unified(enum zero_type type, const int np, const int *order, const int *selected, const int min_card_new_selected, const double min_delta, const int start_point, const int curr_i, int *loc_selected, int *ploc_card_selected, int *ploc_card_new_selected, double *ploc_lhs, double *locmargin, double *locmat, int *pnchanged, double *locv, const int evidx, bool wise, double *recomp_gap, double *threshold, int *evdec_num) const
virtual CglCutGenerator * clone() const
Cloning constructor.
const bool doNotUse() const
CouenneSdpCuts(CouenneProblem *, JnlstPtr, const Ipopt::SmartPtr< Ipopt::OptionsList >)
Constructor.
void compareSparsify(const OsiSolverInterface &si, int n, int m, const double *sol, double *z, double *w, FILE *out) const
bool useSparsity_
Sparsify eigenvalues before writing inequality (default: no)
void genCutSingle(CouenneExprMatrix *const &, const OsiSolverInterface &, OsiCuts &, const CglTreeInfo=CglTreeInfo()) const
CouenneSdpCuts & operator=(const CouenneSdpCuts &)
Assignment.
void zero_comp(const int ind_i, const double delta, const int np, const int *selected, int *loc_selected, int *ploc_card_selected, int *ploc_card_new_selected, double *ploc_lhs, double *locmargin, double *locmat, double *locv, const int evidx, bool wise, int *evdec_num, double *recomp_gap, double *threshold) const
Class for MINLP problems with symbolic information.
std::vector< CouenneExprMatrix * > minors_
minors on which to apply cuts
~CouenneSdpCuts()
Destructor.
void sparsify2(const int n, const double *A, double **sparse_v_mat, int *card_v_mat, int min_nz, int *evdec_num) const
void add_v_cut(const int np, const int *loc_selected, const int loc_card_selected, const double *locv, const int init_card_selected, int *has_init_vect, int *selected, int *pcard_selected, int *pnew_selected, double **sparse_v_mat, int *pcard_v_mat) const
bool doNotUse_
after construction, true if there are enough product terms to justify application.
int numEigVec_
number of eigenvectors to be used (default: n)
void update_sparsify_structures(const int np, double *v, double *margin, double *A, double *lhs, const int *zeroed, int evidx, bool decompose, int *evdec_num) const
void additionalSDPcuts(const OsiSolverInterface &si, OsiCuts &cs, CouenneExprMatrix *minor, int np, const double *A, const double *vector, int **) const
void fint fint fint real fint real real real real real real real real * w
bool onlyNegEV_
only use negative eigenvalues (default: yes)
virtual void generateCuts(const OsiSolverInterface &, OsiCuts &, const CglTreeInfo=CglTreeInfo()) const
The main CglCutGenerator.