295 virtual void readParameters(
const int argnum,
const char *
const *arglist);
396 double & objectiveValue,
397 const double *solution,
398 bool fixVariables =
false);
481 double integerTolerance = 1.0e-5;
482 double nearest = floor(value + 0.5);
483 if (fabs(value - nearest) <= integerTolerance) {
510 const char * name = NULL,
513 bool atSolution =
false,
514 bool whenInfeasible =
false);
591 bool ifNotSimpleIntegers,
592 int defaultValue = 1000);
double * startVarLB()
The starting variable bounds arrary of a subproblem (internal use).
int numHeuristics() const
Get the number of heuristics.
double cutoffInc_
Cutoff increment.
double optimalAbsGap_
Absolute optimal gap.
BlisHeuristic ** heuristics_
The list of heuristics.
int getNumStrong()
Get number of strong branchings.
BcpsObject ** objects_
The set of objects.
void delOldConstraints()
Set max number of old constraints.
double * startConLB_
Starting var/con bounds for processing each node.
int numOldConstraints_
Number of old constraints.
BlisConGenerator * cutGenerators(int i) const
Get a specific cut generator.
int numStrong_
Number of strong branching.
const double getNodeWeight() const
int * getIntVars() const
Get integer indices.
Base class for message handling.
BlisParams * BlisPar()
Access parameters.
int numObjects() const
Get the number of objects.
int numObjects_
Number of objects.
BlisHeuristic * heuristics(int i) const
Get a specific heuristic.
int denseConCutoff_
Dense constraint cutoff.
int getNumHeurSolutions() const
Get number of heuristic solutions.
bool feasibleSolution(int &numIntegerInfs)
Test the current lp solution for feasiblility.
double * origConUB_
Original variable and constraint bounds.
BcpsConstraintPool * constraintPool()
Access constraint pool.
const double * getColUpper()
Get column upper bound.
int getNumOldConstraints() const
Get number of old constraints.
int getAveIterations() const
Get the average iterations it took to solve a lp.
BlisConGenerator ** generators_
The list of cut generators used.
virtual void readInstance(const char *dataFile)
Read in the instance data.
int numCutGenerators() const
Get the number of cut generators.
int getMaxNumCons() const
Get the max number of cuts can be generated.
virtual const double * getColUpper() const =0
Get a pointer to an array[getNumCols()] of column upper bounds.
virtual int getNumCols() const =0
Get the number of columns.
BlisConstraint ** oldConstraints_
Temporary store old cuts at a node when installing a node.
void setSolEstimate(double est)
Set the solution estimate of the active node.
double * origVarUB_
Original variable and constraint bounds.
double startTime_
Search starting time.
virtual AlpsEncoded * encode() const
The method that encodes the model into a encoded object.
A class for describing the objects that comprise a BCPS subproblem.
double * origVarLB_
Original variable and constraint bounds.
void setBranchingMethod(BcpsBranchStrategy &method)
Set the branching stratedy.
int * priority_
Priorities of integer object.
int maxNumCons_
Number of cuts can be generators.
Sparse Matrix Base Class.
virtual ~BlisModel()
Destructor.
double * startVarUB_
Starting var/con bounds for processing each node.
int getDenseConCutoff() const
Get the thresheld to be considered as a dense constraint.
double getLpObjValue() const
Get current objective function value.
virtual double getObjSense() const =0
Get the objective function sense.
void init()
Intialize member data.
double * getObjCoef() const
Get objective coefficients.
double timeLimit_
Max solution time.
int numCutGenerators_
Number of cut generators used.
Collections of row cuts and column cuts.
void addObjects(int numObjects, BcpsObject **objects)
Add in object information.
This data structure is to contain the packed form of an encodable knowledge.
bool checkInteger(double value) const
Check if a value is integer.
void setBranchingMethod(BcpsBranchStrategy *method)
Set the branching strategy.
BcpsConstraintPool * constraintPool_
Store all the cuts.
int getNumNodes() const
Get how many Nodes it took to solve the problem.
int * tempVarLBPos()
Temparory storage.
int numIntVars_
Column types.
void setSolEstimate(double est)
Query/set the solution estimate of the node.
double optimalRelGap_
Relative optimal gap.
void addCutGenerator(CglCutGenerator *generator, const char *name=NULL, int strategy=0, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
Add a cut generator.
void setNumOldConstraints(int num)
Set number of old constraints.
virtual double getObjValue() const =0
Get the objective function value.
int numHeuristics_
Number of heuristics.
bool setBestSolution(BLIS_SOL_TYPE how, double &objectiveValue, const double *solution, bool fixVariables=false)
Record a new incumbent solution and update objectiveValue.
int * intVars_
Column types.
Interface between Blis and Cut Generation Library.
int * tempConUBPos_
Tempory storage for var/con indices.
void setMaxNumCons(int m)
Set the max number of cuts can be generated.
This class holds one node of the search tree.
double cutoff_
Cutoff in lp solver.
CoinMessageHandler * messageHandler() const
Get the message handler.
virtual int getNumRows() const =0
Get the number of rows.
BcpsObject * objects(int which)
Get the specified object.
double * startConUB_
Starting var/con bounds for processing each node.
double * startVarLB_
Starting var/con bounds for processing each node.
void setNodeWeight(double nw)
virtual OsiSolverInterface * solver()
Get lp solver.
virtual const double * getColLower() const =0
Get a pointer to an array[getNumCols()] of column lower bounds.
virtual bool setupSelf()
Do necessary work to make model usable.
char * colType_
Column types.
virtual const double * getColSolution() const =0
Get a pointer to an array[getNumCols()] of primal variable values.
int priority(int sequence) const
Returns priority level for an object (or 1000 if no priorities exist)
double getCutoff() const
Get cut off value.
BlisModel()
Default construtor.
int getNumSolutions() const
Return the stored lp solution.
BcpsBranchStrategy * branchStrategy() const
Get the current branching strategy.
int numIterations_
Number of lp(Simplex) iterations.
double objSense_
Objective function.
This is a first attempt at a message handler.
int oldConstraintsSize_
The memory size allocated for oldConstraints_.
double * origConLB_
Original variable and constraint bounds.
Abstract Base Class for describing an interface to a solver.
int numElems_
Number of columns/rows/elements in active subproblem.
Branching strategy specifies: (1) how to select a candidate set of branching objects (2) how to compa...
void setDenseConCutoff(int cutoff)
Set the thresheld to be considered as a dense constraint.
double incObjValue_
Saved lp solution for temporatory usage.
Cut Generator Base Class.
double * startConLB()
The starting constraint bounds arrary of a subproblem (internal use).
virtual void modelLog()
Log of specific models.
void gutsOfDestructor()
Actual destructor.
virtual void setSolver(OsiSolverInterface *si)
Set lp solver.
void setCutoff(double co)
Set cut off value.
virtual AlpsTreeNode * createRoot()
Create the root node based on model.
double * objCoef_
Objective function.
double * conRandoms_
Random keys.
OsiCuts newCutPool_
Store new cuts in each pass.
void setOldConstraintsSize(int num)
Set max number of old constraints.
int getNumRows()
Get number of rows.
int numCols_
Number of columns/rows/elements in active subproblem.
int numNodes_
Number of processed nodes.
int useCons() const
Query constraint generation strategy.
double * origConLB()
Get original constraint bounds arrary.
double * getConRandoms() const
Get randoms for check parallel constraints.
int * tempConLBPos_
Tempory storage for var/con indices.
double * incumbent()
Return best ip solution found so far.
void setUseCons(int u)
Set constraint generation strategy.
int getHotstartStrategy()
Don't know what it is.
BlisConstraint ** oldConstraints()
Access old constraints.
AlpsTreeNode * activeNode_
Active node.
BcpsObject ** objects()
Get the array of objects.
int aveIterations_
Average number of lp iterations to solve a subproblem.
int getOldConstraintsSize() const
Get max number of old constraints.
void setOldConstraints(BlisConstraint **old)
set old constraints.
void passInPriorities(const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
Pass in branching priorities.
bool isRoot_
If root node.
void findIntegers(bool startAgain)
Identify integer variable.
void addNumNodes(int newNodes=1)
Increment node count.
BcpsBranchStrategy * branchStrategy_
Variable selection function.
std::vector< AlpsTreeNode * > leafToRootPath
Record the path from leaf to root.
BlisParams * BlisPar_
Blis parameters.
void addNumIterations(int newIter)
Increment Iteration count.
void setHotstartStrategy(int value)
virtual void decodeToSelf(AlpsEncoded &)
The method that decodes the model from a encoded object.
int * tempVarLBPos_
Tempory storage for var/con indices.
void addNumStrong(int num=1)
Add num to number of strong branchings.
void deleteObjects()
Delete all object information.
bool resolve()
Resolving a lp.
bool useHeuristics_
If use heuristics.
void addHeuristic(BlisHeuristic *heur)
Add a heuristic.
int getNumIntVars() const
Get number of integers.
int getNumCols()
Get number of columns.
OsiSolverInterface * lpSolver_
Lp solver.
double * origVarLB()
Get original variable bounds arrary.
virtual void writeParameters(std::ostream &outstream) const
Write out parameters.
CoinPackedMatrix * colMatrix_
Orignial column majored matrix.
const double * getColLower()
Get column lower bound.
const double * getLpSolution() const
Get active lp solution.
int * tempVarUBPos_
Tempory storage for var/con indices.
const int * priority() const
Priorities.
virtual void registerKnowledge()
Register knowledge.
CoinMessageHandler * handler_
Message handler.
double * incumbent_
Incumbent.
virtual bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
int getNumIterations() const
Get how many iterations it took to solve the problem.
virtual void readParameters(const int argnum, const char *const *arglist)
Read in Alps, Blis parameters.
int numRows_
Number of columns/rows/elements in active subproblem.
int useCons_
If use cut generators.
double integerTol_
Integer tolerance.
void setActiveNode(AlpsTreeNode *node)
Set active node.
void setNumObjects(int num)
Set the number of objects.