#include <CglClique.hpp>
Inheritance diagram for CglClique:
Constructors and destructors | |
enum | scl_next_node_method { SCL_MIN_DEGREE, SCL_MAX_DEGREE, SCL_MAX_XJ_MAX_DEG } |
possible choices for selecting the next node in the star clique search More... | |
CglClique (bool setPacking=false, bool justOriginalRows=false) | |
Default constructor. | |
virtual | ~CglClique () |
Destructor. | |
virtual std::string | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
void | considerRows (const int numRows, const int *rowInd) |
possible choices for selecting the next node in the star clique search | |
void | setStarCliqueNextNodeMethod (scl_next_node_method method) |
possible choices for selecting the next node in the star clique search | |
void | setStarCliqueCandidateLengthThreshold (int maxlen) |
possible choices for selecting the next node in the star clique search | |
void | setRowCliqueCandidateLengthThreshold (int maxlen) |
possible choices for selecting the next node in the star clique search | |
void | setStarCliqueReport (bool yesno=true) |
possible choices for selecting the next node in the star clique search | |
void | setRowCliqueReport (bool yesno=true) |
possible choices for selecting the next node in the star clique search | |
void | setDoStarClique (bool yesno=true) |
possible choices for selecting the next node in the star clique search | |
void | setDoRowClique (bool yesno=true) |
possible choices for selecting the next node in the star clique search | |
void | setMinViolation (double minviol) |
possible choices for selecting the next node in the star clique search | |
double | getMinViolation () const |
possible choices for selecting the next node in the star clique search | |
bool | setPacking_ |
An indicator showing whether the whole matrix in the solverinterface is a set packing problem or not. | |
bool | justOriginalRows_ |
True if just look at original rows. | |
int | sp_numrows |
pieces of the set packing part of the solverinterface | |
int * | sp_orig_row_ind |
possible choices for selecting the next node in the star clique search | |
int | sp_numcols |
possible choices for selecting the next node in the star clique search | |
int * | sp_orig_col_ind |
possible choices for selecting the next node in the star clique search | |
double * | sp_colsol |
possible choices for selecting the next node in the star clique search | |
int * | sp_col_start |
possible choices for selecting the next node in the star clique search | |
int * | sp_col_ind |
possible choices for selecting the next node in the star clique search | |
int * | sp_row_start |
possible choices for selecting the next node in the star clique search | |
int * | sp_row_ind |
possible choices for selecting the next node in the star clique search | |
frac_graph | fgraph |
the intersection graph corresponding to the set packing problem | |
bool * | node_node |
the node-node incidence matrix of the intersection graph. | |
double | petol |
The primal tolerance in the solverinterface. | |
struct | frac_graph |
possible choices for selecting the next node in the star clique search | |
Public Member Functions | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const |
Generate cuts for the model data contained in si. | |
Private Member Functions | |
CglClique (const CglClique &rhs) | |
Copy constructor. | |
virtual CglCutGenerator * | clone () const |
Clone. | |
CglClique & | operator= (const CglClique &rhs) |
Assignment operator. | |
void | selectFractionalBinaries (const OsiSolverInterface &si) const |
Scan through the variables and select those that are binary and are at a fractional level. | |
void | selectFractionals (const OsiSolverInterface &si) const |
Scan through the variables and select those that are at a fractional level. | |
void | selectRowCliques (const OsiSolverInterface &si, int numOriginalRows) const |
void | createSetPackingSubMatrix (const OsiSolverInterface &si) const |
void | createFractionalGraph () const |
int | createNodeNode () const |
void | deleteSetPackingSubMatrix () const |
void | deleteFractionalGraph () const |
void | find_scl (OsiCuts &cs) const |
void | find_rcl (OsiCuts &cs) const |
int | scl_choose_next_node (const int current_nodenum, const int *current_indices, const int *current_degrees, const double *current_values) const |
void | scl_delete_node (const int del_ind, int ¤t_nodenum, int *current_indices, int *current_degrees, double *current_values) const |
int | enumerate_maximal_cliques (int &pos, bool *scl_label, OsiCuts &cs) const |
int | greedy_maximal_clique (OsiCuts &cs) const |
void | recordClique (const int len, int *indices, OsiCuts &cs) const |
Private Attributes | |
Constructors and destructors | |
bool | do_row_clique |
whether to do the row clique algorithm or not. | |
bool | do_star_clique |
whether to do the star clique algorithm or not. | |
scl_next_node_method | scl_next_node_rule |
How the next node to be added to the star clique should be selected. | |
int | scl_candidate_length_threshold |
In the star clique method the maximal length of the candidate list (those nodes that are in a star, i.e., connected to the center of the star) to allow complete enumeration of maximal cliques. | |
bool | scl_report_result |
whether to give a detailed statistics on the star clique method | |
int | rcl_candidate_length_threshold |
In the row clique method the maximal length of the candidate list (those nodes that can extend the row clique, i.e., connected to all nodes in the row clique) to allow complete enumeration of maximal cliques. | |
bool | rcl_report_result |
whether to give a detailed statistics on the row clique method | |
const int * | cl_perm_indices |
List of indices that must be in the to be created clique. | |
int | cl_perm_length |
The length of cl_perm_indices. | |
int * | cl_indices |
List of indices that should be considered for extending the ones listed in cl_perm_indices. | |
int | cl_length |
The length of cl_indices. | |
int * | cl_del_indices |
An array of nodes discarded from the candidate list. | |
int | cl_del_length |
The length of cl_del_indices. | |
Friends | |
void | CglCliqueUnitTest (const OsiSolverInterface *siP, const std::string mpdDir) |
|
possible choices for selecting the next node in the star clique search
Definition at line 58 of file CglClique.hpp. |
|
Copy constructor.
|
|
Default constructor. If the setPacking argument is set to true then CglClique will assume that the problem in the solverinterface passed to the generateCuts() method describes a set packing problem, i.e.,
Otherwise the user can use the considerRows() method to set the list of clique rows, that is,
If the user does not set the list of clique rows then CglClique will start the generateCuts() methods by scanning the matrix for them. Also justOriginalRows can be set to true to limit clique creation |
|
Destructor.
Definition at line 49 of file CglClique.hpp. |
|
Clone.
Implements CglCutGenerator. |
|
Assignment operator.
|
|
Generate cuts for the model data contained in si. The generated cuts are inserted into and returned in the collection of cuts cs. Implements CglCutGenerator. |
|
Create C++ lines to get to current state.
Reimplemented from CglCutGenerator. |
|
possible choices for selecting the next node in the star clique search
|
|
possible choices for selecting the next node in the star clique search
Definition at line 64 of file CglClique.hpp. References scl_next_node_rule. |
|
possible choices for selecting the next node in the star clique search
Definition at line 68 of file CglClique.hpp. References scl_candidate_length_threshold. |
|
possible choices for selecting the next node in the star clique search
Definition at line 71 of file CglClique.hpp. References rcl_candidate_length_threshold. |
|
possible choices for selecting the next node in the star clique search
Definition at line 75 of file CglClique.hpp. References scl_report_result. |
|
possible choices for selecting the next node in the star clique search
Definition at line 76 of file CglClique.hpp. References rcl_report_result. |
|
possible choices for selecting the next node in the star clique search
Definition at line 78 of file CglClique.hpp. References do_star_clique. |
|
possible choices for selecting the next node in the star clique search
Definition at line 79 of file CglClique.hpp. References do_row_clique. |
|
possible choices for selecting the next node in the star clique search
Definition at line 81 of file CglClique.hpp. References petol. |
|
possible choices for selecting the next node in the star clique search
Definition at line 82 of file CglClique.hpp. |
|
Scan through the variables and select those that are binary and are at a fractional level.
|
|
Scan through the variables and select those that are at a fractional level. We already know that everything is binary. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
possible choices for selecting the next node in the star clique search
Definition at line 87 of file CglClique.hpp. |
|
|
|
An indicator showing whether the whole matrix in the solverinterface is a set packing problem or not.
Definition at line 133 of file CglClique.hpp. |
|
True if just look at original rows.
Definition at line 135 of file CglClique.hpp. |
|
pieces of the set packing part of the solverinterface
Definition at line 137 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 138 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 139 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 140 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 141 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 142 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 143 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 144 of file CglClique.hpp. |
|
possible choices for selecting the next node in the star clique search
Definition at line 145 of file CglClique.hpp. |
|
the intersection graph corresponding to the set packing problem
Definition at line 148 of file CglClique.hpp. |
|
the node-node incidence matrix of the intersection graph.
Definition at line 150 of file CglClique.hpp. |
|
The primal tolerance in the solverinterface.
Definition at line 153 of file CglClique.hpp. Referenced by setMinViolation(). |
|
whether to do the row clique algorithm or not.
Definition at line 160 of file CglClique.hpp. Referenced by setDoRowClique(). |
|
whether to do the star clique algorithm or not.
Definition at line 162 of file CglClique.hpp. Referenced by setDoStarClique(). |
|
How the next node to be added to the star clique should be selected.
Definition at line 165 of file CglClique.hpp. Referenced by setStarCliqueNextNodeMethod(). |
|
In the star clique method the maximal length of the candidate list (those nodes that are in a star, i.e., connected to the center of the star) to allow complete enumeration of maximal cliques. Otherwise a greedy algorithm is used. Definition at line 170 of file CglClique.hpp. Referenced by setStarCliqueCandidateLengthThreshold(). |
|
whether to give a detailed statistics on the star clique method
Definition at line 172 of file CglClique.hpp. Referenced by setStarCliqueReport(). |
|
In the row clique method the maximal length of the candidate list (those nodes that can extend the row clique, i.e., connected to all nodes in the row clique) to allow complete enumeration of maximal cliques. Otherwise a greedy algorithm is used. Definition at line 178 of file CglClique.hpp. Referenced by setRowCliqueCandidateLengthThreshold(). |
|
whether to give a detailed statistics on the row clique method
Definition at line 180 of file CglClique.hpp. Referenced by setRowCliqueReport(). |
|
List of indices that must be in the to be created clique. This is just a pointer, it is never new'd and therefore does not need to be delete[]'d either. Definition at line 188 of file CglClique.hpp. |
|
The length of cl_perm_indices.
Definition at line 190 of file CglClique.hpp. |
|
List of indices that should be considered for extending the ones listed in cl_perm_indices.
Definition at line 194 of file CglClique.hpp. |
|
The length of cl_indices.
Definition at line 196 of file CglClique.hpp. |
|
An array of nodes discarded from the candidate list. These are rechecked when a maximal clique is found just to make sure that the clique is really maximal. Definition at line 201 of file CglClique.hpp. |
|
The length of cl_del_indices.
Definition at line 203 of file CglClique.hpp. |