- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

BlisModel.h
Go to the documentation of this file.
1 /*===========================================================================*
2 * This file is part of the Bcps Linear Solver (BLIS). *
3 * *
4 * BLIS is distributed under the Eclipse Public License as part of the *
5 * COIN-OR repository (http://www.coin-or.org). *
6 * *
7 * Authors: *
8 * *
9 * Yan Xu, Lehigh University *
10 * Ted Ralphs, Lehigh University *
11 * *
12 * Conceptual Design: *
13 * *
14 * Yan Xu, Lehigh University *
15 * Ted Ralphs, Lehigh University *
16 * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17 * Matthew Saltzman, Clemson University *
18 * *
19 * *
20 * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21 * All Rights Reserved. *
22 *===========================================================================*/
23
24 //#############################################################################
25
26 #ifndef BlisModel_h_
27 #define BlisModel_h_
28
29 //#############################################################################
30
31 #include "CoinMpsIO.hpp"
32 #include "CoinPackedMatrix.hpp"
33 #include "CoinMessageHandler.hpp"
34 #include "OsiSolverInterface.hpp"
35 #include "OsiCuts.hpp"
36 #include "CglCutGenerator.hpp"
37
38 #include "AlpsKnowledgeBroker.h"
39 #include "AlpsParams.h"
40
41 #include "BcpsModel.h"
42
43 #include "BcpsBranchStrategy.h"
44 #include "BcpsObject.h"
45 #include "BcpsObjectPool.h"
46
47 #include "Blis.h"
48 #include "BlisConGenerator.h"
49 #include "BlisHeuristic.h"
50 #include "BlisParams.h"
51
52 #include "AlpsTreeNode.h"
53
54 //#############################################################################
55
56 class BlisConstraint;
57
58 //#############################################################################
59
60 class BlisModel : public BcpsModel {
61
62 private:
63
64 //------------------------------------------------------
65 // LP SOLVER.
66 //------------------------------------------------------
67
69 OsiSolverInterface *lpSolver_;
70
71 //------------------------------------------------------
72 // PROBLEM DATA. Populate when readInstance() or decodeToSelf().
73 //------------------------------------------------------
74
76 CoinPackedMatrix *colMatrix_;
77
80 double *origVarLB_;
81 double *origVarUB_;
82 double *origConLB_;
83 double *origConUB_;
85
89 int numCols_;
90 int numRows_;
91 int numElems_;
93
96 double objSense_;
97 double *objCoef_;
99
102 int numIntVars_;
103 int *intVars_;
104 char *colType_;
106
107 //------------------------------------------------------
108 // SOLUTION.
109 //------------------------------------------------------
110
111 int numSolutions_;
112 int numHeurSolutions_;
113
115 //double *savedLpSolution_;
116
118 double incObjValue_;
119
121 double *incumbent_;
122
124 double cutoff_;
125
127 double cutoffInc_;
128
129 //------------------------------------------------------
130 // SEARCHING.
131 //------------------------------------------------------
132
135 double *startVarLB_;
136 double *startVarUB_;
137 double *startConLB_;
138 double *startConUB_;
140
142 BcpsBranchStrategy * branchStrategy_;
143
144 // Hotstart strategy 0 = off,
145 // 1 = branch if incorrect,
146 // 2 = branch even if correct, ....
147 int hotstartStrategy_;
148
150 int numObjects_;
151
153 BcpsObject **objects_;
154
156 int * priority_;
157
159 AlpsTreeNode *activeNode_;
160
162 int numStrong_;
163
164 // Not used.
165 double nodeWeight_;
166
167 //------------------------------------------------------
168 // HEURISTICS.
169 //------------------------------------------------------
170
172 int numHeuristics_;
173
175 BlisHeuristic ** heuristics_;
176
177 //------------------------------------------------------
178 // CONSTRAINTS.
179 //------------------------------------------------------
180
182 int useCons_;
183
185 int numCutGenerators_;
186
188 int maxNumCons_;
189
191 BlisConGenerator ** generators_;
192
194 BcpsConstraintPool *constraintPool_;
195
197 BlisConstraint **oldConstraints_;
198
200 int oldConstraintsSize_;
201
203 int numOldConstraints_;
204
206 double * conRandoms_;
207
209 int denseConCutoff_;
210
211 //------------------------------------------------------
212 // PARAMETERS, STATISTICS, and MESSAGE
213 //------------------------------------------------------
214
216 BlisParams *BlisPar_;
217
219 CoinMessageHandler * handler_;
220
222 int numNodes_;
223
225 int numIterations_;
226
228 int aveIterations_;
229
230 //------------------------------------------------------
231 // TEMPORARY STORAGE
232 //------------------------------------------------------
233
236 int *tempVarLBPos_;
237 int *tempVarUBPos_;
238 int *tempConLBPos_;
239 int *tempConUBPos_;
241
242 public:
243
245 bool isRoot_;
246
248 double startTime_;
249
251 double timeLimit_;
252
254 double integerTol_;
255
257 double optimalRelGap_;
258
260 double optimalAbsGap_;
261
263 bool useHeuristics_;
264
266 OsiCuts newCutPool_;
267
268 public:
269
271 std::vector<AlpsTreeNode *> leafToRootPath;
272
273 public:
274
276 BlisModel() { init(); }
277
279 virtual ~BlisModel();
280
282 void gutsOfDestructor();
283
284 //------------------------------------------------------
285 // SETUP, LP SOLVER
286 //------------------------------------------------------
287
289 void init();
290
292 virtual void readInstance(const char* dataFile);
293
295 virtual void readParameters(const int argnum, const char * const *arglist);
296
298 virtual void writeParameters(std::ostream& outstream) const;
299
301 virtual AlpsTreeNode * createRoot();
302
304 virtual bool setupSelf();
305
307 virtual void setSolver(OsiSolverInterface *si) { lpSolver_ = si; }
308
310 virtual OsiSolverInterface *solver() { return lpSolver_; }
311
313 bool resolve();
314
316 void setActiveNode(AlpsTreeNode *node) { activeNode_ = node; }
317
319 void setSolEstimate(double est) { activeNode_->setSolEstimate(est); }
320
322 int getNumStrong() { return numStrong_; }
323
325 void addNumStrong(int num=1) { numStrong_ += num; }
326
327 //------------------------------------------------------
328 // PROBLEM DATA
329 //------------------------------------------------------
330
332 double* getObjCoef() const { return objCoef_; }
333
335 const double * getColLower() { return lpSolver_->getColLower(); }
336
338 const double * getColUpper() { return lpSolver_->getColUpper(); }
339
341 int getNumCols() { return lpSolver_->getNumCols(); }
342
344 int getNumRows() { return lpSolver_->getNumRows(); }
345
347 double *origVarLB() { return origVarLB_; }
348 double *origVarUB() { return origVarUB_; }
349
351 double *origConLB() { return origConLB_; }
352 double *origConUB() { return origConUB_; }
353
355 double *startVarLB() { return startVarLB_; }
356 double *startVarUB() { return startVarUB_; }
357
359 double *startConLB() { return startConLB_; }
360 double *startConUB() { return startConUB_; }
361
363 int *tempVarLBPos() { return tempVarLBPos_; }
364 int *tempVarUBPos() { return tempVarUBPos_; }
365 int *tempConLBPos() { return tempConLBPos_; }
366 int *tempConUBPos() { return tempConUBPos_; }
367
368 //------------------------------------------------------
369 // LP SOLUTION
370 //------------------------------------------------------
371
373 double getLpObjValue() const { return lpSolver_->getObjValue(); }
374
376 const double * getLpSolution() const { return lpSolver_->getColSolution();}
377
379 //double * savedLpSolution() { return savedLpSolution_; }
380
381 //------------------------------------------------------
382 // MILP SOLUTION
383 //------------------------------------------------------
384
386 int getNumSolutions() const { return numSolutions_; }
387
389 int getNumHeurSolutions() const { return numHeurSolutions_;}
390
392 double * incumbent() { return incumbent_; }
393
395 bool setBestSolution(BLIS_SOL_TYPE how,
396 double & objectiveValue,
397 const double *solution,
398 bool fixVariables = false);
399
401 inline double getCutoff() const { return cutoff_; }
402
404 inline void setCutoff(double co) {
405 double direction = lpSolver_->getObjSense();
406 lpSolver_->setDblParam(OsiDualObjectiveLimit, co * direction);
407 cutoff_ = co;
408 }
409
413 bool feasibleSolution(int & numIntegerInfs);
414
420 bool feasibleSolution(int & numIntegerInfs, int & numObjectInfs);
421
422 //------------------------------------------------------
423 // BRANCHING
424 //------------------------------------------------------
425
431 inline BcpsBranchStrategy * branchStrategy() const
432 { return branchStrategy_; }
433
435 inline void setBranchingMethod(BcpsBranchStrategy * method){
436 if (branchStrategy_) delete branchStrategy_;
437 branchStrategy_ = method;
438 }
439
441 inline void setBranchingMethod(BcpsBranchStrategy & method) {
442 if (branchStrategy_) delete branchStrategy_;
443 branchStrategy_ = &method;
444 }
446
451 inline int numObjects() const { return numObjects_; }
452
454 inline void setNumObjects(int num) { numObjects_ = num; }
455
457 inline BcpsObject ** objects() { return objects_;}
458
460 inline BcpsObject * objects(int which) { return objects_[which]; }
461
463 void deleteObjects();
464
467 void addObjects(int numObjects, BcpsObject ** objects);
469
471 void findIntegers(bool startAgain);
472
474 int getNumIntVars() const { return numIntVars_; }
475
477 int* getIntVars() const { return intVars_; }
478
480 bool checkInteger(double value) const {
481 double integerTolerance = 1.0e-5;
482 double nearest = floor(value + 0.5);
483 if (fabs(value - nearest) <= integerTolerance) {
484 return true;
485 }
486 else {
487 return false;
488 }
489 }
490
491 //------------------------------------------------------
492 // HEURISTICS.
493 //------------------------------------------------------
494
496 void addHeuristic(BlisHeuristic * heur);
497
499 BlisHeuristic * heuristics(int i) const { return heuristics_[i]; }
500
502 int numHeuristics() const { return numHeuristics_; }
503
504 //------------------------------------------------------
505 // CONSTRAINTS.
506 //------------------------------------------------------
507
509 void addCutGenerator(CglCutGenerator * generator,
510 const char * name = NULL,
511 int strategy = 0,
512 bool normal = true,
513 bool atSolution = false,
514 bool whenInfeasible = false);
515
517 BlisConGenerator *cutGenerators(int i) const { return generators_[i]; }
518
520 int numCutGenerators() const { return numCutGenerators_; }
521
523 int getMaxNumCons() const { return maxNumCons_; }
524
526 void setMaxNumCons(int m) { maxNumCons_ = m; }
527
529 BcpsConstraintPool *constraintPool() { return constraintPool_; }
530
532
533 int getNumOldConstraints() const { return numOldConstraints_; }
534
536 void setNumOldConstraints(int num) { numOldConstraints_ = num; }
537
539 int getOldConstraintsSize() const { return oldConstraintsSize_; }
540
542 void setOldConstraintsSize(int num) { oldConstraintsSize_ = num; }
543
545 BlisConstraint **oldConstraints() { return oldConstraints_; }
546
548 void setOldConstraints(BlisConstraint **old) { oldConstraints_ = old; }
549
551 void delOldConstraints() {
552 delete [] oldConstraints_;
553 oldConstraints_ = NULL;
554 }
556
558 int useCons() const { return useCons_; }
559
561 void setUseCons(int u) { useCons_ = u; }
562
564 int getDenseConCutoff() const { return denseConCutoff_; }
565
567 void setDenseConCutoff(int cutoff) { denseConCutoff_ = cutoff; }
568
570 double *getConRandoms() const { return conRandoms_; }
571
572 //------------------------------------------------------
573 // PRIORITY AND WEITGHT.
574 //------------------------------------------------------
575
590 void passInPriorities(const int * priorities,
591 bool ifNotSimpleIntegers,
592 int defaultValue = 1000);
593
595 inline const int * priority() const { return priority_; }
596
598 inline int priority(int sequence) const {
599 if (priority_) return priority_[sequence];
600 else return 1000;
601 }
602
603 inline const double getNodeWeight() const { return nodeWeight_; }
604
605 inline void setNodeWeight(double nw) { nodeWeight_ = nw; }
607
608 //------------------------------------------------------
609 // STATISTICS.
610 //------------------------------------------------------
611
613 virtual void modelLog();
614
616 int getNumNodes() const { return numNodes_; }
617
619 int getNumIterations() const { return numIterations_; }
620
622 int getAveIterations() const { return aveIterations_; }
623
625 void addNumNodes(int newNodes = 1) { numNodes_ += newNodes; }
626
628 void addNumIterations(int newIter) {
629 numIterations_ += newIter;
630 aveIterations_ = numIterations_ / numNodes_;
631 }
632
634 inline CoinMessageHandler * messageHandler() const { return handler_; }
635
638 BlisParams * BlisPar() { return BlisPar_; }
640
642 int getHotstartStrategy() { return hotstartStrategy_; }
643 void setHotstartStrategy(int value) { hotstartStrategy_ = value; }
644
645 //------------------------------------------------------
646 // PARALLEL
647 //------------------------------------------------------
648
650 virtual void registerKnowledge();
651
653 virtual AlpsEncoded* encode() const;
654
656 virtual void decodeToSelf(AlpsEncoded&);
657 };
658
659 #endif /* End of file */
BlisModel::startVarLB
double * startVarLB()
The starting variable bounds arrary of a subproblem (internal use).
Definition: BlisModel.h:355
BlisModel::numHeuristics
int numHeuristics() const
Get the number of heuristics.
Definition: BlisModel.h:502
BlisModel
Definition: BlisModel.h:60
BlisModel::cutoffInc_
double cutoffInc_
Cutoff increment.
Definition: BlisModel.h:127
BlisModel::optimalAbsGap_
double optimalAbsGap_
Absolute optimal gap.
Definition: BlisModel.h:260
CoinPackedMatrix.hpp
BlisModel::getNumStrong
int getNumStrong()
Get number of strong branchings.
Definition: BlisModel.h:322
BlisModel::startConUB_
double * startConUB_
Starting var/con bounds for processing each node.
Definition: BlisModel.h:138
BlisHeuristic.h
BlisModel::delOldConstraints
void delOldConstraints()
Set max number of old constraints.
Definition: BlisModel.h:551
BlisModel::nodeWeight_
double nodeWeight_
Definition: BlisModel.h:165
BlisModel::numOldConstraints_
int numOldConstraints_
Number of old constraints.
Definition: BlisModel.h:203
BlisModel::cutGenerators
BlisConGenerator * cutGenerators(int i) const
Get a specific cut generator.
Definition: BlisModel.h:517
BlisModel::numStrong_
int numStrong_
Number of strong branching.
Definition: BlisModel.h:162
BlisModel::getNodeWeight
const double getNodeWeight() const
Definition: BlisModel.h:603
BlisModel::getIntVars
int * getIntVars() const
Get integer indices.
Definition: BlisModel.h:477
CoinMessageHandler
Base class for message handling.
Definition: CoinMessageHandler.hpp:327
BlisModel::BlisPar
BlisParams * BlisPar()
Access parameters.
Definition: BlisModel.h:638
BlisModel::numObjects
int numObjects() const
Get the number of objects.
Definition: BlisModel.h:451
BlisModel::numObjects_
int numObjects_
Number of objects.
Definition: BlisModel.h:150
BlisModel::heuristics
BlisHeuristic * heuristics(int i) const
Get a specific heuristic.
Definition: BlisModel.h:499
BlisModel::objects_
BcpsObject ** objects_
The set of objects.
Definition: BlisModel.h:153
BlisModel::startConLB_
double * startConLB_
Starting var/con bounds for processing each node.
Definition: BlisModel.h:137
BlisModel::denseConCutoff_
int denseConCutoff_
Dense constraint cutoff.
Definition: BlisModel.h:209
BlisModel::getNumHeurSolutions
int getNumHeurSolutions() const
Get number of heuristic solutions.
Definition: BlisModel.h:389
BlisModel::feasibleSolution
bool feasibleSolution(int &numIntegerInfs)
Test the current lp solution for feasiblility.
BlisModel::origConUB_
double * origConUB_
Original variable and constraint bounds.
Definition: BlisModel.h:83
BlisModel::constraintPool
BcpsConstraintPool * constraintPool()
Access constraint pool.
Definition: BlisModel.h:529
BlisModel::leafToRootPath
std::vector< AlpsTreeNode * > leafToRootPath
Record the path from leaf to root.
Definition: BlisModel.h:271
BlisModel::getColUpper
const double * getColUpper()
Get column upper bound.
Definition: BlisModel.h:338
BlisHeuristic
Heuristic base class.
Definition: BlisHeuristic.h:46
BlisModel::getNumOldConstraints
int getNumOldConstraints() const
Get number of old constraints.
Definition: BlisModel.h:533
BlisModel::getAveIterations
int getAveIterations() const
Get the average iterations it took to solve a lp.
Definition: BlisModel.h:622
BlisModel::readInstance
virtual void readInstance(const char *dataFile)
Read in the instance data.
BlisModel::numSolutions_
int numSolutions_
Definition: BlisModel.h:111
BlisModel::numCutGenerators
int numCutGenerators() const
Get the number of cut generators.
Definition: BlisModel.h:520
BlisModel::getMaxNumCons
int getMaxNumCons() const
Get the max number of cuts can be generated.
Definition: BlisModel.h:523
BlisParams.h
OsiSolverInterface::getColUpper
virtual const double * getColUpper() const =0
Get a pointer to an array[getNumCols()] of column upper bounds.
OsiSolverInterface::getNumCols
virtual int getNumCols() const =0
Get the number of columns.
BlisModel::setSolEstimate
void setSolEstimate(double est)
Set the solution estimate of the active node.
Definition: BlisModel.h:319
BlisModel::origVarUB_
double * origVarUB_
Original variable and constraint bounds.
Definition: BlisModel.h:81
BlisModel::startTime_
double startTime_
Search starting time.
Definition: BlisModel.h:248
BlisModel::encode
virtual AlpsEncoded * encode() const
The method that encodes the model into a encoded object.
BcpsObject
A class for describing the objects that comprise a BCPS subproblem.
Definition: BcpsObject.h:76
BlisModel::lpSolver_
OsiSolverInterface * lpSolver_
Lp solver.
Definition: BlisModel.h:69
BlisModel::origVarUB
double * origVarUB()
Definition: BlisModel.h:348
BlisModel::origVarLB_
double * origVarLB_
Original variable and constraint bounds.
Definition: BlisModel.h:80
BcpsBranchStrategy.h
BlisModel::setBranchingMethod
void setBranchingMethod(BcpsBranchStrategy &method)
Set the branching stratedy.
Definition: BlisModel.h:441
AlpsParams.h
BlisModel::maxNumCons_
int maxNumCons_
Number of cuts can be generators.
Definition: BlisModel.h:188
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
BlisModel::~BlisModel
virtual ~BlisModel()
Destructor.
BlisModel::getDenseConCutoff
int getDenseConCutoff() const
Get the thresheld to be considered as a dense constraint.
Definition: BlisModel.h:564
BlisModel::getLpObjValue
double getLpObjValue() const
Get current objective function value.
Definition: BlisModel.h:373
OsiSolverInterface::getObjSense
virtual double getObjSense() const =0
Get the objective function sense.
BlisModel::init
void init()
Intialize member data.
BlisModel::getObjCoef
double * getObjCoef() const
Get objective coefficients.
Definition: BlisModel.h:332
BlisModel::timeLimit_
double timeLimit_
Max solution time.
Definition: BlisModel.h:251
BlisModel::numCutGenerators_
int numCutGenerators_
Number of cut generators used.
Definition: BlisModel.h:185
BlisModel::activeNode_
AlpsTreeNode * activeNode_
Active node.
Definition: BlisModel.h:159
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
BlisModel::startConUB
double * startConUB()
Definition: BlisModel.h:360
BlisModel::hotstartStrategy_
int hotstartStrategy_
Definition: BlisModel.h:147
BlisModel::addObjects
void addObjects(int numObjects, BcpsObject **objects)
Add in object information.
AlpsEncoded
This data structure is to contain the packed form of an encodable knowledge.
Definition: AlpsEncoded.h:25
BlisModel::checkInteger
bool checkInteger(double value) const
Check if a value is integer.
Definition: BlisModel.h:480
BlisModel::startVarUB_
double * startVarUB_
Starting var/con bounds for processing each node.
Definition: BlisModel.h:136
BlisModel::setBranchingMethod
void setBranchingMethod(BcpsBranchStrategy *method)
Set the branching strategy.
Definition: BlisModel.h:435
BlisModel::getNumNodes
int getNumNodes() const
Get how many Nodes it took to solve the problem.
Definition: BlisModel.h:616
BcpsObjectPool.h
BlisModel::tempVarLBPos
int * tempVarLBPos()
Temparory storage.
Definition: BlisModel.h:363
BlisModel::startVarLB_
double * startVarLB_
Starting var/con bounds for processing each node.
Definition: BlisModel.h:135
BlisModel::tempConLBPos
int * tempConLBPos()
Definition: BlisModel.h:365
BlisModel::numIntVars_
int numIntVars_
Column types.
Definition: BlisModel.h:102
BcpsModel.h
AlpsTreeNode::setSolEstimate
void setSolEstimate(double est)
Query/set the solution estimate of the node.
Definition: AlpsTreeNode.h:217
BlisModel::optimalRelGap_
double optimalRelGap_
Relative optimal gap.
Definition: BlisModel.h:257
BlisModel::addCutGenerator
void addCutGenerator(CglCutGenerator *generator, const char *name=NULL, int strategy=0, bool normal=true, bool atSolution=false, bool whenInfeasible=false)
Add a cut generator.
BlisModel::setNumOldConstraints
void setNumOldConstraints(int num)
Set number of old constraints.
Definition: BlisModel.h:536
BlisModel::colType_
char * colType_
Column types.
Definition: BlisModel.h:104
OsiSolverInterface::getObjValue
virtual double getObjValue() const =0
Get the objective function value.
BlisModel::numHeuristics_
int numHeuristics_
Number of heuristics.
Definition: BlisModel.h:172
BlisModel::setBestSolution
bool setBestSolution(BLIS_SOL_TYPE how, double &objectiveValue, const double *solution, bool fixVariables=false)
Record a new incumbent solution and update objectiveValue.
BlisModel::conRandoms_
double * conRandoms_
Random keys.
Definition: BlisModel.h:206
BlisModel::intVars_
int * intVars_
Column types.
Definition: BlisModel.h:103
BlisModel::colMatrix_
CoinPackedMatrix * colMatrix_
Orignial column majored matrix.
Definition: BlisModel.h:76
BlisConGenerator
Interface between Blis and Cut Generation Library.
Definition: BlisConGenerator.h:56
BcpsObject.h
BlisModel::setMaxNumCons
void setMaxNumCons(int m)
Set the max number of cuts can be generated.
Definition: BlisModel.h:526
AlpsTreeNode
This class holds one node of the search tree.
Definition: AlpsTreeNode.h:50
BlisModel::cutoff_
double cutoff_
Cutoff in lp solver.
Definition: BlisModel.h:124
BlisModel::messageHandler
CoinMessageHandler * messageHandler() const
Get the message handler.
Definition: BlisModel.h:634
BlisModel::numHeurSolutions_
int numHeurSolutions_
Definition: BlisModel.h:112
OsiSolverInterface::getNumRows
virtual int getNumRows() const =0
Get the number of rows.
CglCutGenerator.hpp
BlisModel::objects
BcpsObject * objects(int which)
Get the specified object.
Definition: BlisModel.h:460
BlisModel::tempConUBPos
int * tempConUBPos()
Definition: BlisModel.h:366
BlisModel::setNodeWeight
void setNodeWeight(double nw)
Definition: BlisModel.h:605
BlisModel::solver
virtual OsiSolverInterface * solver()
Get lp solver.
Definition: BlisModel.h:310
OsiSolverInterface::getColLower
virtual const double * getColLower() const =0
Get a pointer to an array[getNumCols()] of column lower bounds.
BlisModel::tempConLBPos_
int * tempConLBPos_
Tempory storage for var/con indices.
Definition: BlisModel.h:238
BlisModel::setupSelf
virtual bool setupSelf()
Do necessary work to make model usable.
OsiSolverInterface::getColSolution
virtual const double * getColSolution() const =0
Get a pointer to an array[getNumCols()] of primal variable values.
BlisModel::priority
int priority(int sequence) const
Returns priority level for an object (or 1000 if no priorities exist)
Definition: BlisModel.h:598
BlisModel::getCutoff
double getCutoff() const
Get cut off value.
Definition: BlisModel.h:401
BlisModel::BlisModel
BlisModel()
Default construtor.
Definition: BlisModel.h:276
BcpsModel
Definition: BcpsModel.h:40
BlisModel::getNumSolutions
int getNumSolutions() const
Return the stored lp solution.
Definition: BlisModel.h:386
BcpsConstraintPool
Definition: BcpsObjectPool.h:104
BlisModel::branchStrategy
BcpsBranchStrategy * branchStrategy() const
Get the current branching strategy.
Definition: BlisModel.h:431
BlisModel::numIterations_
int numIterations_
Number of lp(Simplex) iterations.
Definition: BlisModel.h:225
BlisModel::objSense_
double objSense_
Objective function.
Definition: BlisModel.h:96
CoinMessageHandler.hpp
This is a first attempt at a message handler.
BlisModel::oldConstraintsSize_
int oldConstraintsSize_
The memory size allocated for oldConstraints_.
Definition: BlisModel.h:200
BlisModel::origConUB
double * origConUB()
Definition: BlisModel.h:352
BlisModel::origConLB_
double * origConLB_
Original variable and constraint bounds.
Definition: BlisModel.h:82
OsiSolverInterface.hpp
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
BlisModel::objCoef_
double * objCoef_
Objective function.
Definition: BlisModel.h:97
BlisModel::numElems_
int numElems_
Number of columns/rows/elements in active subproblem.
Definition: BlisModel.h:91
BlisModel::tempVarUBPos_
int * tempVarUBPos_
Tempory storage for var/con indices.
Definition: BlisModel.h:237
BcpsBranchStrategy
Branching strategy specifies: (1) how to select a candidate set of branching objects (2) how to compa...
Definition: BcpsBranchStrategy.h:39
BlisModel::setDenseConCutoff
void setDenseConCutoff(int cutoff)
Set the thresheld to be considered as a dense constraint.
Definition: BlisModel.h:567
BlisModel::incObjValue_
double incObjValue_
Saved lp solution for temporatory usage.
Definition: BlisModel.h:118
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
BlisModel::incumbent_
double * incumbent_
Incumbent.
Definition: BlisModel.h:121
BlisModel::startConLB
double * startConLB()
The starting constraint bounds arrary of a subproblem (internal use).
Definition: BlisModel.h:359
BlisModel::modelLog
virtual void modelLog()
Log of specific models.
BlisModel::gutsOfDestructor
void gutsOfDestructor()
Actual destructor.
BlisModel::setSolver
virtual void setSolver(OsiSolverInterface *si)
Set lp solver.
Definition: BlisModel.h:307
BlisModel::tempVarLBPos_
int * tempVarLBPos_
Tempory storage for var/con indices.
Definition: BlisModel.h:236
BlisModel::generators_
BlisConGenerator ** generators_
The list of cut generators used.
Definition: BlisModel.h:191
BlisModel::setCutoff
void setCutoff(double co)
Set cut off value.
Definition: BlisModel.h:404
BlisModel::createRoot
virtual AlpsTreeNode * createRoot()
Create the root node based on model.
BlisModel::newCutPool_
OsiCuts newCutPool_
Store new cuts in each pass.
Definition: BlisModel.h:266
BlisModel::branchStrategy_
BcpsBranchStrategy * branchStrategy_
Variable selection function.
Definition: BlisModel.h:142
BlisModel::setOldConstraintsSize
void setOldConstraintsSize(int num)
Set max number of old constraints.
Definition: BlisModel.h:542
BLIS_SOL_TYPE
BLIS_SOL_TYPE
Definition: Blis.h:48
BlisModel::getNumRows
int getNumRows()
Get number of rows.
Definition: BlisModel.h:344
BlisModel::numCols_
int numCols_
Number of columns/rows/elements in active subproblem.
Definition: BlisModel.h:89
BlisModel::numNodes_
int numNodes_
Number of processed nodes.
Definition: BlisModel.h:222
BlisModel::useCons
int useCons() const
Query constraint generation strategy.
Definition: BlisModel.h:558
AlpsTreeNode.h
BlisModel::origConLB
double * origConLB()
Get original constraint bounds arrary.
Definition: BlisModel.h:351
BlisModel::getConRandoms
double * getConRandoms() const
Get randoms for check parallel constraints.
Definition: BlisModel.h:570
BlisModel::incumbent
double * incumbent()
Return best ip solution found so far.
Definition: BlisModel.h:392
BlisModel::setUseCons
void setUseCons(int u)
Set constraint generation strategy.
Definition: BlisModel.h:561
BlisModel::getHotstartStrategy
int getHotstartStrategy()
Don&#39;t know what it is.
Definition: BlisModel.h:642
BlisModel::oldConstraints
BlisConstraint ** oldConstraints()
Access old constraints.
Definition: BlisModel.h:545
BlisModel::objects
BcpsObject ** objects()
Get the array of objects.
Definition: BlisModel.h:457
BlisModel::aveIterations_
int aveIterations_
Average number of lp iterations to solve a subproblem.
Definition: BlisModel.h:228
BlisModel::tempVarUBPos
int * tempVarUBPos()
Definition: BlisModel.h:364
BlisModel::getOldConstraintsSize
int getOldConstraintsSize() const
Get max number of old constraints.
Definition: BlisModel.h:539
BlisParams
Definition: BlisParams.h:35
AlpsKnowledgeBroker.h
BlisModel::priority_
int * priority_
Priorities of integer object.
Definition: BlisModel.h:156
BlisModel::setOldConstraints
void setOldConstraints(BlisConstraint **old)
set old constraints.
Definition: BlisModel.h:548
BlisConstraint
Definition: BlisConstraint.h:31
BlisModel::passInPriorities
void passInPriorities(const int *priorities, bool ifNotSimpleIntegers, int defaultValue=1000)
Pass in branching priorities.
BlisModel::heuristics_
BlisHeuristic ** heuristics_
The list of heuristics.
Definition: BlisModel.h:175
BlisModel::isRoot_
bool isRoot_
If root node.
Definition: BlisModel.h:245
BlisModel::findIntegers
void findIntegers(bool startAgain)
Identify integer variable.
BlisModel::addNumNodes
void addNumNodes(int newNodes=1)
Increment node count.
Definition: BlisModel.h:625
CoinMpsIO.hpp
BlisModel::BlisPar_
BlisParams * BlisPar_
Blis parameters.
Definition: BlisModel.h:216
BlisModel::addNumIterations
void addNumIterations(int newIter)
Increment Iteration count.
Definition: BlisModel.h:628
BlisModel::setHotstartStrategy
void setHotstartStrategy(int value)
Definition: BlisModel.h:643
BlisModel::decodeToSelf
virtual void decodeToSelf(AlpsEncoded &)
The method that decodes the model from a encoded object.
BlisModel::addNumStrong
void addNumStrong(int num=1)
Add num to number of strong branchings.
Definition: BlisModel.h:325
BlisModel::deleteObjects
void deleteObjects()
Delete all object information.
BlisModel::resolve
bool resolve()
Resolving a lp.
BlisModel::useHeuristics_
bool useHeuristics_
If use heuristics.
Definition: BlisModel.h:263
BlisModel::addHeuristic
void addHeuristic(BlisHeuristic *heur)
Add a heuristic.
BlisModel::getNumIntVars
int getNumIntVars() const
Get number of integers.
Definition: BlisModel.h:474
BlisModel::getNumCols
int getNumCols()
Get number of columns.
Definition: BlisModel.h:341
BlisModel::oldConstraints_
BlisConstraint ** oldConstraints_
Temporary store old cuts at a node when installing a node.
Definition: BlisModel.h:197
BlisModel::constraintPool_
BcpsConstraintPool * constraintPool_
Store all the cuts.
Definition: BlisModel.h:194
BlisModel::origVarLB
double * origVarLB()
Get original variable bounds arrary.
Definition: BlisModel.h:347
OsiCuts.hpp
BlisModel::writeParameters
virtual void writeParameters(std::ostream &outstream) const
Write out parameters.
BlisModel::getColLower
const double * getColLower()
Get column lower bound.
Definition: BlisModel.h:335
BlisModel::getLpSolution
const double * getLpSolution() const
Get active lp solution.
Definition: BlisModel.h:376
Blis.h
BlisModel::priority
const int * priority() const
Priorities.
Definition: BlisModel.h:595
BlisModel::registerKnowledge
virtual void registerKnowledge()
Register knowledge.
BlisModel::handler_
CoinMessageHandler * handler_
Message handler.
Definition: BlisModel.h:219
OsiSolverInterface::setDblParam
virtual bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
Definition: OsiSolverInterface.hpp:272
BlisModel::startVarUB
double * startVarUB()
Definition: BlisModel.h:356
OsiDualObjectiveLimit
Dual objective limit.
Definition: OsiSolverParameters.hpp:58
BlisModel::tempConUBPos_
int * tempConUBPos_
Tempory storage for var/con indices.
Definition: BlisModel.h:239
BlisModel::getNumIterations
int getNumIterations() const
Get how many iterations it took to solve the problem.
Definition: BlisModel.h:619
BlisConGenerator.h
BlisModel::readParameters
virtual void readParameters(const int argnum, const char *const *arglist)
Read in Alps, Blis parameters.
BlisModel::numRows_
int numRows_
Number of columns/rows/elements in active subproblem.
Definition: BlisModel.h:90
BlisModel::useCons_
int useCons_
If use cut generators.
Definition: BlisModel.h:182
BlisModel::integerTol_
double integerTol_
Integer tolerance.
Definition: BlisModel.h:254
BlisModel::setActiveNode
void setActiveNode(AlpsTreeNode *node)
Set active node.
Definition: BlisModel.h:316
BlisModel::setNumObjects
void setNumObjects(int num)
Set the number of objects.
Definition: BlisModel.h:454