Cgl 0.60.3
Loading...
Searching...
No Matches
CglTwomir.hpp
Go to the documentation of this file.
1// $Id$
2// Copyright (C) 2002, International Business Machines
3// Corporation and others. All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
6#ifndef CglTwomir_H
7#define CglTwomir_H
8#include <string>
9
10#include "CglCutGenerator.hpp"
11#include "CoinFactorization.hpp"
12
13typedef struct
14{
15
16 int nz; /* current length of arrays index[] and coeff[] */
17 int max_nz; /* max length of arrays index[] and coeff[] */
18 double *coeff; /* coefficient of each variable in the constraint */
19 int *index; /* index of the variable (value in 0 ... nrow+ncol) */
20 double rhs; /* rhs of the constraint */
21 char sense; /* ?? is it necessary */
22
24
25typedef struct{
26 int n;
28 int *ctype;
29 double *alpha;
31
32/******************** BASIS INFORMATION ADTs **********************************/
33typedef struct{
34 int q_min;
35 int q_max;
36 int t_min;
37 int t_max;
38 int a_max;
40} cutParams;
41
42typedef struct
43{
44 double gomory_threshold; /* factional variable must be this away from int */
45 int ncol, /* number of columns in LP */
46 nrow, /* number of constaints in LP */
47 ninteger; /* number of integer variables in LP */
48
49 int nbasic_col, /* number of basic columns in the LP */
50 nbasic_row; /* number of basic rows in the LP */
51
52 /* the following arrays are all of size (ncol+nrow) */
53 int *info; /* description of each variable (see below) */
54 double *lb; /* specifies the lower bound (if any) of each variable */
55 double *ub; /* specifies the upper bound (if any) of each variable */
56 double *x; /* current solution */
57 double *rc; /* current reduced cost */
58 double *opt_x;
59
62
63/* the following macros allow us to decode the info of the DGG_data
64 type. The encoding is as follows,
65 bit 1 : if the variable is basic or not (non-basic).
66 bit 2 : if the variable is integer or or not (rational).
67 bit 3 : if the variable is structural or not (artifical).
68 bit 4 : if the variable is non-basic and at its upper bound
69 (else if non-basic at lower bound). */
70
71#define DGG_isBasic(data,idx) ((data->info[idx])&1)
72#define DGG_isInteger(data,idx) ((data->info[idx] >> 1)&1)
73#define DGG_isStructural(data,idx) ((data->info[idx] >> 2)&1)
74#define DGG_isEqualityConstraint(data,idx) ((data->info[idx] >> 3)&1)
75#define DGG_isNonBasicAtUB(data,idx) ((data->info[idx] >> 4)&1)
76#define DGG_isNonBasicAtLB(data,idx) ((data->info[idx] >> 5)&1)
77#define DGG_isConstraintBoundedAbove(data,idx) ((data->info[idx] >> 6)&1)
78#define DGG_isConstraintBoundedBelow(data,idx) ((data->info[idx] >> 7)&1)
79
80#define DGG_setIsBasic(data,idx) ((data->info[idx]) |= 1)
81#define DGG_setIsInteger(data,idx) ((data->info[idx]) |= (1<<1))
82#define DGG_setIsStructural(data,idx) ((data->info[idx]) |= (1<<2))
83#define DGG_setEqualityConstraint(data,idx) ((data->info[idx]) |= (1<<3))
84#define DGG_setIsNonBasicAtUB(data,idx) ((data->info[idx]) |= (1<<4))
85#define DGG_setIsNonBasicAtLB(data,idx) ((data->info[idx]) |= (1<<5))
86#define DGG_setIsConstraintBoundedAbove(data,idx) ((data->info[idx]) |= (1<<6))
87#define DGG_setIsConstraintBoundedBelow(data,idx) ((data->info[idx]) |= (1<<7))
88
89class CoinWarmStartBasis;
91class CglTwomir : public CglCutGenerator {
92
93 friend void CglTwomirUnitTest(const OsiSolverInterface * siP,
94 const std::string mpdDir );
95
96
97public:
98
100 std::string probname_;
101
107 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
108 const CglTreeInfo info = CglTreeInfo());
110 virtual bool needsOptimalBasis() const;
111
115 void setMirScale (int tmin, int tmax) {t_min_ = tmin; t_max_ = tmax;}
116 void setTwomirScale (int qmin, int qmax) {q_min_ = qmin; q_max_ = qmax;}
117 void setAMax (int a) {a_max_ = a;}
118 void setMaxElements (int n) {max_elements_ = n;}
120 void setCutTypes (bool mir, bool twomir, bool tab, bool form)
121 { do_mir_ = mir; do_2mir_ = twomir; do_tab_ = tab; do_form_ = form;}
122 void setFormulationRows (int n) {form_nrows_ = n;}
123
125 int getTmin() const {return t_min_;}
126 int getTmax() const {return t_max_;}
127 int getQmin() const {return q_min_;}
128 int getQmax() const {return q_max_;}
129 int getAmax() const {return a_max_;}
130 int getMaxElements() const {return max_elements_;}
132 int getIfMir() const { return do_mir_;}
133 int getIfTwomir() const { return do_2mir_;}
134 int getIfTableau() const { return do_tab_;}
135 int getIfFormulation() const { return do_form_;}
137
143 void setAway(double value);
145 double getAway() const;
147 void setAwayAtRoot(double value);
149 double getAwayAtRoot() const;
151 virtual int maximumLengthOfCutInTree() const
152 { return max_elements_;}
154
158 void passInOriginalSolver(OsiSolverInterface * solver);
160 inline OsiSolverInterface * originalSolver() const
161 { return originalSolver_;}
163 inline void setTwomirType(int type)
164 { twomirType_=type;}
166 inline int twomirType() const
167 { return twomirType_;}
169
174
177
179 virtual CglCutGenerator * clone() const;
180
183
185 virtual ~CglTwomir ();
187 virtual std::string generateCpp( FILE * fp);
189 virtual void refreshSolver(OsiSolverInterface * solver);
191
192private:
193 // Private member data
196
197 CoinThreadRandom randomNumberGenerator_;
199 OsiSolverInterface * originalSolver_;
201 double away_;
210
211 int t_min_;
212 int t_max_;
213 int q_min_;
214 int q_max_;
215 int a_max_;
218 int form_nrows_; //number of rows on which formulation cuts will be generated
220};
221
222//#############################################################################
223
224/*
225#include <stdlib.h>
226#include <stdio.h>
227#include <stdarg.h>
228#include <math.h>
229#include <float.h>
230#include <cassert>
231#include <iostream.h>
232*/
233
234/******************** DEBUG DEFINITIONS ***************************************/
235
236#define DGG_DEBUG_DGG 1
237#define DGG_TRACE_ERRORS 0
238#define DGG_DISPLAY 0
239#define DGG_AUTO_CHECK_CUT_OFF_OPTIMAL 1
240
241/******************** CONFIGURATION DEFAULTS **********************************/
242
243#define DGG_DEFAULT_METHOD 2
244#define DGG_DEFAULT_TMIN 1
245#define DGG_DEFAULT_TMAX 1
246#define DGG_DEFAULT_TAUMIN 2
247#define DGG_DEFAULT_TAUMAX 6
248#define DGG_DEFAULT_MAX_CUTS 500
249#define DGG_DEFAULT_IMPROVEMENT_THRESH 0.001
250#define DGG_DEFAULT_NBELOW_THRESH INT_MAX
251#define DGG_DEFAULT_NROOT_ROUNDS 2
252#define DGG_DEFAULT_NEGATIVE_SCALED_TWOSTEPS 0
253#define DGG_DEFAULT_ALPHA_RULE 0
254#define DGG_DEFAULT_CUT_INC 250
255#define DGG_DEFAULT_CUT_FORM 0
256#define DGG_DEFAULT_NICEFY 0
257#define DGG_DEFAULT_ONLY_DELAYED 0
258#define DGG_DEFAULT_DELAYED_FREQ 9999999
259#define DGG_DEFAULT_LPROWS_FREQ 9999999
260#define DGG_DEFAULT_WHICH_FORMULATION_CUTS 2
261
262/******************** SOLVER CONFIGURATION DEFINITIONS ************************/
263
264#define DGG_OSI 0
265#define DGG_CPX 1
266#define DGG_QSO 2
267
268/* determines the solver to be used */
269#define DGG_SOLVER DGG_OSI
270
271/* adds checking routines to make sure solver works as expected */
272#define DGG_DEBUG_SOLVER 0
273
274/* turn off screen output from solver */
275#define DGG_SOLVER_SCREEN_FLAG 0
276
277/******************** CUT DEFINITIONS *****************************************/
278
279/* internal names for cut types */
280#define DGG_TMIR_CUT 1
281#define DGG_2STEP_CUT 2
282
283/* internal names for alpha-selection rules */
284#define DGG_ALPHA_MIN_SUM 0
285#define DGG_ALPHA_RANDOM_01 1
286#define DGG_ALPHA_RANDOM_COEFF 2
287#define DGG_ALPHA_ALL 3
288#define DGG_ALPHA_MAX_STEEP 5
289
290/******************** PRECISION & NUMERICAL ISSUES DEFINITIONS ****************/
291
292/* how steep a cut must be before adding it to the lp */
293#define DGG_MIN_STEEPNESS 1.0e-4
294#define DGG_MAX_L2NORM 1.0e7
295
296/* 0 = min steepness, 1 = max norm */
297#define DGG_NORM_CRITERIA 1
298
299/* used to define how fractional a basic-integer variable must be
300 before choosing to use it to generate a TMIR cut on.
301 OSI's default is 1.0e-7 */
302#define DGG_GOMORY_THRESH 0.005
303
304#define DGG_RHS_THRESH 0.005
305
306/* used for comparing variables to their upper bounds.
307 OSI's default is 1.0e-7.
308 We set it to 1.0e6 because e-7 seems too sensitive.
309 In fact, with e-7 the problem dsbmip.mps complains. */
310#define DGG_BOUND_THRESH 1.0e-6
311
312/* used for comparing the lhs (activity) value of a tableau row
313 with the rhs. This is only used for debugging purposes. */
314#define DGG_EQUALITY_THRESH 1.0e-5
315
316/* used for comparing a variable's lower bound to 0.0
317 and determining if we need to shift the variable */
318#define DGG_SHIFT_THRESH 1.0e-6
319
320/* used for determing how far from an integer is still an integer.
321 This value is used for comparing coefficients to integers.
322 OSI's default is 1.0e-10. */
323#define DGG_INTEGRALITY_THRESH 1.0e-10
324
325/* the min value that a coeff can have in the tableau row
326 before being set to zero. */
327#define CBC_CHECK_CUT
328#ifndef CBC_CHECK_CUT
329#define DGG_MIN_TABLEAU_COEFFICIENT 1.0e-8
330#else
331#define DGG_MIN_TABLEAU_COEFFICIENT 1.0e-12
332#endif
333
334/* smallest value rho is allowed to have for a simple 2-step MIR
335 (ie: not an extended two-step MIR) */
336#define DGG_MIN_RHO 1.0e-7
337#define DGG_MIN_ALPHA 1.0e-7
338
339/* when a slack is null: used to check if a cut is satisfied or not. */
340#define DGG_NULL_SLACK 1.0e-5
341
342/* nicefy constants */
343#define DGG_NICEFY_MIN_ABSVALUE 1.0e-13
344#define DGG_NICEFY_MIN_FIX 1.0e-7
345#define DGG_NICEFY_MAX_PADDING 1.0e-6
346#define DGG_NICEFY_MAX_RATIO 1.0e9
347
348
349/******************** ERROR-CATCHING MACROS ***********************************/
350#if DGG_TRACE_ERRORS > 0
351
352#define __DGG_PRINT_LOC__(F) fprintf(((F==0)?stdout:F), " in %s (%s:%d)\n", __func__, __FILE__, __LINE__)
353
354#define DGG_THROW(A,REST...) {\
355 fprintf(stdout, ##REST); \
356 __DGG_PRINT_LOC__(stdout); \
357 return (A);}
358
359#define DGG_IF_EXIT(A,B,REST...) {\
360 if(A) {\
361 fprintf(stdout, ##REST); \
362 __DGG_PRINT_LOC__(stdout); \
363 exit(B);}}
364
365#define DGG_CHECKRVAL(A,B) {\
366 if(A) {\
367 __DGG_PRINT_LOC__(stdout); \
368 return B; } }
369
370#define DGG_CHECKRVAL1(A,B) {\
371 if(A) {\
372 __DGG_PRINT_LOC__(stdout); \
373 rval = B; goto CLEANUP; } }
374
375#define DGG_WARNING(A, REST...) {\
376 if(A) {\
377 fprintf(stdout, ##REST); \
378 __DGG_PRINT_LOC__(stdout); \
379 }}
380
381#define DGG_TEST(A,B,REST...) {\
382 if(A) DGG_THROW(B,##REST) }
383
384#define DGG_TEST2(A,B,C,REST) {DGG_TEST(A,B,C,REST) }
385#define DGG_TEST3(A,B,C,D,REST) {DGG_TEST(A,B,C,D,REST) }
386
387#else
388
389#define DGG_IF_EXIT(A,B,REST) {if(A) {fprintf(stdout, REST);exit(B);}}
390
391#define DGG_THROW(A,B) return(A)
392
393#define DGG_CHECKRVAL(A,B) { if(A) return(B); }
394#define DGG_CHECKRVAL1(A,B){ if(A) { rval = B; goto CLEANUP; } }
395
396#define DGG_TEST(A,B,REST) { if(A) return(B);}
397#define DGG_TEST2(A,B,REST,C) { DGG_TEST(A,B,REST) }
398#define DGG_TEST3(A,B,REST,C,D) { DGG_TEST(A,B,REST) }
399
400#endif
401
402/******************** SIMPLE MACROS AND FUNCTIONS *****************************/
403
404#define DGG_MIN(a,b) ( (a<b)?a:b )
405#define DGG_MAX(a,b) ( (a>b)?a:b )
406#define KREM(vht,alpha,tau) (DGG_MIN( ceil(vht / alpha), tau ) - 1)
407#define LMIN(vht, d, bht) (DGG_MIN( floor(d*bht/bht), d))
408#define ABOV(v) (v - floor(v))
409#define QINT(vht,bht,tau) ( (int)floor( (vht*(tau-1))/bht ) )
410#define V2I(bht,tau,i) ( ((i+1)*bht / tau) )
411
412int DGG_is_even(double vht, double bht, int tau, int q);
413double frac_part(double value);
414int DGG_is_a_multiple_of_b(double a, double b);
415
416
417/* free function for DGG_data_t. Frees internal arrays and data structure */
419
420/******************** CONSTRAINT ADTs *****************************************/
425
426/******************** CONFIGURATION *******************************************/
428int DGG_list_addcut (DGG_list_t *l, DGG_constraint_t *cut, int ctype, double alpha);
431
432/******************* SOLVER SPECIFIC METHODS **********************************/
433DGG_data_t *DGG_getData(const void *solver_ptr);
434
435/******************* CONSTRAINT MANIPULATION **********************************/
436
437/* DGG_transformConstraint: manipulates a constraint in the following way:
438
439packs everything in output
440
4411 - variables at their upper bounds are substituted for their
442complements. This is done by adjusting the coefficients and
443the right hand side (simple substitution).
444
4452 - variables with non-zero lower bounds are shifted. */
446
448 double **x_out,
449 double **rc_out,
450 char **isint_out,
451 DGG_constraint_t *constraint );
452
453/* DGG_unTransformConstraint :
454
4551 - Undoes step (1) of DGG_transformConstraint
4562 - Undoes step (2) of DGG_transformConstraint */
457
459 DGG_constraint_t *constraint );
460
461/* substitutes each slack variable by the structural variables which
462 define it. This function, hence, changes the constraint 'cut'. */
463
464int DGG_substituteSlacks( const void *solver_ptr,
465 DGG_data_t *data,
467
468int DGG_nicefyConstraint( const void *solver_ptr,
469 DGG_data_t *data,
471
472/******************* CUT GENERATION *******************************************/
473int DGG_getFormulaConstraint( int row_idx,
474 const void *solver_ptr,
475 DGG_data_t *data,
476 DGG_constraint_t* row );
477
479 const void *solver_ptr,
480 DGG_data_t *data,
481 DGG_constraint_t* tabrow,
482 const int * colIsBasic,
483 const int * rowIsBasic,
484 CoinFactorization & factorization,
485 int mode );
486
487DGG_constraint_t* DGG_getSlackExpression(const void *solver_ptr, DGG_data_t* data, int row_index);
488
490 DGG_data_t *data,
491 const void *solver_ptr );
492
494 DGG_data_t *data,
495 const void *solver_ptr,
496 int nrows,
497 CoinThreadRandom & generator);
498
499
501 double slack,
502 DGG_list_t *list,
503 DGG_data_t *data,
504 const void *solver_ptr,
505 CoinThreadRandom & generator);
506
508 DGG_list_t *list,
509 DGG_data_t *data,
510 const void *solver_ptr );
511
512int DGG_buildMir( char *isint,
513 DGG_constraint_t *base,
514 DGG_constraint_t **cut_out );
515
516int DGG_build2step( double alpha,
517 char *isint,
518 DGG_constraint_t *base,
519 DGG_constraint_t **cut_out );
520
522 char *isint,
523 double *x,
524 DGG_list_t *list,
525 DGG_data_t *data,
526 DGG_constraint_t *orig_base );
527
529 char *isint,
530 double *x,
531 double *rc,
532 DGG_list_t *list,
533 DGG_data_t *data,
534 DGG_constraint_t *orig_base );
535
536/******************* CUT INFORMATION ******************************************/
537
538double DGG_cutLHS(DGG_constraint_t *c, double *x);
540
541/******************* TEST / DEBUGGING ROUTINES ********************************/
542
544
546int DGG_is2stepValid(double alpha, double bht);
547
549
550//#############################################################################
556void CglTwomirUnitTest(const OsiSolverInterface * siP,
557 const std::string mpdDir);
558
559
560#endif
561
562
int DGG_add2stepToList(DGG_constraint_t *base, char *isint, double *x, double *rc, DGG_list_t *list, DGG_data_t *data, DGG_constraint_t *orig_base)
int DGG_isBaseTrivial(DGG_data_t *d, DGG_constraint_t *c)
int DGG_getTableauConstraint(int index, const void *solver_ptr, DGG_data_t *data, DGG_constraint_t *tabrow, const int *colIsBasic, const int *rowIsBasic, CoinFactorization &factorization, int mode)
int DGG_is_even(double vht, double bht, int tau, int q)
int DGG_cutsOffPoint(double *x, DGG_constraint_t *cut)
int DGG_isCutDesirable(DGG_constraint_t *c, DGG_data_t *d)
int DGG_getFormulaConstraint(int row_idx, const void *solver_ptr, DGG_data_t *data, DGG_constraint_t *row)
int DGG_nicefyConstraint(const void *solver_ptr, DGG_data_t *data, DGG_constraint_t *cut)
int DGG_isConstraintViolated(DGG_data_t *d, DGG_constraint_t *c)
double DGG_cutLHS(DGG_constraint_t *c, double *x)
DGG_constraint_t * DGG_getSlackExpression(const void *solver_ptr, DGG_data_t *data, int row_index)
void DGG_list_init(DGG_list_t *l)
void DGG_freeConstraint(DGG_constraint_t *c)
DGG_data_t * DGG_getData(const void *solver_ptr)
DGG_constraint_t * DGG_copyConstraint(DGG_constraint_t *c)
int DGG_build2step(double alpha, char *isint, DGG_constraint_t *base, DGG_constraint_t **cut_out)
DGG_constraint_t * DGG_newConstraint(int max_arrays)
int DGG_generateFormulationCutsFromBase(DGG_constraint_t *base, double slack, DGG_list_t *list, DGG_data_t *data, const void *solver_ptr, CoinThreadRandom &generator)
void CglTwomirUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglTwomir class.
int DGG_unTransformConstraint(DGG_data_t *data, DGG_constraint_t *constraint)
int DGG_addMirToList(DGG_constraint_t *base, char *isint, double *x, DGG_list_t *list, DGG_data_t *data, DGG_constraint_t *orig_base)
double frac_part(double value)
int DGG_freeData(DGG_data_t *data)
int DGG_substituteSlacks(const void *solver_ptr, DGG_data_t *data, DGG_constraint_t *cut)
int DGG_list_addcut(DGG_list_t *l, DGG_constraint_t *cut, int ctype, double alpha)
int DGG_transformConstraint(DGG_data_t *data, double **x_out, double **rc_out, char **isint_out, DGG_constraint_t *constraint)
int DGG_is2stepValid(double alpha, double bht)
int DGG_generateTabRowCuts(DGG_list_t *list, DGG_data_t *data, const void *solver_ptr)
void DGG_list_delcut(DGG_list_t *l, int i)
int DGG_is_a_multiple_of_b(double a, double b)
int DGG_generateFormulationCuts(DGG_list_t *list, DGG_data_t *data, const void *solver_ptr, int nrows, CoinThreadRandom &generator)
void DGG_scaleConstraint(DGG_constraint_t *c, int t)
int DGG_buildMir(char *isint, DGG_constraint_t *base, DGG_constraint_t **cut_out)
int DGG_generateCutsFromBase(DGG_constraint_t *base, DGG_list_t *list, DGG_data_t *data, const void *solver_ptr)
void DGG_list_free(DGG_list_t *l)
Cut Generator Base Class.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
Twostep MIR Cut Generator Class.
Definition: CglTwomir.hpp:91
int a_max_
q_max - last value of t to use for 2-Step tMIR inequalities
Definition: CglTwomir.hpp:215
bool do_2mir_
Definition: CglTwomir.hpp:207
CoinThreadRandom randomNumberGenerator_
Threadsafe random number generator.
Definition: CglTwomir.hpp:197
bool do_form_
Definition: CglTwomir.hpp:209
virtual int maximumLengthOfCutInTree() const
Return maximum length of cut in tree.
Definition: CglTwomir.hpp:151
bool do_mir_
Definition: CglTwomir.hpp:206
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate Two step MIR cuts either from the tableau rows or from the formulation rows.
int getIfFormulation() const
Definition: CglTwomir.hpp:135
int getAmax() const
Definition: CglTwomir.hpp:129
int getQmin() const
Definition: CglTwomir.hpp:127
virtual bool needsOptimalBasis() const
Return true if needs optimal basis to do cuts (will return true)
void setCutTypes(bool mir, bool twomir, bool tab, bool form)
Definition: CglTwomir.hpp:120
OsiSolverInterface * originalSolver_
Original solver.
Definition: CglTwomir.hpp:199
int getIfTwomir() const
Definition: CglTwomir.hpp:133
int getQmax() const
Definition: CglTwomir.hpp:128
int twomirType_
Type - 0 normal, 1 add original matrix one, 2 replace.
Definition: CglTwomir.hpp:205
int getIfMir() const
Definition: CglTwomir.hpp:132
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setMaxElementsRoot(int n)
Definition: CglTwomir.hpp:119
int max_elements_
a_max - maximum value of bhat/alpha
Definition: CglTwomir.hpp:216
CglTwomir(const CglTwomir &)
Copy constructor.
double awayAtRoot_
Only investigate if more than this away from integrality (at root)
Definition: CglTwomir.hpp:203
int getMaxElementsRoot() const
Definition: CglTwomir.hpp:131
void setTwomirType(int type)
Set type - 0 normal, 1 add original matrix one, 2 replace.
Definition: CglTwomir.hpp:163
int getMaxElements() const
Definition: CglTwomir.hpp:130
int getIfTableau() const
Definition: CglTwomir.hpp:134
int max_elements_root_
Maximum number of elements in cut.
Definition: CglTwomir.hpp:217
virtual ~CglTwomir()
Destructor.
int t_max_
t_min - first value of t to use for tMIR inequalities
Definition: CglTwomir.hpp:212
double getAwayAtRoot() const
Get away at root.
friend void CglTwomirUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglTwomir class.
void setMirScale(int tmin, int tmax)
Set.
Definition: CglTwomir.hpp:115
void setAwayAtRoot(double value)
Set away at root.
int q_max_
q_min - first value of t to use for 2-Step tMIR inequalities
Definition: CglTwomir.hpp:214
OsiSolverInterface * originalSolver() const
Returns original solver.
Definition: CglTwomir.hpp:160
int getTmax() const
Definition: CglTwomir.hpp:126
bool do_tab_
Definition: CglTwomir.hpp:208
int q_min_
t_max - last value of t to use for tMIR inequalities
Definition: CglTwomir.hpp:213
void passInOriginalSolver(OsiSolverInterface *solver)
Pass in a copy of original solver (clone it)
std::string probname_
Problem name.
Definition: CglTwomir.hpp:100
void setAway(double value)
Set away.
int getTmin() const
Get.
Definition: CglTwomir.hpp:125
CglTwomir()
Default constructor.
int form_nrows_
Maximum number of elements in cut at root.
Definition: CglTwomir.hpp:218
virtual CglCutGenerator * clone() const
Clone.
void setAMax(int a)
Definition: CglTwomir.hpp:117
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
void setTwomirScale(int qmin, int qmax)
Definition: CglTwomir.hpp:116
CglTwomir & operator=(const CglTwomir &rhs)
Assignment operator.
int twomirType() const
Return type.
Definition: CglTwomir.hpp:166
double getAway() const
Get away.
void setFormulationRows(int n)
Definition: CglTwomir.hpp:122
double away_
Only investigate if more than this away from integrality.
Definition: CglTwomir.hpp:201
void setMaxElements(int n)
Definition: CglTwomir.hpp:118
double * coeff
Definition: CglTwomir.hpp:18
int * info
Definition: CglTwomir.hpp:53
int nbasic_row
Definition: CglTwomir.hpp:50
double * rc
Definition: CglTwomir.hpp:57
double gomory_threshold
Definition: CglTwomir.hpp:44
double * x
Definition: CglTwomir.hpp:56
cutParams cparams
Definition: CglTwomir.hpp:60
int ninteger
Definition: CglTwomir.hpp:47
int nbasic_col
Definition: CglTwomir.hpp:49
double * ub
Definition: CglTwomir.hpp:55
double * opt_x
Definition: CglTwomir.hpp:58
double * lb
Definition: CglTwomir.hpp:54
DGG_constraint_t ** c
Definition: CglTwomir.hpp:27
int * ctype
Definition: CglTwomir.hpp:28
double * alpha
Definition: CglTwomir.hpp:29
int max_elements
Definition: CglTwomir.hpp:39