Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
BlisModel Class Reference

#include <BlisModel.h>

Inheritance diagram for BlisModel:
Inheritance graph
[legend]
Collaboration diagram for BlisModel:
Collaboration graph
[legend]

Public Member Functions

 BlisModel ()
 Default construtor. More...
 
virtual ~BlisModel ()
 Destructor. More...
 
void gutsOfDestructor ()
 Actual destructor. More...
 
void init ()
 Intialize member data. More...
 
virtual void readInstance (const char *dataFile)
 Read in the instance data. More...
 
virtual void readParameters (const int argnum, const char *const *arglist)
 Read in Alps, Blis parameters. More...
 
virtual void writeParameters (std::ostream &outstream) const
 Write out parameters. More...
 
virtual AlpsTreeNodecreateRoot ()
 Create the root node based on model. More...
 
virtual bool setupSelf ()
 Do necessary work to make model usable. More...
 
virtual void setSolver (OsiSolverInterface *si)
 Set lp solver. More...
 
virtual OsiSolverInterfacesolver ()
 Get lp solver. More...
 
bool resolve ()
 Resolving a lp. More...
 
void setActiveNode (AlpsTreeNode *node)
 Set active node. More...
 
void setSolEstimate (double est)
 Set the solution estimate of the active node. More...
 
int getNumStrong ()
 Get number of strong branchings. More...
 
void addNumStrong (int num=1)
 Add num to number of strong branchings. More...
 
double * getObjCoef () const
 Get objective coefficients. More...
 
const double * getColLower ()
 Get column lower bound. More...
 
const double * getColUpper ()
 Get column upper bound. More...
 
int getNumCols ()
 Get number of columns. More...
 
int getNumRows ()
 Get number of rows. More...
 
double * origVarLB ()
 Get original variable bounds arrary. More...
 
double * origVarUB ()
 
double * origConLB ()
 Get original constraint bounds arrary. More...
 
double * origConUB ()
 
double * startVarLB ()
 The starting variable bounds arrary of a subproblem (internal use). More...
 
double * startVarUB ()
 
double * startConLB ()
 The starting constraint bounds arrary of a subproblem (internal use). More...
 
double * startConUB ()
 
int * tempVarLBPos ()
 Temparory storage. More...
 
int * tempVarUBPos ()
 
int * tempConLBPos ()
 
int * tempConUBPos ()
 
double getLpObjValue () const
 Get current objective function value. More...
 
const double * getLpSolution () const
 Get active lp solution. More...
 
int getNumSolutions () const
 Return the stored lp solution. More...
 
int getNumHeurSolutions () const
 Get number of heuristic solutions. More...
 
double * incumbent ()
 Return best ip solution found so far. More...
 
bool setBestSolution (BLIS_SOL_TYPE how, double &objectiveValue, const double *solution, bool fixVariables=false)
 Record a new incumbent solution and update objectiveValue. More...
 
double getCutoff () const
 Get cut off value. More...
 
void setCutoff (double co)
 Set cut off value. More...
 
bool feasibleSolution (int &numIntegerInfs)
 Test the current lp solution for feasiblility. More...
 
bool feasibleSolution (int &numIntegerInfs, int &numObjectInfs)
 Test the current solution for feasiblility. More...
 
void findIntegers (bool startAgain)
 Identify integer variable. More...
 
int getNumIntVars () const
 Get number of integers. More...
 
int * getIntVars () const
 Get integer indices. More...
 
bool checkInteger (double value) const
 Check if a value is integer. More...
 
void addHeuristic (BlisHeuristic *heur)
 Add a heuristic. More...
 
BlisHeuristicheuristics (int i) const
 Get a specific heuristic. More...
 
int numHeuristics () const
 Get the number of heuristics. More...
 
void addCutGenerator (CglCutGenerator *generator, const char *name=NULL, int strategy=0, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
 Add a cut generator. More...
 
BlisConGeneratorcutGenerators (int i) const
 Get a specific cut generator. More...
 
int numCutGenerators () const
 Get the number of cut generators. More...
 
int getMaxNumCons () const
 Get the max number of cuts can be generated. More...
 
void setMaxNumCons (int m)
 Set the max number of cuts can be generated. More...
 
BcpsConstraintPoolconstraintPool ()
 Access constraint pool. More...
 
int useCons () const
 Query constraint generation strategy. More...
 
void setUseCons (int u)
 Set constraint generation strategy. More...
 
int getDenseConCutoff () const
 Get the thresheld to be considered as a dense constraint. More...
 
void setDenseConCutoff (int cutoff)
 Set the thresheld to be considered as a dense constraint. More...
 
double * getConRandoms () const
 Get randoms for check parallel constraints. More...
 
void passInPriorities (const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
 Pass in branching priorities. More...
 
const int * priority () const
 Priorities. More...
 
int priority (int sequence) const
 Returns priority level for an object (or 1000 if no priorities exist) More...
 
const double getNodeWeight () const
 
void setNodeWeight (double nw)
 
virtual void modelLog ()
 Log of specific models. More...
 
int getNumNodes () const
 Get how many Nodes it took to solve the problem. More...
 
int getNumIterations () const
 Get how many iterations it took to solve the problem. More...
 
int getAveIterations () const
 Get the average iterations it took to solve a lp. More...
 
void addNumNodes (int newNodes=1)
 Increment node count. More...
 
void addNumIterations (int newIter)
 Increment Iteration count. More...
 
CoinMessageHandlermessageHandler () const
 Get the message handler. More...
 
int getHotstartStrategy ()
 Don't know what it is. More...
 
void setHotstartStrategy (int value)
 
virtual void registerKnowledge ()
 Register knowledge. More...
 
virtual AlpsEncodedencode () const
 The method that encodes the model into a encoded object. More...
 
virtual void decodeToSelf (AlpsEncoded &)
 The method that decodes the model from a encoded object. More...
 
 BlisModel ()
 Default construtor. More...
 
virtual ~BlisModel ()
 Destructor. More...
 
void gutsOfDestructor ()
 Actual destructor. More...
 
void setColMatrix (CoinPackedMatrix *mat)
 Pass a matrix in. More...
 
void setNumCons (int num)
 Pass column upper bounds. More...
 
void setNumVars (int num)
 Pass column upper bounds. More...
 
void setNumElems (int num)
 Pass column upper bounds. More...
 
void setConLb (double *cl)
 Pass column upper bounds. More...
 
void setConUb (double *cu)
 Pass column lower bounds. More...
 
void setVarLb (double *lb)
 Pass variable upper bounds. More...
 
void setVarUb (double *ub)
 Pass variable lower bounds. More...
 
void setColType (char *colType)
 Pass variable types. More...
 
void setObjCoef (double *obj)
 Pass objective coefficients. More...
 
virtual void readInstance (const char *dataFile)
 For parallel code, only the master calls this function. More...
 
virtual void importModel (std::vector< BlisVariable * > vars, std::vector< BlisConstraint * > cons)
 For parallel code, only the master calls this function. More...
 
virtual void readParameters (const int argnum, const char *const *arglist)
 Read in Alps, Blis parameters. More...
 
virtual void writeParameters (std::ostream &outstream) const
 Write out parameters. More...
 
virtual AlpsTreeNodecreateRoot ()
 For parallel code, only the master calls this function. More...
 
virtual bool setupSelf ()
 All processes call this function. More...
 
virtual void preprocess ()
 Preprocessing the model. More...
 
virtual void postprocess ()
 Postprocessing the searching results. More...
 
virtual void setSolver (OsiSolverInterface *si)
 Set lp solver. More...
 
virtual OsiSolverInterfacegetSolver ()
 Get lp solver. More...
 
virtual OsiSolverInterfacesolver ()
 Get lp solver. More...
 
bool resolve ()
 Resolving a lp. More...
 
void setActiveNode (AlpsTreeNode *node)
 Set active node. More...
 
void setSolEstimate (double est)
 Set the solution estimate of the active node. More...
 
int getNumStrong ()
 Get number of strong branchings. More...
 
void addNumStrong (int num=1)
 Add num to number of strong branchings. More...
 
int getNumBranchResolve ()
 Get the maximum number of resolve during branching. More...
 
void setNumBranchResolve (int num)
 Set the maximum number of resolve during branching. More...
 
double * getObjCoef () const
 Get objective coefficients. More...
 
const double * getColLower ()
 Get column lower bound. More...
 
const double * getColUpper ()
 Get column upper bound. More...
 
int getNumCols ()
 Get number of columns. More...
 
int getNumRows ()
 Get number of rows. More...
 
double * varLB ()
 Get variable bounds arrary. More...
 
double * varUB ()
 
double * conLB ()
 Get original constraint bounds arrary. More...
 
double * conUB ()
 
double * startVarLB ()
 The starting variable bounds arrary of a subproblem (internal use). More...
 
double * startVarUB ()
 
double * startConLB ()
 The starting constraint bounds arrary of a subproblem (internal use). More...
 
double * startConUB ()
 
int * tempVarLBPos ()
 Temparory storage. More...
 
int * tempVarUBPos ()
 
int * tempConLBPos ()
 
int * tempConUBPos ()
 
double getLpObjValue () const
 Get current objective function value. More...
 
const double * getLpSolution () const
 Get active lp solution. More...
 
int getNumSolutions () const
 Get number of solutions. More...
 
int getNumHeurSolutions () const
 Get number of heuristic solutions. More...
 
double * incumbent ()
 Return best ip solution found so far. More...
 
int storeSolution (BlisSolutionType how, BlisSolution *sol)
 Record a new incumbent solution and update objectiveValue. More...
 
double getCutoff () const
 Get cut off value. More...
 
void setCutoff (double co)
 Set cut off value. More...
 
BlisSolutionfeasibleSolutionHeur (const double *solution)
 Test if a solution found by heuristic is feasible. More...
 
virtual BlisSolutionfeasibleSolution (int &numIntegerInfs, int &numObjectInfs)
 Test the current LP solution for feasiblility. More...
 
virtual BlisSolutionuserFeasibleSolution (const double *solution, bool &feasible)
 User's criteria for a feasible solution. More...
 
void createIntgerObjects (bool startAgain)
 Identify integer variable. More...
 
int * getIntObjIndices () const
 Get integers' object indices. More...
 
int getNumIntObjects () const
 Get number of integers. More...
 
int * getIntColIndices () const
 Get integers' column indices. More...
 
bool checkInteger (double value) const
 Check if a value is integer. More...
 
void analyzeObjective ()
 
void addHeuristic (BlisHeuristic *heur)
 Add a heuristic. More...
 
BlisHeuristicheuristics (int i) const
 Get a specific heuristic. More...
 
int numHeuristics () const
 Get the number of heuristics. More...
 
void addCutGenerator (BlisConGenerator *generator)
 Add a Blis cut generator. More...
 
void addCutGenerator (CglCutGenerator *generator, const char *name=NULL, BlisCutStrategy strategy=BlisCutStrategyAuto, int cutGenerationFrequency=1, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
 Add a Cgl cut generator. More...
 
BlisConGeneratorcutGenerators (int i) const
 Get a specific cut generator. More...
 
int numCutGenerators () const
 Get the number of cut generators. More...
 
int getMaxNumCons () const
 Get the max number of cuts can be generated. More...
 
void setMaxNumCons (int m)
 Set the max number of cuts can be generated. More...
 
BcpsConstraintPoolconstraintPool ()
 Access constraint pool. More...
 
BcpsConstraintPoolconstraintPoolReceive ()
 Access receive constraint pool. More...
 
BcpsConstraintPoolconstraintPoolSend ()
 Access send constraint pool. More...
 
BlisCutStrategy getCutStrategy () const
 Query constraint generation strategy. More...
 
void setCutStrategy (BlisCutStrategy u)
 Set constraint generation strategy. More...
 
int getCutGenerationFrequency () const
 Query constraint generation frequency. More...
 
void setCutStrategy (int f)
 Set constraint generation frequency. More...
 
int getDenseConCutoff () const
 Get the thresheld to be considered as a dense constraint. More...
 
void setDenseConCutoff (int cutoff)
 Set the thresheld to be considered as a dense constraint. More...
 
double * getConRandoms () const
 Get randoms for check parallel constraints. More...
 
void passInPriorities (const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
 Pass in branching priorities. More...
 
const int * priority () const
 Priorities. More...
 
int priority (int sequence) const
 Returns priority level for an object (or 1000 if no priorities exist) More...
 
double getNodeWeight () const
 
void setNodeWeight (double nw)
 
virtual void modelLog ()
 Log of specific models. More...
 
int getNumNodes () const
 Get how many Nodes it took to solve the problem. More...
 
int getNumIterations () const
 Get how many iterations it took to solve the problem. More...
 
int getAveIterations () const
 Get the average iterations it took to solve a lp. More...
 
void addNumNodes (int newNodes=1)
 Increment node count. More...
 
void addNumIterations (int newIter)
 Increment Iteration count. More...
 
CoinMessageHandlerblisMessageHandler () const
 Get the message handler. More...
 
CoinMessages blisMessages ()
 Return messages. More...
 
virtual void nodeLog (AlpsTreeNode *node, bool force)
 Node log. More...
 
virtual bool fathomAllNodes ()
 Return true, if all nodes can be fathomed. More...
 
virtual void registerKnowledge ()
 Register knowledge. More...
 
virtual AlpsEncodedencode () const
 The method that encodes the model into an encoded object. More...
 
virtual void decodeToSelf (AlpsEncoded &)
 The method that decodes the model from an encoded object. More...
 
virtual AlpsEncodedpackSharedKnowlege ()
 Pack knowledge to be shared with others into an encoded object. More...
 
virtual void unpackSharedKnowledge (AlpsEncoded &)
 Unpack and store shared knowledge from an encoded object. More...
 
virtual void presolveForTheWholeTree ()
 
Branching Strategys

See the BcpsBranchStrategy class for additional information.

BcpsBranchStrategybranchStrategy () const
 Get the current branching strategy. More...
 
void setBranchingMethod (BcpsBranchStrategy *method)
 Set the branching strategy. More...
 
void setBranchingMethod (BcpsBranchStrategy &method)
 Set the branching stratedy. More...
 
BcpsBranchStrategybranchStrategy () const
 Get the current branching strategy. More...
 
void setBranchingMethod (BcpsBranchStrategy *method)
 Set the branching strategy. More...
 
void setBranchingMethod (BcpsBranchStrategy &method)
 Set the branching stratedy. More...
 
BcpsBranchStrategyrampUpBranchStrategy () const
 Get the current branching strategy. More...
 
Object manipulation routines
int numObjects () const
 Get the number of objects. More...
 
void setNumObjects (int num)
 Set the number of objects. More...
 
BcpsObject ** objects ()
 Get the array of objects. More...
 
BcpsObjectobjects (int which)
 Get the specified object. More...
 
void deleteObjects ()
 Delete all object information. More...
 
void addObjects (int numObjects, BcpsObject **objects)
 Add in object information. More...
 
int numObjects () const
 Get the number of objects. More...
 
void setNumObjects (int num)
 Set the number of objects. More...
 
BcpsObject ** objects ()
 Get the array of objects. More...
 
BcpsObjectobjects (int which)
 Get the specified object. More...
 
void setSharedObjectMark (int i)
 Mark object to be shared. More...
 
void clearSharedObjectMark ()
 Clear all the share mark. More...
 
void deleteObjects ()
 Delete all object information. More...
 
void addObjects (int numObjects, BcpsObject **objects)
 Add in object information. More...
 
int getNumOldConstraints () const
 Get number of old constraints. More...
 
void setNumOldConstraints (int num)
 Set number of old constraints. More...
 
int getOldConstraintsSize () const
 Get max number of old constraints. More...
 
void setOldConstraintsSize (int num)
 Set max number of old constraints. More...
 
BlisConstraint ** oldConstraints ()
 Access old constraints. More...
 
void setOldConstraints (BlisConstraint **old)
 set old constraints. More...
 
void delOldConstraints ()
 Set max number of old constraints. More...
 
BlisParamsBlisPar ()
 Access parameters. More...
 
int getNumOldConstraints () const
 Get number of old constraints. More...
 
void setNumOldConstraints (int num)
 Set number of old constraints. More...
 
int getOldConstraintsSize () const
 Get max number of old constraints. More...
 
void setOldConstraintsSize (int num)
 Set max number of old constraints. More...
 
BlisConstraint ** oldConstraints ()
 Access old constraints. More...
 
void setOldConstraints (BlisConstraint **old)
 set old constraints. More...
 
void delOldConstraints ()
 Set max number of old constraints. More...
 
BlisParamsBlisPar ()
 Access parameters. More...
 
- Public Member Functions inherited from BcpsModel
 BcpsModel ()
 
virtual ~BcpsModel ()
 
std::vector< BcpsVariable * > getVariables () const
 Return list of variables. More...
 
std::vector< BcpsConstraint * > getConstrints () const
 Return list of constraints. More...
 
CoinMessageHandlerbcpsMessageHandler () const
 Get the message handler. More...
 
CoinMessages bcpsMessages ()
 Return messages. More...
 
AlpsReturnStatus encodeBcps (AlpsEncoded *encoded) const
 Pack Bcps portion of model into an encoded object. More...
 
AlpsReturnStatus decodeBcps (AlpsEncoded &encoded)
 Unpack Bcps portion of model from an encoded object. More...
 
std::vector< BcpsConstraint * > & getConstraints ()
 Get variables and constraints. More...
 
std::vector< BcpsVariable * > & getVariables ()
 Get variables and constraints. More...
 
int getNumCoreConstraints () const
 Get variables and constraints. More...
 
int getNumCoreVariables () const
 Get variables and constraints. More...
 
void setConstraints (BcpsConstraint **con, int size)
 Set variables and constraints. More...
 
void setNumCoreConstraints (int num)
 Set variables and constraints. More...
 
void setVariables (BcpsVariable **var, int size)
 Set variables and constraints. More...
 
void setNumCoreVariables (int num)
 Set variables and constraints. More...
 
- Public Member Functions inherited from AlpsModel
 AlpsModel ()
 Default construtor. More...
 
virtual ~AlpsModel ()
 Destructor. More...
 
AlpsKnowledgeBrokergetKnowledgeBroker ()
 Get knowledge broker. More...
 
void setKnowledgeBroker (AlpsKnowledgeBroker *b)
 Set knowledge broker. More...
 
std::string getDataFile () const
 Get the input file. More...
 
void setDataFile (std::string infile)
 Set the data file. More...
 
AlpsParamsAlpsPar ()
 Access Alps Parameters. More...
 
void writeParameters (std::ostream &outstream) const
 Write out parameters. More...
 
AlpsReturnStatus encodeAlps (AlpsEncoded *encoded) const
 Pack Alps portion of node into an encoded object. More...
 
AlpsReturnStatus decodeAlps (AlpsEncoded &encoded)
 Unpack Alps portion of node from an encoded object. More...
 
virtual void sendGeneratedKnowledge ()
 Send generated knowledge. More...
 
virtual void receiveGeneratedKnowledge ()
 Receive generated knowledge. More...
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 
virtual ~AlpsKnowledge ()
 
KnowledgeType getType ()
 
void setType (KnowledgeType t)
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const
 This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More...
 
AlpsEncodedgetEncoded () const
 Get/set encoded. More...
 
void setEncoded (AlpsEncoded *e)
 

Public Attributes

bool isRoot_
 If root node. More...
 
double startTime_
 Search starting time. More...
 
double timeLimit_
 Max solution time. More...
 
double integerTol_
 Integer tolerance. More...
 
double optimalRelGap_
 Relative optimal gap. More...
 
double optimalAbsGap_
 Absolute optimal gap. More...
 
bool useHeuristics_
 If use heuristics. More...
 
OsiCuts newCutPool_
 Store new cuts in each pass. More...
 
std::vector< AlpsTreeNode * > leafToRootPath
 Record the path from leaf to root. More...
 
int boundingPass_
 The number of passes during bounding procedure. More...
 
double currRelGap_
 Current relative optimal gap. More...
 
double currAbsGap_
 Current absolute optimal gap. More...
 
BlisHeurStrategy heurStrategy_
 If use heuristics. More...
 
int heurCallFrequency_
 Frequency of using heuristics. More...
 

Protected Member Functions

void init ()
 Intialize member data. More...
 
void createObjects ()
 Create variables and constraints. More...
 
AlpsReturnStatus encodeBlis (AlpsEncoded *encoded) const
 Pack Blis portion of the model into an encoded object. More...
 
AlpsReturnStatus decodeBlis (AlpsEncoded &encoded)
 Unpack Blis portion of the model from an encoded object. More...
 
void packSharedPseudocost (AlpsEncoded *encoded, int numToShare)
 Retrieve and pack shared pseudocost. More...
 
void unpackSharedPseudocost (AlpsEncoded &encoded)
 Unpack and store shared pseduocost. More...
 
void packSharedConstraints (AlpsEncoded *encoded)
 Retrieve and pack shared constraints. More...
 
void unpackSharedConstraints (AlpsEncoded &encoded)
 Unpack and store shared constraints. More...
 
void packSharedVariables (AlpsEncoded *encoded)
 Retrieve and pack shared variables. More...
 
void unpackSharedVariables (AlpsEncoded &encoded)
 Unpack and store shared variables. More...
 

Protected Attributes

OsiSolverInterfaceorigLpSolver_
 Input by user. More...
 
OsiSolverInterfacepresolvedLpSolver_
 Presolved. More...
 
BlisPresolvepresolve_
 
bool presolved
 
bool problemSetup
 
int * intObjIndices_
 
BcpsBranchStrategyrampUpBranchStrategy_
 
BlisHotStartStrategy hotstartStrategy_
 
char * sharedObjectMark_
 The objects that can be shared. More...
 
int numBranchResolve_
 Maximum number of resolve during branching. More...
 
BlisCutStrategy cutStrategy_
 If use cut generators. More...
 
int cutGenerationFrequency_
 Frequency of cut generation. More...
 
CoinMessageHandlerblisMessageHandler_
 Message handler. More...
 
CoinMessages blisMessages_
 Blis messages. More...
 
BcpsConstraintPoolconstraintPoolSend_
 Constraints that can be sent/broadcasted to other processes. More...
 
BcpsConstraintPoolconstraintPoolReceive_
 Constraints that are received from other processses. More...
 
double * varLB_
 Variable and constraint bounds. More...
 
double * varUB_
 Variable and constraint bounds. More...
 
double * conLB_
 Variable and constraint bounds. More...
 
double * conUB_
 Variable and constraint bounds. More...
 
int numIntObjects_
 Column types. More...
 
int * intColIndices_
 Column types. More...
 
std::vector< BcpsVariable * > inputVar_
 User's input objects. More...
 
std::vector< BcpsConstraint * > inputCon_
 User's input objects. More...
 
- Protected Attributes inherited from BcpsModel
std::vector< BcpsConstraint * > constraints_
 Constraints input by users (before preprocessing). More...
 
std::vector< BcpsVariable * > variables_
 Variables input by users (before preprocessing). More...
 
int numCoreConstraints_
 Number of core constraints. More...
 
int numCoreVariables_
 Number of core variables. More...
 
CoinMessageHandlerbcpsMessageHandler_
 Message handler. More...
 
CoinMessages bcpsMessages_
 Bcps messages. More...
 
- Protected Attributes inherited from AlpsModel
AlpsKnowledgeBrokerbroker_
 Knowledge broker. More...
 
std::string dataFile_
 Data file. More...
 
AlpsParamsAlpsPar_
 The parameter set that is used in Alps. More...
 
- Protected Attributes inherited from AlpsKnowledge
KnowledgeType type_
 

Private Attributes

OsiSolverInterfacelpSolver_
 Lp solver. More...
 
CoinPackedMatrixcolMatrix_
 Orignial column majored matrix. More...
 
int numSolutions_
 
int numHeurSolutions_
 
double incObjValue_
 Saved lp solution for temporatory usage. More...
 
double * incumbent_
 Incumbent. More...
 
double cutoff_
 Cutoff in lp solver. More...
 
double cutoffInc_
 Cutoff increment. More...
 
BcpsBranchStrategybranchStrategy_
 Variable selection function. More...
 
int hotstartStrategy_
 
int numObjects_
 Number of objects. More...
 
BcpsObject ** objects_
 The set of objects. More...
 
int * priority_
 Priorities of integer object. More...
 
AlpsTreeNodeactiveNode_
 Active node. More...
 
int numStrong_
 Number of strong branching. More...
 
double nodeWeight_
 
int numHeuristics_
 Number of heuristics. More...
 
BlisHeuristic ** heuristics_
 The list of heuristics. More...
 
int useCons_
 If use cut generators. More...
 
int numCutGenerators_
 Number of cut generators used. More...
 
int maxNumCons_
 Number of cuts can be generators. More...
 
BlisConGenerator ** generators_
 The list of cut generators used. More...
 
BcpsConstraintPoolconstraintPool_
 Store all the cuts. More...
 
BlisConstraint ** oldConstraints_
 Temporary store old cuts at a node when installing a node. More...
 
int oldConstraintsSize_
 The memory size allocated for oldConstraints_. More...
 
int numOldConstraints_
 Number of old constraints. More...
 
double * conRandoms_
 Random keys. More...
 
int denseConCutoff_
 Dense constraint cutoff. More...
 
BlisParamsBlisPar_
 Blis parameters. More...
 
CoinMessageHandlerhandler_
 Message handler. More...
 
int numNodes_
 Number of processed nodes. More...
 
int numIterations_
 Number of lp(Simplex) iterations. More...
 
int aveIterations_
 Average number of lp iterations to solve a subproblem. More...
 
double * origVarLB_
 Original variable and constraint bounds. More...
 
double * origVarUB_
 Original variable and constraint bounds. More...
 
double * origConLB_
 Original variable and constraint bounds. More...
 
double * origConUB_
 Original variable and constraint bounds. More...
 
int numCols_
 Number of columns/rows/elements in active subproblem. More...
 
int numRows_
 Number of columns/rows/elements in active subproblem. More...
 
int numElems_
 Number of columns/rows/elements in active subproblem. More...
 
double objSense_
 Objective function. More...
 
double * objCoef_
 Objective function. More...
 
int numIntVars_
 Column types. More...
 
int * intVars_
 Column types. More...
 
char * colType_
 Column types. More...
 
double * startVarLB_
 Starting var/con bounds for processing each node. More...
 
double * startVarUB_
 Starting var/con bounds for processing each node. More...
 
double * startConLB_
 Starting var/con bounds for processing each node. More...
 
double * startConUB_
 Starting var/con bounds for processing each node. More...
 
int * tempVarLBPos_
 Tempory storage for var/con indices. More...
 
int * tempVarUBPos_
 Tempory storage for var/con indices. More...
 
int * tempConLBPos_
 Tempory storage for var/con indices. More...
 
int * tempConUBPos_
 Tempory storage for var/con indices. More...
 

Detailed Description

Definition at line 60 of file BlisModel.h.

Constructor & Destructor Documentation

BlisModel::BlisModel ( )
inline

Default construtor.

Definition at line 276 of file BlisModel.h.

virtual BlisModel::~BlisModel ( )
virtual

Destructor.

BlisModel::BlisModel ( )
inline

Default construtor.

Definition at line 339 of file BlisModel.h.

virtual BlisModel::~BlisModel ( )
virtual

Destructor.

Member Function Documentation

void BlisModel::gutsOfDestructor ( )

Actual destructor.

void BlisModel::init ( )

Intialize member data.

virtual void BlisModel::readInstance ( const char *  dataFile)
virtual

Read in the instance data.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual void BlisModel::readParameters ( const int  argnum,
const char *const *  arglist 
)
virtual

Read in Alps, Blis parameters.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual void BlisModel::writeParameters ( std::ostream &  outstream) const
virtual

Write out parameters.

virtual AlpsTreeNode* BlisModel::createRoot ( )
virtual

Create the root node based on model.

Reimplemented from AlpsModel.

virtual bool BlisModel::setupSelf ( )
virtual

Do necessary work to make model usable.

Return success or not.

Reimplemented from AlpsModel.

virtual void BlisModel::setSolver ( OsiSolverInterface si)
inlinevirtual

Set lp solver.

Definition at line 307 of file BlisModel.h.

virtual OsiSolverInterface* BlisModel::solver ( )
inlinevirtual

Get lp solver.

Definition at line 310 of file BlisModel.h.

bool BlisModel::resolve ( )

Resolving a lp.

void BlisModel::setActiveNode ( AlpsTreeNode node)
inline

Set active node.

Definition at line 316 of file BlisModel.h.

void BlisModel::setSolEstimate ( double  est)
inline

Set the solution estimate of the active node.

Definition at line 319 of file BlisModel.h.

int BlisModel::getNumStrong ( )
inline

Get number of strong branchings.

Definition at line 322 of file BlisModel.h.

void BlisModel::addNumStrong ( int  num = 1)
inline

Add num to number of strong branchings.

Definition at line 325 of file BlisModel.h.

double* BlisModel::getObjCoef ( ) const
inline

Get objective coefficients.

Definition at line 332 of file BlisModel.h.

const double* BlisModel::getColLower ( )
inline

Get column lower bound.

Definition at line 335 of file BlisModel.h.

const double* BlisModel::getColUpper ( )
inline

Get column upper bound.

Definition at line 338 of file BlisModel.h.

int BlisModel::getNumCols ( )
inline

Get number of columns.

Definition at line 341 of file BlisModel.h.

int BlisModel::getNumRows ( )
inline

Get number of rows.

Definition at line 344 of file BlisModel.h.

double* BlisModel::origVarLB ( )
inline

Get original variable bounds arrary.

Definition at line 347 of file BlisModel.h.

double* BlisModel::origVarUB ( )
inline

Definition at line 348 of file BlisModel.h.

double* BlisModel::origConLB ( )
inline

Get original constraint bounds arrary.

Definition at line 351 of file BlisModel.h.

double* BlisModel::origConUB ( )
inline

Definition at line 352 of file BlisModel.h.

double* BlisModel::startVarLB ( )
inline

The starting variable bounds arrary of a subproblem (internal use).

Definition at line 355 of file BlisModel.h.

double* BlisModel::startVarUB ( )
inline

Definition at line 356 of file BlisModel.h.

double* BlisModel::startConLB ( )
inline

The starting constraint bounds arrary of a subproblem (internal use).

Definition at line 359 of file BlisModel.h.

double* BlisModel::startConUB ( )
inline

Definition at line 360 of file BlisModel.h.

int* BlisModel::tempVarLBPos ( )
inline

Temparory storage.

Definition at line 363 of file BlisModel.h.

int* BlisModel::tempVarUBPos ( )
inline

Definition at line 364 of file BlisModel.h.

int* BlisModel::tempConLBPos ( )
inline

Definition at line 365 of file BlisModel.h.

int* BlisModel::tempConUBPos ( )
inline

Definition at line 366 of file BlisModel.h.

double BlisModel::getLpObjValue ( ) const
inline

Get current objective function value.

Definition at line 373 of file BlisModel.h.

const double* BlisModel::getLpSolution ( ) const
inline

Get active lp solution.

Definition at line 376 of file BlisModel.h.

int BlisModel::getNumSolutions ( ) const
inline

Return the stored lp solution.

Get number of solutions.

Definition at line 386 of file BlisModel.h.

int BlisModel::getNumHeurSolutions ( ) const
inline

Get number of heuristic solutions.

Definition at line 389 of file BlisModel.h.

double* BlisModel::incumbent ( )
inline

Return best ip solution found so far.

Definition at line 392 of file BlisModel.h.

bool BlisModel::setBestSolution ( BLIS_SOL_TYPE  how,
double &  objectiveValue,
const double *  solution,
bool  fixVariables = false 
)

Record a new incumbent solution and update objectiveValue.

double BlisModel::getCutoff ( ) const
inline

Get cut off value.

Definition at line 401 of file BlisModel.h.

void BlisModel::setCutoff ( double  co)
inline

Set cut off value.

Definition at line 404 of file BlisModel.h.

bool BlisModel::feasibleSolution ( int &  numIntegerInfs)

Test the current lp solution for feasiblility.

Scan integer objects for indications of infeasibility.

bool BlisModel::feasibleSolution ( int &  numIntegerInfs,
int &  numObjectInfs 
)

Test the current solution for feasiblility.

Scan all objects for indications of infeasibility. This is broken down into simple integer infeasibility (numIntegerInfs) and all other reports of infeasibility(numObjectInfs).

BcpsBranchStrategy* BlisModel::branchStrategy ( ) const
inline

Get the current branching strategy.

Definition at line 431 of file BlisModel.h.

void BlisModel::setBranchingMethod ( BcpsBranchStrategy method)
inline

Set the branching strategy.

Definition at line 435 of file BlisModel.h.

void BlisModel::setBranchingMethod ( BcpsBranchStrategy method)
inline

Set the branching stratedy.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 441 of file BlisModel.h.

int BlisModel::numObjects ( ) const
inline

Get the number of objects.

Definition at line 451 of file BlisModel.h.

void BlisModel::setNumObjects ( int  num)
inline

Set the number of objects.

Definition at line 454 of file BlisModel.h.

BcpsObject** BlisModel::objects ( )
inline

Get the array of objects.

Definition at line 457 of file BlisModel.h.

BcpsObject* BlisModel::objects ( int  which)
inline

Get the specified object.

Definition at line 460 of file BlisModel.h.

void BlisModel::deleteObjects ( )

Delete all object information.

void BlisModel::addObjects ( int  numObjects,
BcpsObject **  objects 
)

Add in object information.

Objects are cloned; the owner can delete the originals.

void BlisModel::findIntegers ( bool  startAgain)

Identify integer variable.

int BlisModel::getNumIntVars ( ) const
inline

Get number of integers.

Definition at line 474 of file BlisModel.h.

int* BlisModel::getIntVars ( ) const
inline

Get integer indices.

Definition at line 477 of file BlisModel.h.

bool BlisModel::checkInteger ( double  value) const
inline

Check if a value is integer.

Definition at line 480 of file BlisModel.h.

void BlisModel::addHeuristic ( BlisHeuristic heur)

Add a heuristic.

BlisHeuristic* BlisModel::heuristics ( int  i) const
inline

Get a specific heuristic.

Definition at line 499 of file BlisModel.h.

int BlisModel::numHeuristics ( ) const
inline

Get the number of heuristics.

Definition at line 502 of file BlisModel.h.

void BlisModel::addCutGenerator ( CglCutGenerator generator,
const char *  name = NULL,
int  strategy = 0,
bool  normal = true,
bool  atSolution = false,
bool  whenInfeasible = false 
)

Add a cut generator.

BlisConGenerator* BlisModel::cutGenerators ( int  i) const
inline

Get a specific cut generator.

Definition at line 517 of file BlisModel.h.

int BlisModel::numCutGenerators ( ) const
inline

Get the number of cut generators.

Definition at line 520 of file BlisModel.h.

int BlisModel::getMaxNumCons ( ) const
inline

Get the max number of cuts can be generated.

Definition at line 523 of file BlisModel.h.

void BlisModel::setMaxNumCons ( int  m)
inline

Set the max number of cuts can be generated.

Definition at line 526 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPool ( )
inline

Access constraint pool.

Definition at line 529 of file BlisModel.h.

int BlisModel::getNumOldConstraints ( ) const
inline

Get number of old constraints.

Definition at line 533 of file BlisModel.h.

void BlisModel::setNumOldConstraints ( int  num)
inline

Set number of old constraints.

Definition at line 536 of file BlisModel.h.

int BlisModel::getOldConstraintsSize ( ) const
inline

Get max number of old constraints.

Definition at line 539 of file BlisModel.h.

void BlisModel::setOldConstraintsSize ( int  num)
inline

Set max number of old constraints.

Definition at line 542 of file BlisModel.h.

BlisConstraint** BlisModel::oldConstraints ( )
inline

Access old constraints.

Definition at line 545 of file BlisModel.h.

void BlisModel::setOldConstraints ( BlisConstraint **  old)
inline

set old constraints.

Definition at line 548 of file BlisModel.h.

void BlisModel::delOldConstraints ( )
inline

Set max number of old constraints.

Definition at line 551 of file BlisModel.h.

int BlisModel::useCons ( ) const
inline

Query constraint generation strategy.

Definition at line 558 of file BlisModel.h.

void BlisModel::setUseCons ( int  u)
inline

Set constraint generation strategy.

Definition at line 561 of file BlisModel.h.

int BlisModel::getDenseConCutoff ( ) const
inline

Get the thresheld to be considered as a dense constraint.

Definition at line 564 of file BlisModel.h.

void BlisModel::setDenseConCutoff ( int  cutoff)
inline

Set the thresheld to be considered as a dense constraint.

Definition at line 567 of file BlisModel.h.

double* BlisModel::getConRandoms ( ) const
inline

Get randoms for check parallel constraints.

Definition at line 570 of file BlisModel.h.

void BlisModel::passInPriorities ( const int *  priorities,
bool  ifNotSimpleIntegers,
int  defaultValue = 1000 
)

Pass in branching priorities.

If ifClique then priorities are on cliques otherwise priorities are on integer variables. Other type (if exists set to default) 1 is highest priority. (well actually -INT_MAX is but that's ugly) If hotstart > 0 then branches are created to force the variable to the value given by best solution. This enables a sort of hot start. The node choice should be greatest depth and hotstart should normally be switched off after a solution.

If ifNotSimpleIntegers true then appended to normal integers

const int* BlisModel::priority ( ) const
inline

Priorities.

Definition at line 595 of file BlisModel.h.

int BlisModel::priority ( int  sequence) const
inline

Returns priority level for an object (or 1000 if no priorities exist)

Definition at line 598 of file BlisModel.h.

const double BlisModel::getNodeWeight ( ) const
inline

Definition at line 603 of file BlisModel.h.

void BlisModel::setNodeWeight ( double  nw)
inline

Definition at line 605 of file BlisModel.h.

virtual void BlisModel::modelLog ( )
virtual

Log of specific models.

Reimplemented from AlpsModel.

int BlisModel::getNumNodes ( ) const
inline

Get how many Nodes it took to solve the problem.

Definition at line 616 of file BlisModel.h.

int BlisModel::getNumIterations ( ) const
inline

Get how many iterations it took to solve the problem.

Definition at line 619 of file BlisModel.h.

int BlisModel::getAveIterations ( ) const
inline

Get the average iterations it took to solve a lp.

Definition at line 622 of file BlisModel.h.

void BlisModel::addNumNodes ( int  newNodes = 1)
inline

Increment node count.

Definition at line 625 of file BlisModel.h.

void BlisModel::addNumIterations ( int  newIter)
inline

Increment Iteration count.

Definition at line 628 of file BlisModel.h.

CoinMessageHandler* BlisModel::messageHandler ( ) const
inline

Get the message handler.

Definition at line 634 of file BlisModel.h.

BlisParams* BlisModel::BlisPar ( )
inline

Access parameters.

Definition at line 638 of file BlisModel.h.

int BlisModel::getHotstartStrategy ( )
inline

Don't know what it is.

Definition at line 642 of file BlisModel.h.

void BlisModel::setHotstartStrategy ( int  value)
inline

Definition at line 643 of file BlisModel.h.

virtual void BlisModel::registerKnowledge ( )
virtual

Register knowledge.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual AlpsEncoded* BlisModel::encode ( ) const
virtual

The method that encodes the model into a encoded object.

Reimplemented from AlpsKnowledge.

Reimplemented in VrpModel.

virtual void BlisModel::decodeToSelf ( AlpsEncoded )
virtual

The method that decodes the model from a encoded object.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

void BlisModel::init ( )
protected

Intialize member data.

void BlisModel::createObjects ( )
protected

Create variables and constraints.

void BlisModel::gutsOfDestructor ( )

Actual destructor.

void BlisModel::setColMatrix ( CoinPackedMatrix mat)
inline

Pass a matrix in.

Definition at line 355 of file BlisModel.h.

void BlisModel::setNumCons ( int  num)
inline

Pass column upper bounds.

Definition at line 358 of file BlisModel.h.

void BlisModel::setNumVars ( int  num)
inline

Pass column upper bounds.

Definition at line 361 of file BlisModel.h.

void BlisModel::setNumElems ( int  num)
inline

Pass column upper bounds.

Definition at line 364 of file BlisModel.h.

void BlisModel::setConLb ( double *  cl)
inline

Pass column upper bounds.

Definition at line 367 of file BlisModel.h.

void BlisModel::setConUb ( double *  cu)
inline

Pass column lower bounds.

Definition at line 370 of file BlisModel.h.

void BlisModel::setVarLb ( double *  lb)
inline

Pass variable upper bounds.

Definition at line 373 of file BlisModel.h.

void BlisModel::setVarUb ( double *  ub)
inline

Pass variable lower bounds.

Definition at line 376 of file BlisModel.h.

void BlisModel::setColType ( char *  colType)
inline

Pass variable types.

Definition at line 379 of file BlisModel.h.

void BlisModel::setObjCoef ( double *  obj)
inline

Pass objective coefficients.

Definition at line 384 of file BlisModel.h.

virtual void BlisModel::readInstance ( const char *  dataFile)
virtual

For parallel code, only the master calls this function.

1) Read in the instance data 2) Set colMatrix_, varLB_, varUB_, conLB_, conUB numCols_, numRows_ 3) Set objCoef_ and objSense_ 4) Set colType_ ('C', 'I', or 'B') 5) Create variables and constraints 6) Set numCoreVariables_ and numCoreConstraints_

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual void BlisModel::importModel ( std::vector< BlisVariable * >  vars,
std::vector< BlisConstraint * >  cons 
)
virtual

For parallel code, only the master calls this function.

Import model from vars and cons. 1) Set colMatrix_, varLB_, varUB_, conLB_, conUB numCols_, numRows_ 2) Set objCoef_ (Assume minimization) 3) Set colType_ ('C', 'I', or 'B') 4) Set variables_ and constraints_ 5) Set numCoreVariables_ and numCoreConstraints_ NOTE: Blis takes over the memory ownship of vars and cons, which means users must NOT free vars or cons.

virtual void BlisModel::readParameters ( const int  argnum,
const char *const *  arglist 
)
virtual

Read in Alps, Blis parameters.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual void BlisModel::writeParameters ( std::ostream &  outstream) const
virtual

Write out parameters.

virtual AlpsTreeNode* BlisModel::createRoot ( )
virtual

For parallel code, only the master calls this function.

Create the root node based on model.

Reimplemented from AlpsModel.

virtual bool BlisModel::setupSelf ( )
virtual

All processes call this function.

Do necessary work to make model usable. Return success or not. 1) Set numIntObjects_, intColIndices_, intObjectIndices_ 2) Load problem to LP solver. 3) Create integer objects (must after load to lp since using lp info) 4) Set branch strategy 5) Add heuristics 6) Add Cgl cut generators

Reimplemented from AlpsModel.

virtual void BlisModel::preprocess ( )
virtual

Preprocessing the model.

Reimplemented from AlpsModel.

virtual void BlisModel::postprocess ( )
virtual

Postprocessing the searching results.

Reimplemented from AlpsModel.

virtual void BlisModel::setSolver ( OsiSolverInterface si)
inlinevirtual

Set lp solver.

Definition at line 440 of file BlisModel.h.

virtual OsiSolverInterface* BlisModel::getSolver ( )
inlinevirtual

Get lp solver.

Definition at line 443 of file BlisModel.h.

virtual OsiSolverInterface* BlisModel::solver ( )
inlinevirtual

Get lp solver.

Definition at line 446 of file BlisModel.h.

bool BlisModel::resolve ( )

Resolving a lp.

void BlisModel::setActiveNode ( AlpsTreeNode node)
inline

Set active node.

Definition at line 452 of file BlisModel.h.

void BlisModel::setSolEstimate ( double  est)
inline

Set the solution estimate of the active node.

Definition at line 455 of file BlisModel.h.

int BlisModel::getNumStrong ( )
inline

Get number of strong branchings.

Definition at line 458 of file BlisModel.h.

void BlisModel::addNumStrong ( int  num = 1)
inline

Add num to number of strong branchings.

Definition at line 461 of file BlisModel.h.

int BlisModel::getNumBranchResolve ( )
inline

Get the maximum number of resolve during branching.

Definition at line 464 of file BlisModel.h.

void BlisModel::setNumBranchResolve ( int  num)
inline

Set the maximum number of resolve during branching.

Definition at line 467 of file BlisModel.h.

double* BlisModel::getObjCoef ( ) const
inline

Get objective coefficients.

Definition at line 474 of file BlisModel.h.

const double* BlisModel::getColLower ( )
inline

Get column lower bound.

Definition at line 477 of file BlisModel.h.

const double* BlisModel::getColUpper ( )
inline

Get column upper bound.

Definition at line 480 of file BlisModel.h.

int BlisModel::getNumCols ( )
inline

Get number of columns.

Definition at line 483 of file BlisModel.h.

int BlisModel::getNumRows ( )
inline

Get number of rows.

Definition at line 486 of file BlisModel.h.

double* BlisModel::varLB ( )
inline

Get variable bounds arrary.

Definition at line 489 of file BlisModel.h.

double* BlisModel::varUB ( )
inline

Definition at line 490 of file BlisModel.h.

double* BlisModel::conLB ( )
inline

Get original constraint bounds arrary.

Definition at line 493 of file BlisModel.h.

double* BlisModel::conUB ( )
inline

Definition at line 494 of file BlisModel.h.

double* BlisModel::startVarLB ( )
inline

The starting variable bounds arrary of a subproblem (internal use).

Definition at line 497 of file BlisModel.h.

double* BlisModel::startVarUB ( )
inline

Definition at line 498 of file BlisModel.h.

double* BlisModel::startConLB ( )
inline

The starting constraint bounds arrary of a subproblem (internal use).

Definition at line 501 of file BlisModel.h.

double* BlisModel::startConUB ( )
inline

Definition at line 502 of file BlisModel.h.

int* BlisModel::tempVarLBPos ( )
inline

Temparory storage.

Definition at line 505 of file BlisModel.h.

int* BlisModel::tempVarUBPos ( )
inline

Definition at line 506 of file BlisModel.h.

int* BlisModel::tempConLBPos ( )
inline

Definition at line 507 of file BlisModel.h.

int* BlisModel::tempConUBPos ( )
inline

Definition at line 508 of file BlisModel.h.

double BlisModel::getLpObjValue ( ) const
inline

Get current objective function value.

Definition at line 515 of file BlisModel.h.

const double* BlisModel::getLpSolution ( ) const
inline

Get active lp solution.

Definition at line 518 of file BlisModel.h.

int BlisModel::getNumSolutions ( ) const
inline

Get number of solutions.

Definition at line 525 of file BlisModel.h.

int BlisModel::getNumHeurSolutions ( ) const
inline

Get number of heuristic solutions.

Definition at line 528 of file BlisModel.h.

double* BlisModel::incumbent ( )
inline

Return best ip solution found so far.

Definition at line 531 of file BlisModel.h.

int BlisModel::storeSolution ( BlisSolutionType  how,
BlisSolution sol 
)

Record a new incumbent solution and update objectiveValue.

double BlisModel::getCutoff ( ) const
inline

Get cut off value.

Definition at line 537 of file BlisModel.h.

void BlisModel::setCutoff ( double  co)
inline

Set cut off value.

Definition at line 540 of file BlisModel.h.

BlisSolution* BlisModel::feasibleSolutionHeur ( const double *  solution)

Test if a solution found by heuristic is feasible.

virtual BlisSolution* BlisModel::feasibleSolution ( int &  numIntegerInfs,
int &  numObjectInfs 
)
virtual

Test the current LP solution for feasiblility.

Scan all objects for indications of infeasibility. This is broken down into simple integer infeasibility (numIntegerInfs) and all other reports of infeasibility(numObjectInfs).

virtual BlisSolution* BlisModel::userFeasibleSolution ( const double *  solution,
bool &  feasible 
)
inlinevirtual

User's criteria for a feasible solution.

If user think the given solution is feasible then need 1) set userFeasible to true, and 2) return a non-null solution. If user think the solution is infeasible then need 1) set userFeasible to false, and 2) return a null.

Reimplemented in VrpModel.

Definition at line 571 of file BlisModel.h.

BcpsBranchStrategy* BlisModel::branchStrategy ( ) const
inline

Get the current branching strategy.

Definition at line 587 of file BlisModel.h.

void BlisModel::setBranchingMethod ( BcpsBranchStrategy method)
inline

Set the branching strategy.

Definition at line 591 of file BlisModel.h.

void BlisModel::setBranchingMethod ( BcpsBranchStrategy method)
inline

Set the branching stratedy.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 597 of file BlisModel.h.

BcpsBranchStrategy* BlisModel::rampUpBranchStrategy ( ) const
inline

Get the current branching strategy.

Definition at line 601 of file BlisModel.h.

int BlisModel::numObjects ( ) const
inline

Get the number of objects.

Definition at line 609 of file BlisModel.h.

void BlisModel::setNumObjects ( int  num)
inline

Set the number of objects.

Definition at line 612 of file BlisModel.h.

BcpsObject** BlisModel::objects ( )
inline

Get the array of objects.

Definition at line 615 of file BlisModel.h.

BcpsObject* BlisModel::objects ( int  which)
inline

Get the specified object.

Definition at line 618 of file BlisModel.h.

void BlisModel::setSharedObjectMark ( int  i)
inline

Mark object to be shared.

Definition at line 621 of file BlisModel.h.

void BlisModel::clearSharedObjectMark ( )
inline

Clear all the share mark.

Definition at line 624 of file BlisModel.h.

void BlisModel::deleteObjects ( )

Delete all object information.

void BlisModel::addObjects ( int  numObjects,
BcpsObject **  objects 
)

Add in object information.

Objects are cloned; the owner can delete the originals.

void BlisModel::createIntgerObjects ( bool  startAgain)

Identify integer variable.

int* BlisModel::getIntObjIndices ( ) const
inline

Get integers' object indices.

Definition at line 642 of file BlisModel.h.

int BlisModel::getNumIntObjects ( ) const
inline

Get number of integers.

Definition at line 645 of file BlisModel.h.

int* BlisModel::getIntColIndices ( ) const
inline

Get integers' column indices.

Definition at line 648 of file BlisModel.h.

bool BlisModel::checkInteger ( double  value) const
inline

Check if a value is integer.

Definition at line 651 of file BlisModel.h.

void BlisModel::analyzeObjective ( )
void BlisModel::addHeuristic ( BlisHeuristic heur)

Add a heuristic.

BlisHeuristic* BlisModel::heuristics ( int  i) const
inline

Get a specific heuristic.

Definition at line 672 of file BlisModel.h.

int BlisModel::numHeuristics ( ) const
inline

Get the number of heuristics.

Definition at line 675 of file BlisModel.h.

void BlisModel::addCutGenerator ( BlisConGenerator generator)

Add a Blis cut generator.

void BlisModel::addCutGenerator ( CglCutGenerator generator,
const char *  name = NULL,
BlisCutStrategy  strategy = BlisCutStrategyAuto,
int  cutGenerationFrequency = 1,
bool  normal = true,
bool  atSolution = false,
bool  whenInfeasible = false 
)

Add a Cgl cut generator.

BlisConGenerator* BlisModel::cutGenerators ( int  i) const
inline

Get a specific cut generator.

Definition at line 694 of file BlisModel.h.

int BlisModel::numCutGenerators ( ) const
inline

Get the number of cut generators.

Definition at line 697 of file BlisModel.h.

int BlisModel::getMaxNumCons ( ) const
inline

Get the max number of cuts can be generated.

Definition at line 700 of file BlisModel.h.

void BlisModel::setMaxNumCons ( int  m)
inline

Set the max number of cuts can be generated.

Definition at line 703 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPool ( )
inline

Access constraint pool.

Definition at line 706 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPoolReceive ( )
inline

Access receive constraint pool.

Definition at line 709 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPoolSend ( )
inline

Access send constraint pool.

Definition at line 713 of file BlisModel.h.

int BlisModel::getNumOldConstraints ( ) const
inline

Get number of old constraints.

Definition at line 717 of file BlisModel.h.

void BlisModel::setNumOldConstraints ( int  num)
inline

Set number of old constraints.

Definition at line 720 of file BlisModel.h.

int BlisModel::getOldConstraintsSize ( ) const
inline

Get max number of old constraints.

Definition at line 723 of file BlisModel.h.

void BlisModel::setOldConstraintsSize ( int  num)
inline

Set max number of old constraints.

Definition at line 726 of file BlisModel.h.

BlisConstraint** BlisModel::oldConstraints ( )
inline

Access old constraints.

Definition at line 729 of file BlisModel.h.

void BlisModel::setOldConstraints ( BlisConstraint **  old)
inline

set old constraints.

Definition at line 732 of file BlisModel.h.

void BlisModel::delOldConstraints ( )
inline

Set max number of old constraints.

Definition at line 735 of file BlisModel.h.

BlisCutStrategy BlisModel::getCutStrategy ( ) const
inline

Query constraint generation strategy.

Definition at line 742 of file BlisModel.h.

void BlisModel::setCutStrategy ( BlisCutStrategy  u)
inline

Set constraint generation strategy.

Definition at line 747 of file BlisModel.h.

int BlisModel::getCutGenerationFrequency ( ) const
inline

Query constraint generation frequency.

Definition at line 750 of file BlisModel.h.

void BlisModel::setCutStrategy ( int  f)
inline

Set constraint generation frequency.

Definition at line 753 of file BlisModel.h.

int BlisModel::getDenseConCutoff ( ) const
inline

Get the thresheld to be considered as a dense constraint.

Definition at line 756 of file BlisModel.h.

void BlisModel::setDenseConCutoff ( int  cutoff)
inline

Set the thresheld to be considered as a dense constraint.

Definition at line 759 of file BlisModel.h.

double* BlisModel::getConRandoms ( ) const
inline

Get randoms for check parallel constraints.

Definition at line 762 of file BlisModel.h.

void BlisModel::passInPriorities ( const int *  priorities,
bool  ifNotSimpleIntegers,
int  defaultValue = 1000 
)

Pass in branching priorities.

If ifClique then priorities are on cliques otherwise priorities are on integer variables. Other type (if exists set to default) 1 is highest priority. (well actually -INT_MAX is but that's ugly) If hotstart > 0 then branches are created to force the variable to the value given by best solution. This enables a sort of hot start. The node choice should be greatest depth and hotstart should normally be switched off after a solution.

If ifNotSimpleIntegers true then appended to normal integers

const int* BlisModel::priority ( ) const
inline

Priorities.

Definition at line 787 of file BlisModel.h.

int BlisModel::priority ( int  sequence) const
inline

Returns priority level for an object (or 1000 if no priorities exist)

Definition at line 790 of file BlisModel.h.

double BlisModel::getNodeWeight ( ) const
inline

Definition at line 795 of file BlisModel.h.

void BlisModel::setNodeWeight ( double  nw)
inline

Definition at line 797 of file BlisModel.h.

virtual void BlisModel::modelLog ( )
virtual

Log of specific models.

Reimplemented from AlpsModel.

int BlisModel::getNumNodes ( ) const
inline

Get how many Nodes it took to solve the problem.

Definition at line 808 of file BlisModel.h.

int BlisModel::getNumIterations ( ) const
inline

Get how many iterations it took to solve the problem.

Definition at line 811 of file BlisModel.h.

int BlisModel::getAveIterations ( ) const
inline

Get the average iterations it took to solve a lp.

Definition at line 814 of file BlisModel.h.

void BlisModel::addNumNodes ( int  newNodes = 1)
inline

Increment node count.

Definition at line 817 of file BlisModel.h.

void BlisModel::addNumIterations ( int  newIter)
inline

Increment Iteration count.

Definition at line 820 of file BlisModel.h.

CoinMessageHandler* BlisModel::blisMessageHandler ( ) const
inline

Get the message handler.

Definition at line 826 of file BlisModel.h.

CoinMessages BlisModel::blisMessages ( )
inline

Return messages.

Definition at line 830 of file BlisModel.h.

BlisParams* BlisModel::BlisPar ( )
inline

Access parameters.

Definition at line 834 of file BlisModel.h.

virtual void BlisModel::nodeLog ( AlpsTreeNode node,
bool  force 
)
virtual

Node log.

Reimplemented from AlpsModel.

virtual bool BlisModel::fathomAllNodes ( )
virtual

Return true, if all nodes can be fathomed.

Reimplemented from AlpsModel.

AlpsReturnStatus BlisModel::encodeBlis ( AlpsEncoded encoded) const
protected

Pack Blis portion of the model into an encoded object.

AlpsReturnStatus BlisModel::decodeBlis ( AlpsEncoded encoded)
protected

Unpack Blis portion of the model from an encoded object.

void BlisModel::packSharedPseudocost ( AlpsEncoded encoded,
int  numToShare 
)
protected

Retrieve and pack shared pseudocost.

void BlisModel::unpackSharedPseudocost ( AlpsEncoded encoded)
protected

Unpack and store shared pseduocost.

void BlisModel::packSharedConstraints ( AlpsEncoded encoded)
protected

Retrieve and pack shared constraints.

void BlisModel::unpackSharedConstraints ( AlpsEncoded encoded)
protected

Unpack and store shared constraints.

void BlisModel::packSharedVariables ( AlpsEncoded encoded)
protected

Retrieve and pack shared variables.

void BlisModel::unpackSharedVariables ( AlpsEncoded encoded)
protected

Unpack and store shared variables.

virtual void BlisModel::registerKnowledge ( )
virtual

Register knowledge.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual AlpsEncoded* BlisModel::encode ( ) const
virtual

The method that encodes the model into an encoded object.

Reimplemented from AlpsKnowledge.

Reimplemented in VrpModel.

virtual void BlisModel::decodeToSelf ( AlpsEncoded )
virtual

The method that decodes the model from an encoded object.

Reimplemented from AlpsModel.

Reimplemented in VrpModel.

virtual AlpsEncoded* BlisModel::packSharedKnowlege ( )
virtual

Pack knowledge to be shared with others into an encoded object.

Return NULL means that no knowledge can be shared.

Reimplemented from AlpsModel.

virtual void BlisModel::unpackSharedKnowledge ( AlpsEncoded )
virtual

Unpack and store shared knowledge from an encoded object.

Reimplemented from AlpsModel.

virtual void BlisModel::presolveForTheWholeTree ( )
virtual

Member Data Documentation

OsiSolverInterface * BlisModel::lpSolver_
private

Lp solver.

Actually used.

If using presolve, then it is presolved; otherwise it is the original.

Definition at line 69 of file BlisModel.h.

CoinPackedMatrix * BlisModel::colMatrix_
private

Orignial column majored matrix.

Column majored matrix.

(For MPS file, etc.)

Definition at line 76 of file BlisModel.h.

double* BlisModel::origVarLB_
private

Original variable and constraint bounds.

Definition at line 80 of file BlisModel.h.

double* BlisModel::origVarUB_
private

Original variable and constraint bounds.

Definition at line 81 of file BlisModel.h.

double* BlisModel::origConLB_
private

Original variable and constraint bounds.

Definition at line 82 of file BlisModel.h.

double* BlisModel::origConUB_
private

Original variable and constraint bounds.

Definition at line 83 of file BlisModel.h.

int BlisModel::numCols_
private

Number of columns/rows/elements in active subproblem.

Number of columns/rows/elements.

Initaially is the same as numCoreVariables.

Definition at line 89 of file BlisModel.h.

int BlisModel::numRows_
private

Number of columns/rows/elements in active subproblem.

Number of columns/rows/elements.

Initaially is the same as numCoreVariables.

Definition at line 90 of file BlisModel.h.

int BlisModel::numElems_
private

Number of columns/rows/elements in active subproblem.

Number of columns/rows/elements.

Initaially is the same as numCoreVariables.

Definition at line 91 of file BlisModel.h.

double BlisModel::objSense_
private

Objective function.

Definition at line 96 of file BlisModel.h.

double * BlisModel::objCoef_
private

Objective function.

Definition at line 97 of file BlisModel.h.

int BlisModel::numIntVars_
private

Column types.

Definition at line 102 of file BlisModel.h.

int* BlisModel::intVars_
private

Column types.

Definition at line 103 of file BlisModel.h.

char * BlisModel::colType_
private

Column types.

Definition at line 104 of file BlisModel.h.

int BlisModel::numSolutions_
private

Definition at line 111 of file BlisModel.h.

int BlisModel::numHeurSolutions_
private

Definition at line 112 of file BlisModel.h.

double BlisModel::incObjValue_
private

Saved lp solution for temporatory usage.

Incumbent objective value.

Definition at line 118 of file BlisModel.h.

double * BlisModel::incumbent_
private

Incumbent.

Definition at line 121 of file BlisModel.h.

double BlisModel::cutoff_
private

Cutoff in lp solver.

Definition at line 124 of file BlisModel.h.

double BlisModel::cutoffInc_
private

Cutoff increment.

Definition at line 127 of file BlisModel.h.

double * BlisModel::startVarLB_
private

Starting var/con bounds for processing each node.

Definition at line 135 of file BlisModel.h.

double * BlisModel::startVarUB_
private

Starting var/con bounds for processing each node.

Definition at line 136 of file BlisModel.h.

double * BlisModel::startConLB_
private

Starting var/con bounds for processing each node.

Definition at line 137 of file BlisModel.h.

double * BlisModel::startConUB_
private

Starting var/con bounds for processing each node.

Definition at line 138 of file BlisModel.h.

BcpsBranchStrategy * BlisModel::branchStrategy_
private

Variable selection function.

Definition at line 142 of file BlisModel.h.

int BlisModel::hotstartStrategy_
private

Definition at line 147 of file BlisModel.h.

int BlisModel::numObjects_
private

Number of objects.

Definition at line 150 of file BlisModel.h.

BcpsObject ** BlisModel::objects_
private

The set of objects.

Definition at line 153 of file BlisModel.h.

int * BlisModel::priority_
private

Priorities of integer object.

Definition at line 156 of file BlisModel.h.

AlpsTreeNode * BlisModel::activeNode_
private

Active node.

Definition at line 159 of file BlisModel.h.

int BlisModel::numStrong_
private

Number of strong branching.

Definition at line 162 of file BlisModel.h.

double BlisModel::nodeWeight_
private

Definition at line 165 of file BlisModel.h.

int BlisModel::numHeuristics_
private

Number of heuristics.

Definition at line 172 of file BlisModel.h.

BlisHeuristic ** BlisModel::heuristics_
private

The list of heuristics.

Definition at line 175 of file BlisModel.h.

int BlisModel::useCons_
private

If use cut generators.

Definition at line 182 of file BlisModel.h.

int BlisModel::numCutGenerators_
private

Number of cut generators used.

Definition at line 185 of file BlisModel.h.

int BlisModel::maxNumCons_
private

Number of cuts can be generators.

Definition at line 188 of file BlisModel.h.

BlisConGenerator ** BlisModel::generators_
private

The list of cut generators used.

Definition at line 191 of file BlisModel.h.

BcpsConstraintPool * BlisModel::constraintPool_
private

Store all the cuts.

Definition at line 194 of file BlisModel.h.

BlisConstraint ** BlisModel::oldConstraints_
private

Temporary store old cuts at a node when installing a node.

Definition at line 197 of file BlisModel.h.

int BlisModel::oldConstraintsSize_
private

The memory size allocated for oldConstraints_.

Definition at line 200 of file BlisModel.h.

int BlisModel::numOldConstraints_
private

Number of old constraints.

Definition at line 203 of file BlisModel.h.

double * BlisModel::conRandoms_
private

Random keys.

Definition at line 206 of file BlisModel.h.

int BlisModel::denseConCutoff_
private

Dense constraint cutoff.

Definition at line 209 of file BlisModel.h.

BlisParams * BlisModel::BlisPar_
private

Blis parameters.

Definition at line 216 of file BlisModel.h.

CoinMessageHandler* BlisModel::handler_
private

Message handler.

Definition at line 219 of file BlisModel.h.

int BlisModel::numNodes_
private

Number of processed nodes.

Definition at line 222 of file BlisModel.h.

int BlisModel::numIterations_
private

Number of lp(Simplex) iterations.

Definition at line 225 of file BlisModel.h.

int BlisModel::aveIterations_
private

Average number of lp iterations to solve a subproblem.

Definition at line 228 of file BlisModel.h.

int * BlisModel::tempVarLBPos_
private

Tempory storage for var/con indices.

Definition at line 236 of file BlisModel.h.

int * BlisModel::tempVarUBPos_
private

Tempory storage for var/con indices.

Definition at line 237 of file BlisModel.h.

int * BlisModel::tempConLBPos_
private

Tempory storage for var/con indices.

Definition at line 238 of file BlisModel.h.

int * BlisModel::tempConUBPos_
private

Tempory storage for var/con indices.

Definition at line 239 of file BlisModel.h.

bool BlisModel::isRoot_

If root node.

Definition at line 245 of file BlisModel.h.

double BlisModel::startTime_

Search starting time.

Definition at line 248 of file BlisModel.h.

double BlisModel::timeLimit_

Max solution time.

Definition at line 251 of file BlisModel.h.

double BlisModel::integerTol_

Integer tolerance.

Definition at line 254 of file BlisModel.h.

double BlisModel::optimalRelGap_

Relative optimal gap.

Input relative optimal gap.

Definition at line 257 of file BlisModel.h.

double BlisModel::optimalAbsGap_

Absolute optimal gap.

Input absolute optimal gap.

Definition at line 260 of file BlisModel.h.

bool BlisModel::useHeuristics_

If use heuristics.

Definition at line 263 of file BlisModel.h.

OsiCuts BlisModel::newCutPool_

Store new cuts in each pass.

Definition at line 266 of file BlisModel.h.

std::vector< AlpsTreeNode * > BlisModel::leafToRootPath

Record the path from leaf to root.

Definition at line 271 of file BlisModel.h.

OsiSolverInterface* BlisModel::origLpSolver_
protected

Input by user.

Definition at line 78 of file BlisModel.h.

OsiSolverInterface* BlisModel::presolvedLpSolver_
protected

Presolved.

Definition at line 80 of file BlisModel.h.

double* BlisModel::varLB_
protected

Variable and constraint bounds.

Definition at line 94 of file BlisModel.h.

double* BlisModel::varUB_
protected

Variable and constraint bounds.

Definition at line 95 of file BlisModel.h.

double* BlisModel::conLB_
protected

Variable and constraint bounds.

Definition at line 96 of file BlisModel.h.

double* BlisModel::conUB_
protected

Variable and constraint bounds.

Definition at line 97 of file BlisModel.h.

int BlisModel::numIntObjects_
protected

Column types.

Definition at line 115 of file BlisModel.h.

int* BlisModel::intColIndices_
protected

Column types.

Definition at line 116 of file BlisModel.h.

std::vector<BcpsVariable *> BlisModel::inputVar_
protected

User's input objects.

Definition at line 121 of file BlisModel.h.

std::vector<BcpsConstraint *> BlisModel::inputCon_
protected

User's input objects.

Definition at line 122 of file BlisModel.h.

BlisPresolve* BlisModel::presolve_
protected

Definition at line 129 of file BlisModel.h.

bool BlisModel::presolved
protected

Definition at line 131 of file BlisModel.h.

bool BlisModel::problemSetup
protected

Definition at line 132 of file BlisModel.h.

int* BlisModel::intObjIndices_
protected

Definition at line 158 of file BlisModel.h.

BcpsBranchStrategy* BlisModel::rampUpBranchStrategy_
protected

Definition at line 171 of file BlisModel.h.

BlisHotStartStrategy BlisModel::hotstartStrategy_
protected

Definition at line 176 of file BlisModel.h.

char* BlisModel::sharedObjectMark_
protected

The objects that can be shared.

Definition at line 185 of file BlisModel.h.

int BlisModel::numBranchResolve_
protected

Maximum number of resolve during branching.

Definition at line 200 of file BlisModel.h.

BlisCutStrategy BlisModel::cutStrategy_
protected

If use cut generators.

Definition at line 217 of file BlisModel.h.

int BlisModel::cutGenerationFrequency_
protected

Frequency of cut generation.

Definition at line 220 of file BlisModel.h.

CoinMessageHandler* BlisModel::blisMessageHandler_
protected

Message handler.

Definition at line 257 of file BlisModel.h.

CoinMessages BlisModel::blisMessages_
protected

Blis messages.

Definition at line 260 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPoolSend_
protected

Constraints that can be sent/broadcasted to other processes.

Definition at line 288 of file BlisModel.h.

BcpsConstraintPool* BlisModel::constraintPoolReceive_
protected

Constraints that are received from other processses.

Definition at line 291 of file BlisModel.h.

int BlisModel::boundingPass_

The number of passes during bounding procedure.

Definition at line 299 of file BlisModel.h.

double BlisModel::currRelGap_

Current relative optimal gap.

Definition at line 311 of file BlisModel.h.

double BlisModel::currAbsGap_

Current absolute optimal gap.

Definition at line 314 of file BlisModel.h.

BlisHeurStrategy BlisModel::heurStrategy_

If use heuristics.

Definition at line 317 of file BlisModel.h.

int BlisModel::heurCallFrequency_

Frequency of using heuristics.

Definition at line 320 of file BlisModel.h.


The documentation for this class was generated from the following files: