Minotaur 0.4.1
Docs for developers
BnbPar.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only half bull!
3//
4// (C)opyright 2009 - 2025 The Minotaur Team.
5//
6
13#ifndef BNBPAR_H
14#define BNBPAR_H
15
16#include "Types.h"
17#include "AMPLInterface.h"
18#include "LPEngine.h"
19#include "ParBranchAndBound.h"
20#include "ParReliabilityBrancher.h"
21#include "Presolver.h"
22#include "Solver.h"
23
24namespace Minotaur {
29 class BnbPar : public Solver {
30 public:
32 BnbPar(EnvPtr env);
33
35 ~BnbPar();
36
37 void doSetup();
38
39 //void sepDetection();
40
42 void showHelp() const;
43
45 int showInfo();
46
48 virtual int solve(ProblemPtr p);
49
51 virtual SolveStatus getStatus() {return status_;};
52
54 virtual SolutionPtr getSolution() {return sol_;};
55
57 double getUb() {return ub_;};
58
60 double getLb() {return lb_;};
61
62 private:
63 const static std::string me_;
64 double objSense_;
65 SolutionPtr sol_;
66 double lb_, ub_;
67 ProblemPtr oinst_;
68 SolveStatus status_;
69
70 BrancherPtr createBrancher_(HandlerVector handlers, EnginePtr e);
71 ParBranchAndBound* createParBab_(UInt numThreads, EnginePtr e, RelaxationPtr relCopy[],
72 ParPCBProcessorPtr nodePrcssr[],
73 ParNodeIncRelaxerPtr parNodeRlxr[],
74 HandlerVector handlersCopy[],
75 EnginePtr eCopy[]);
76 int getEngines_(Engine **nlp_e, LPEngine **lp_e);
77 PresolverPtr presolve_(HandlerVector &handlers);
78 void setInitialOptions_();
79 void writeNLPStats_(std::string name, std::vector<double> stats);
80 void writeParBnbStatus_(ParBranchAndBound *parbab, double wallTimeStart, clock_t clockTimeStart);
81 };
82}
83#endif
84
Declare the AMPLInterface class fo reading problems from AMPL.
Declare the class LPEngine for solving LPs and getting solution.
Declare the default branch-and-bound-algorithm.
Declare Presolver class for presolving.
Define the abstract base class Solver.
Declare important 'types' used in Minotaur.
Definition: BnbPar.h:29
BnbPar(EnvPtr env)
Default constructor.
Definition: BnbPar.cpp:69
double getUb()
Return the upper bound for the optimal value.
Definition: BnbPar.h:57
~BnbPar()
Destroy.
Definition: BnbPar.cpp:81
virtual int solve(ProblemPtr p)
Solve the problem.
Definition: BnbPar.cpp:418
double getLb()
Return the lower bound for the optimal value.
Definition: BnbPar.h:60
int showInfo()
Display information.
Definition: BnbPar.cpp:185
virtual SolutionPtr getSolution()
get status of the last solve.
Definition: BnbPar.h:54
void showHelp() const
show help messages
Definition: BnbPar.cpp:171
virtual SolveStatus getStatus()
get status of the last solve.
Definition: BnbPar.h:51
A brancher is used to find suitable branches for a given node. e.g. LexicoBrancher....
Definition: Brancher.h:33
Definition: Engine.h:34
Definition: Environment.h:28
Definition: LPEngine.h:29
Implement a generic parallel branch-and-bound algorithm on a multicore cpu.
Definition: ParBranchAndBound.h:48
Definition: ParNodeIncRelaxer.h:32
Default node processor used in solver for now.
Definition: ParPCBProcessor.h:47
Definition: Presolver.h:39
Definition: Problem.h:74
Definition: Relaxation.h:53
Definition: Solution.h:30
Definition: Solver.h:28
Definition: ActiveNodeStore.h:20
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
SolveStatus
Different states an algorithm like branch-and-bound can be in.
Definition: Types.h:158

Minotaur source code documented by Doxygen 1.9.4 on Fri Apr 25 2025