Loading...
Searching...
No Matches
CglLandPSimplex.hpp
Go to the documentation of this file.
// Copyright (C) 2005-2009 Pierre Bonami and others. All Rights Reserved.
// Author: Pierre Bonami
// Tepper School of Business
// Carnegie Mellon University, Pittsburgh, PA 15213
// Date: 21/07/05
//
// $Id$
//
// This code is licensed under the terms of the Eclipse Public License (EPL).
//---------------------------------------------------------------------------
#ifndef CglLandPSimplex_H
#define CglLandPSimplex_H
#include <iostream>
#include <vector>
#include "CglConfig.h"
#include "CglLandP.hpp"
#include "OsiSolverInterface.hpp"
#include "CoinMessage.hpp"
#include "CoinMessageHandler.hpp"
#include "CoinWarmStartBasis.hpp"
#include "CoinPackedMatrix.hpp"
#ifdef COIN_HAS_OSICLP
#include "OsiClpSolverInterface.hpp"
#endif
#include "CglLandPTabRow.hpp"
#include "CglLandPUtils.hpp"
#include "CglLandPMessages.hpp"
//#define APPEND_ROW
#define OLD_COMPUTATION
namespace LAP
{
class DebugData;
class CglLandPSimplex
{
public:
CglLandPSimplex(const OsiSolverInterface &si,
const CglLandP::CachedData &cached,
const CglLandP::Parameters &params,
Validator &validator);
~CglLandPSimplex();
void cacheUpdate(const CglLandP::CachedData &cached, bool reducedSpace = 0);
bool resetSolver(const CoinWarmStartBasis * basis);
bool optimize(int var, OsiRowCut & cut, const CglLandP::CachedData &cached, const CglLandP::Parameters & params);
bool generateMig(int row, OsiRowCut &cut, const CglLandP::Parameters & params);
int generateExtraCuts(const CglLandP::CachedData &cached, const CglLandP::Parameters & params);
int generateExtraCut(int i, const CglLandP::CachedData & cached,
const CglLandP::Parameters& params);
void genThisBasisMigs(const CglLandP::CachedData &cached,
const CglLandP::Parameters & params) ;
int insertAllExtr(OsiCuts & cs, CoinRelFltEq eq);
void setLogLevel(int level)
{
handler_->setLogLevel(level);
}
void setSi(OsiSolverInterface *si)
{
si_ = si;
#ifdef COIN_HAS_OSICLP
OsiClpSolverInterface * clpSi = dynamic_cast<OsiClpSolverInterface *>(si_);
if (clpSi)
{
clp_ = clpSi;
}
#endif
}
void freeSi()
{
assert(si_ != NULL);
delete si_;
si_ = NULL;
#ifdef COIN_HAS_OSICLP
clp_ = NULL;
#endif
}
Cuts& extraCuts()
{
return cuts_;
}
void loadBasis(const OsiSolverInterface &si,
std::vector<int> &M1, std::vector<int> &M2,
int k);
int getNumCols() const
{
return ncols_;
}
int getNumRows() const
{
return nrows_;
}
const CoinWarmStartBasis * getBasis() const
{
return basis_;
}
const int * getNonBasics() const
{
return nonBasics_;
}
const int * getBasics() const
{
return basics_;
}
void outPivInfo(int ncuts)
{
handler_->message(RoundStats, messages_)<<ncuts<<numPivots_
<<numSourceRowEntered_
<<numIncreased_<<CoinMessageEol;
}
#ifdef APPEND_ROW
void append_row(int row_num, bool modularize) ;
void update_row(TabRow &row);
void check_mod_row(TabRow &row);
#endif
protected:
bool changeBasis(int incoming, int leaving, int direction,
#ifndef OLD_COMPUTATION
bool recompute_source_row,
#endif
bool modularize);
int fastFindCutImprovingPivotRow( int &direction, int &gammaSign, double tolerance, bool flagPositiveRows);
int rescanReducedCosts( int &direction, int &gammaSign, double tolerance);
int fastFindBestPivotColumn(int direction, int gammaSign,
double pivotTol, double rhsTol,
bool reducedSpace,
bool allowNonImproving,
double &bestSigma, bool modularize);
int findBestPivot(int &leaving, int & direction,
const CglLandP::Parameters & params);
double computeCglpObjective(const TabRow & row, bool modularize = false) const;
inline double strengthenedIntersectionCutCoef(int i, double alpha_i, double beta) const;
inline double newRowCoefficient(int j, double gamma) const;
void createIntersectionCut(TabRow & row, OsiRowCut &cut) const;
double normalizationFactor(const TabRow & row) const;
void scaleCut(OsiRowCut & cut, double factor) const;
// void createIntersectionCut(double * row);
void createMIG( TabRow & row, OsiRowCut &cut) const;
void pullTableauRow(TabRow & row) const;
void adjustTableauRow(int var, TabRow & row, int direction);
void resetOriginalTableauRow(int var, TabRow & row, int direction);
inline double getLoBound(int index) const
{
return lo_bounds_[original_index_[index]];
}
inline double getUpBound(int index) const
{
return up_bounds_[original_index_[index]];
}
inline double getColsolToCut(int index) const
{
return colsolToCut_[original_index_[index]];
}
bool isGtConst(int index) const
{
return (index >= ncols_ && lo_bounds_[original_index_[index]] < -1e-10 && up_bounds_[original_index_[index]] <= 1e-09);
}
inline void setColsolToCut(int index, double value)
{
colsolToCut_[original_index_[index]] = value;
}
inline CoinWarmStartBasis::Status getStatus(int index) const
{
if (index < ncols_) return basis_->getStructStatus(index);
return basis_->getArtifStatus(index - ncols_);
}
inline bool isInteger(int index) const
{
return integers_[original_index_[index]];
}
void computeWeights(CglLandP::LHSnorm norm, CglLandP::Normalization type,
CglLandP::RhsWeightType rhs);
double normedCoef(double a, int ii) const
{
if (norm_weights_.empty())
{
return a;
}
else
{
return a*norm_weights_[ii];
}
}
void printTableau(std::ostream & os);
void printEverything();
void printTableauLateX(std::ostream & os);
void printRowLateX(std::ostream & os, int i);
void printCutLateX(std::ostream & os, int i);
void printCglpBasis(std::ostream& os = std::cout);
void get_M1_M2_M3(const TabRow & row,
std::vector<int> &M1,
std::vector<int> &M2,
std::vector<int> &M3);
void eliminate_slacks(double * vec) const;
private:
CglLandPSimplex();
CglLandPSimplex(const CglLandPSimplex&);
CglLandPSimplex& operator=(const CglLandPSimplex&);
#ifdef COIN_HAS_OSICLP
OsiClpSolverInterface * clp_;
#endif
void updateM1_M2_M3(TabRow & row, double tolerance, bool alwaysComputeCheap);
void removeRows(int nDelete, const int * rowsIdx);
void compute_p_q_r_s(double gamma, int gammaSign, double &p, double & q, double & r , double &s);
TabRow row_k_;
TabRow original_row_k_;
TabRow row_i_;
#ifndef NDBEUG
TabRow new_row_;
#endif
CoinPackedVector gammas_;
std::vector<double> rWk1_;
std::vector<double> rWk2_;
std::vector<double> rWk3_;
std::vector<double> rWk4_;
std::vector<int> rIntWork_;
bool * rowFlags_;
std::vector<bool> col_in_subspace;
bool *colCandidateToLeave_;
int * basics_;
int * nonBasics_;
std::vector<int> M1_;
std::vector<int> M2_;
std::vector<int> M3_;
double sigma_;
CoinWarmStartBasis * basis_;
double * colsolToCut_;
double * colsol_;
int ncols_orig_;
int nrows_orig_;
int ncols_;
int nrows_;
// for fast access to lower bounds (both cols and rows)
std::vector<double> lo_bounds_;
// for fast access to upper bounds (both cols and rows)
std::vector<double> up_bounds_;
bool inDegenerateSequence_;
double chosenReducedCostVal_;
const bool * integers_;
std::vector<int> original_index_;
Cuts cuts_;
OsiSolverInterface * si_;
bool own_;
Validator & validator_;
std::vector<double> norm_weights_;
double rhs_weight_;
int nNegativeRcRows_;
bool checkBasis();
int numPivots_;
int numSourceRowEntered_;
int numIncreased_;
CoinMessageHandler * handler_;
CoinMessages messages_;
#ifndef NDEBUG
double bestSigma_;
#endif
protected:
double computeCglpRedCost(int direction, int gammaSign, double tau);
double computeRedCostConstantsInRow();
double computeCglpObjective(double gamma, bool strengthen, TabRow &row);
double computeCglpObjective(double gamma, bool strengthen);
int findCutImprovingPivotRow( int &direction, int &gammaSign, double tolerance);
int findBestPivotColumn(int direction,
double pivotTol, bool reducedSpace, bool allowDegeneratePivot,
bool modularize);
#if 1
int plotCGLPobj(int direction, double gammaTolerance,
double pivotTol, bool reducedSpace, bool allowDegenerate, bool modularize);
#endif
};
double CglLandPSimplex::strengthenedIntersectionCutCoef(int i, double alpha_i, double beta) const
{
// double ratio = beta/(1-beta);
if ( (!integers_[i]))
return intersectionCutCoef(alpha_i, beta);
else
{
double f_i = alpha_i - floor(alpha_i);
if (f_i < beta)
return f_i*(1- beta);
else
return (1 - f_i)*beta;//(1-beta);
}
}
double
CglLandPSimplex::newRowCoefficient(int j, double gamma) const
{
return row_k_[j] + gamma * row_i_[j];
}
}
#endif
CglConfig.h
CglLandPMessages.hpp
OLD_COMPUTATION
#define OLD_COMPUTATION
Definition CglLandPSimplex.hpp:35
CglLandPTabRow.hpp
CglLandPUtils.hpp
CglLandP.hpp
CglLandP::Parameters
Class storing parameters.
Definition CglLandP.hpp:108
CglLandP::RhsWeightType
RhsWeightType
RHS weight in normalization.
Definition CglLandP.hpp:101
CglLandP::LHSnorm
LHSnorm
Definition CglLandP.hpp:91
CglLandP::Normalization
Normalization
Normalization.
Definition CglLandP.hpp:83
LAP::CglLandPSimplex::get_M1_M2_M3
void get_M1_M2_M3(const TabRow &row, std::vector< int > &M1, std::vector< int > &M2, std::vector< int > &M3)
Put variables in M1 M2 and M3 according to their sign.
LAP::CglLandPSimplex::si_
OsiSolverInterface * si_
Pointer to the solver interface.
Definition CglLandPSimplex.hpp:367
LAP::CglLandPSimplex::setSi
void setSi(OsiSolverInterface *si)
Definition CglLandPSimplex.hpp:79
LAP::CglLandPSimplex::setLogLevel
void setLogLevel(int level)
Definition CglLandPSimplex.hpp:73
LAP::CglLandPSimplex::nrows_orig_
int nrows_orig_
cached numrows in original problem
Definition CglLandPSimplex.hpp:344
LAP::CglLandPSimplex::getBasics
const int * getBasics() const
Definition CglLandPSimplex.hpp:128
LAP::CglLandPSimplex::nrows_
int nrows_
Cached number of rows in reduced size problem.
Definition CglLandPSimplex.hpp:348
LAP::CglLandPSimplex::row_k_
TabRow row_k_
Source row for cut.
Definition CglLandPSimplex.hpp:297
LAP::CglLandPSimplex::getNumRows
int getNumRows() const
Definition CglLandPSimplex.hpp:114
LAP::CglLandPSimplex::resetOriginalTableauRow
void resetOriginalTableauRow(int var, TabRow &row, int direction)
reset the tableau row after a call to adjustTableauRow
LAP::CglLandPSimplex::integers_
const bool * integers_
pointer to array of integer info for both structural and slacks
Definition CglLandPSimplex.hpp:358
LAP::CglLandPSimplex::inDegenerateSequence_
bool inDegenerateSequence_
Say if we are in a sequence of degenerate pivots.
Definition CglLandPSimplex.hpp:354
LAP::CglLandPSimplex::createMIG
void createMIG(TabRow &row, OsiRowCut &cut) const
Create strenghtened row.
LAP::CglLandPSimplex::getBasis
const CoinWarmStartBasis * getBasis() const
Definition CglLandPSimplex.hpp:119
LAP::CglLandPSimplex::rWk1_
std::vector< double > rWk1_
first work vector in row space.
Definition CglLandPSimplex.hpp:308
LAP::CglLandPSimplex::getLoBound
double getLoBound(int index) const
Get lower bound for variable or constraint.
Definition CglLandPSimplex.hpp:205
LAP::CglLandPSimplex::printCglpBasis
void printCglpBasis(std::ostream &os=std::cout)
Print CGLP basis corresponding to current tableau and source row.
LAP::CglLandPSimplex::rowFlags_
bool * rowFlags_
Flag rows which we don't want to try anymore.
Definition CglLandPSimplex.hpp:318
LAP::CglLandPSimplex::setColsolToCut
void setColsolToCut(int index, double value)
Access to value in solution to cut (indexed in reduced problem).
Definition CglLandPSimplex.hpp:224
LAP::CglLandPSimplex::updateM1_M2_M3
void updateM1_M2_M3(TabRow &row, double tolerance, bool alwaysComputeCheap)
Update values in M1 M2 and M3 before an iteration.
LAP::CglLandPSimplex::eliminate_slacks
void eliminate_slacks(double *vec) const
Put a vector in structural sapce.
LAP::CglLandPSimplex::scaleCut
void scaleCut(OsiRowCut &cut, double factor) const
Scale the cut by factor.
LAP::CglLandPSimplex::ncols_
int ncols_
cached number of columns in reduced size problem
Definition CglLandPSimplex.hpp:346
LAP::CglLandPSimplex::genThisBasisMigs
void genThisBasisMigs(const CglLandP::CachedData &cached, const CglLandP::Parameters &params)
LAP::CglLandPSimplex::M2_
std::vector< int > M2_
Stores the variables which are always in M2 for a given k.
Definition CglLandPSimplex.hpp:330
LAP::CglLandPSimplex::generateExtraCuts
int generateExtraCuts(const CglLandP::CachedData &cached, const CglLandP::Parameters &params)
Find extra constraints in current tableau.
LAP::CglLandPSimplex::extraCuts
Cuts & extraCuts()
Definition CglLandPSimplex.hpp:100
LAP::CglLandPSimplex::M3_
std::vector< int > M3_
Stores the variables which could be either in M1 or M2.
Definition CglLandPSimplex.hpp:332
LAP::CglLandPSimplex::numPivots_
int numPivots_
Record the number of pivots.
Definition CglLandPSimplex.hpp:384
LAP::CglLandPSimplex::computeCglpRedCost
double computeCglpRedCost(int direction, int gammaSign, double tau)
Compute the reduced cost of Cglp.
LAP::CglLandPSimplex::generateMig
bool generateMig(int row, OsiRowCut &cut, const CglLandP::Parameters &params)
Find Gomory cut (i.e.
LAP::CglLandPSimplex::adjustTableauRow
void adjustTableauRow(int var, TabRow &row, int direction)
Adjust the row of the tableau to reflect leaving variable direction.
LAP::CglLandPSimplex::CglLandPSimplex
CglLandPSimplex(const OsiSolverInterface &si, const CglLandP::CachedData &cached, const CglLandP::Parameters &params, Validator &validator)
Usefull onstructor.
LAP::CglLandPSimplex::optimize
bool optimize(int var, OsiRowCut &cut, const CglLandP::CachedData &cached, const CglLandP::Parameters &params)
Perfom pivots to find the best cuts.
LAP::CglLandPSimplex::createIntersectionCut
void createIntersectionCut(TabRow &row, OsiRowCut &cut) const
Create the intersection cut of row k.
LAP::CglLandPSimplex::normalizationFactor
double normalizationFactor(const TabRow &row) const
Compute the normalization factor of the cut.
LAP::CglLandPSimplex::printRowLateX
void printRowLateX(std::ostream &os, int i)
LAP::CglLandPSimplex::numSourceRowEntered_
int numSourceRowEntered_
Record the number of times the source row entered the basis.
Definition CglLandPSimplex.hpp:386
LAP::CglLandPSimplex::isInteger
bool isInteger(int index) const
Say if variable index by i in current tableau is integer.
Definition CglLandPSimplex.hpp:235
LAP::CglLandPSimplex::CglLandPSimplex
CglLandPSimplex(const CglLandPSimplex &)
No copy constructor.
LAP::CglLandPSimplex::basics_
int * basics_
Store the basics variable.
Definition CglLandPSimplex.hpp:324
LAP::CglLandPSimplex::messages_
CoinMessages messages_
Messages.
Definition CglLandPSimplex.hpp:393
LAP::CglLandPSimplex::rIntWork_
std::vector< int > rIntWork_
integer valued work vector on the rows
Definition CglLandPSimplex.hpp:316
LAP::CglLandPSimplex::rhs_weight_
double rhs_weight_
Weight for rhs of normalization constraint.*‍/.
Definition CglLandPSimplex.hpp:376
LAP::CglLandPSimplex::compute_p_q_r_s
void compute_p_q_r_s(double gamma, int gammaSign, double &p, double &q, double &r, double &s)
LAP::CglLandPSimplex::cuts_
Cuts cuts_
Stores extra cuts which are generated along the procedure.
Definition CglLandPSimplex.hpp:362
LAP::CglLandPSimplex::fastFindCutImprovingPivotRow
int fastFindCutImprovingPivotRow(int &direction, int &gammaSign, double tolerance, bool flagPositiveRows)
Find a row which can be used to perform an improving pivot the fast way (i.e., find the leaving varia...
LAP::CglLandPSimplex::colsolToCut_
double * colsolToCut_
Pointer to the solution to cut (need to be modified after each pivot because we are only considering ...
Definition CglLandPSimplex.hpp:338
LAP::CglLandPSimplex::bestSigma_
double bestSigma_
Definition CglLandPSimplex.hpp:395
LAP::CglLandPSimplex::validator_
Validator & validator_
A pointer to a cut validator.
Definition CglLandPSimplex.hpp:372
LAP::CglLandPSimplex::generateExtraCut
int generateExtraCut(int i, const CglLandP::CachedData &cached, const CglLandP::Parameters &params)
Generate a constrainte for a row of the tableau different from the source row.
LAP::CglLandPSimplex::rWk3_
std::vector< double > rWk3_
third work vector in row space.
Definition CglLandPSimplex.hpp:312
LAP::CglLandPSimplex::up_bounds_
std::vector< double > up_bounds_
Definition CglLandPSimplex.hpp:352
LAP::CglLandPSimplex::col_in_subspace
std::vector< bool > col_in_subspace
Flag columns which are in the subspace (usualy remove nonbasic structurals in subspace).
Definition CglLandPSimplex.hpp:320
LAP::CglLandPSimplex::new_row_
TabRow new_row_
Definition CglLandPSimplex.hpp:303
LAP::CglLandPSimplex::insertAllExtr
int insertAllExtr(OsiCuts &cs, CoinRelFltEq eq)
insert all extra cuts in cs.
LAP::CglLandPSimplex::newRowCoefficient
double newRowCoefficient(int j, double gamma) const
return the coefficient of the new row (combining row_k + gamma row_i).
Definition CglLandPSimplex.hpp:444
LAP::CglLandPSimplex::chosenReducedCostVal_
double chosenReducedCostVal_
Value for the reduced cost chosen for pivoting.
Definition CglLandPSimplex.hpp:356
LAP::CglLandPSimplex::own_
bool own_
Own the data or not?
Definition CglLandPSimplex.hpp:370
LAP::CglLandPSimplex::gammas_
CoinPackedVector gammas_
vector to sort the gammas
Definition CglLandPSimplex.hpp:306
LAP::CglLandPSimplex::original_row_k_
TabRow original_row_k_
Original version of source row (without modularization).
Definition CglLandPSimplex.hpp:299
LAP::CglLandPSimplex::printEverything
void printEverything()
Print everything .
LAP::CglLandPSimplex::plotCGLPobj
int plotCGLPobj(int direction, double gammaTolerance, double pivotTol, bool reducedSpace, bool allowDegenerate, bool modularize)
LAP::CglLandPSimplex::findBestPivot
int findBestPivot(int &leaving, int &direction, const CglLandP::Parameters &params)
Find incoming and leaving variables which lead to the most violated adjacent normalized lift-and-proj...
LAP::CglLandPSimplex::row_i_
TabRow row_i_
Row of leaving candidate.
Definition CglLandPSimplex.hpp:301
LAP::CglLandPSimplex::nNegativeRcRows_
int nNegativeRcRows_
number of rows with a <0 rc in current iteration
Definition CglLandPSimplex.hpp:379
LAP::CglLandPSimplex::~CglLandPSimplex
~CglLandPSimplex()
Destructor.
LAP::CglLandPSimplex::ncols_orig_
int ncols_orig_
cached numcols in original problem
Definition CglLandPSimplex.hpp:342
LAP::CglLandPSimplex::freeSi
void freeSi()
Definition CglLandPSimplex.hpp:90
LAP::CglLandPSimplex::findCutImprovingPivotRow
int findCutImprovingPivotRow(int &direction, int &gammaSign, double tolerance)
Find a row which can be used to perform an improving pivot return index of the cut or -1 if none exis...
LAP::CglLandPSimplex::nonBasics_
int * nonBasics_
Stores the nonBasicVariables.
Definition CglLandPSimplex.hpp:326
LAP::CglLandPSimplex::colCandidateToLeave_
bool * colCandidateToLeave_
Flag columns which have to be considered for leaving the basis.
Definition CglLandPSimplex.hpp:322
LAP::CglLandPSimplex::printTableauLateX
void printTableauLateX(std::ostream &os)
print the tableau of current basis.
LAP::CglLandPSimplex::colsol_
double * colsol_
Pointer to the current basic solution.
Definition CglLandPSimplex.hpp:340
LAP::CglLandPSimplex::handler_
CoinMessageHandler * handler_
Message handler.
Definition CglLandPSimplex.hpp:391
LAP::CglLandPSimplex::loadBasis
void loadBasis(const OsiSolverInterface &si, std::vector< int > &M1, std::vector< int > &M2, int k)
LAP::CglLandPSimplex::computeCglpObjective
double computeCglpObjective(double gamma, bool strengthen)
Compute the objective value of the Cglp with linear combintation of the row_k_ and gamma row_i_.
LAP::CglLandPSimplex::getNonBasics
const int * getNonBasics() const
Definition CglLandPSimplex.hpp:123
LAP::CglLandPSimplex::computeCglpObjective
double computeCglpObjective(const TabRow &row, bool modularize=false) const
Compute the objective value of the Cglp for given row and rhs (if strengthening shall be applied row ...
LAP::CglLandPSimplex::computeRedCostConstantsInRow
double computeRedCostConstantsInRow()
Compute the value of sigma and thau (which are constants for a row i as defined in Mike Perregaard th...
LAP::CglLandPSimplex::norm_weights_
std::vector< double > norm_weights_
Weights for the normalization constraint.
Definition CglLandPSimplex.hpp:374
LAP::CglLandPSimplex::getStatus
CoinWarmStartBasis::Status getStatus(int index) const
Get the basic status of a variable (structural or slack).
Definition CglLandPSimplex.hpp:229
LAP::CglLandPSimplex::pullTableauRow
void pullTableauRow(TabRow &row) const
Get the row i of the tableau.
LAP::CglLandPSimplex::original_index_
std::vector< int > original_index_
Original index of variable before deletions.
Definition CglLandPSimplex.hpp:360
LAP::CglLandPSimplex::rescanReducedCosts
int rescanReducedCosts(int &direction, int &gammaSign, double tolerance)
Rescan reduced costs tables.
LAP::CglLandPSimplex::strengthenedIntersectionCutCoef
double strengthenedIntersectionCutCoef(int i, double alpha_i, double beta) const
return the coefficients of the strengthened intersection cut takes one extra argument seens needs to ...
Definition CglLandPSimplex.hpp:426
LAP::CglLandPSimplex::resetSolver
bool resetSolver(const CoinWarmStartBasis *basis)
reset the solver to optimal basis
LAP::CglLandPSimplex::CglLandPSimplex
CglLandPSimplex()
No default constructor.
LAP::CglLandPSimplex::printCutLateX
void printCutLateX(std::ostream &os, int i)
LAP::CglLandPSimplex::fastFindBestPivotColumn
int fastFindBestPivotColumn(int direction, int gammaSign, double pivotTol, double rhsTol, bool reducedSpace, bool allowNonImproving, double &bestSigma, bool modularize)
Find the column which leads to the best cut (i.e., find incoming variable).
LAP::CglLandPSimplex::computeWeights
void computeWeights(CglLandP::LHSnorm norm, CglLandP::Normalization type, CglLandP::RhsWeightType rhs)
Compute normalization weights.
LAP::CglLandPSimplex::outPivInfo
void outPivInfo(int ncuts)
Definition CglLandPSimplex.hpp:133
LAP::CglLandPSimplex::getNumCols
int getNumCols() const
Definition CglLandPSimplex.hpp:109
LAP::CglLandPSimplex::M1_
std::vector< int > M1_
Stores the variables which are always in M1 for a given k.
Definition CglLandPSimplex.hpp:328
LAP::CglLandPSimplex::numIncreased_
int numIncreased_
Record the number of times that sigma increased.
Definition CglLandPSimplex.hpp:388
LAP::CglLandPSimplex::rWk2_
std::vector< double > rWk2_
scond work vector in row space.
Definition CglLandPSimplex.hpp:310
LAP::CglLandPSimplex::findBestPivotColumn
int findBestPivotColumn(int direction, double pivotTol, bool reducedSpace, bool allowDegeneratePivot, bool modularize)
Find the column which leads to the best cut (i.e., find incoming variable).
LAP::CglLandPSimplex::computeCglpObjective
double computeCglpObjective(double gamma, bool strengthen, TabRow &row)
Compute the objective value of the Cglp with linear combintation of the two rows by gamma.
LAP::CglLandPSimplex::normedCoef
double normedCoef(double a, int ii) const
Evenutaly multiply a by w if normed_weights_ is not empty.
Definition CglLandPSimplex.hpp:243
LAP::CglLandPSimplex::operator=
CglLandPSimplex & operator=(const CglLandPSimplex &)
No assignment operator.
LAP::CglLandPSimplex::lo_bounds_
std::vector< double > lo_bounds_
Definition CglLandPSimplex.hpp:350
LAP::CglLandPSimplex::cacheUpdate
void cacheUpdate(const CglLandP::CachedData &cached, bool reducedSpace=0)
Update cached information in case of basis change in a round.
LAP::CglLandPSimplex::basis_
CoinWarmStartBasis * basis_
Keep track of basis status.
Definition CglLandPSimplex.hpp:336
LAP::CglLandPSimplex::getColsolToCut
double getColsolToCut(int index) const
Access to value in solution to cut (indexed in reduced problem).
Definition CglLandPSimplex.hpp:215
LAP::CglLandPSimplex::rWk4_
std::vector< double > rWk4_
fourth work vector in row space.
Definition CglLandPSimplex.hpp:314
LAP::CglLandPSimplex::getUpBound
double getUpBound(int index) const
Get upper bound for variable or constraint.
Definition CglLandPSimplex.hpp:210
LAP::CglLandPSimplex::changeBasis
bool changeBasis(int incoming, int leaving, int direction, bool modularize)
Perform a change in the basis (direction is 1 if leaving variable is going to ub, 0 otherwise).
LAP::CglLandPSimplex::removeRows
void removeRows(int nDelete, const int *rowsIdx)
Remove rows from current tableau.
LAP::CglLandPSimplex::checkBasis
bool checkBasis()
Check that the basis is correct.
LAP::CglLandPSimplex::isGtConst
bool isGtConst(int index) const
Definition CglLandPSimplex.hpp:219
LAP::CglLandPSimplex::printTableau
void printTableau(std::ostream &os)
print the tableau of current basis.
LAP::CglLandPSimplex::sigma_
double sigma_
stores the cglp value of the normalized cut obtained from row k_
Definition CglLandPSimplex.hpp:334
LAP::Validator
Class to validate or reject a cut.
Definition CglLandPValidator.hpp:27
LAP
Performs one round of Lift & Project using CglLandPSimplex to build cuts.
Definition CglLandP.hpp:25
LAP::intersectionCutCoef
double intersectionCutCoef(double alpha_i, double beta)
return the coefficients of the intersection cut
Definition CglLandPUtils.hpp:35
LAP::RoundStats
@ RoundStats
Definition CglLandPMessages.hpp:45
CglLandP::CachedData
Some informations that will be changed by the pivots and that we want to keep.
Definition CglLandP.hpp:242
LAP::Cuts
To store extra cuts generated by columns from which they origin.
Definition CglLandPUtils.hpp:60
LAP::TabRow
Definition CglLandPTabRow.hpp:22
cut
Definition Cgl012cut.hpp:153