Minotaur 0.4.1
Docs for developers
QGPar.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 QGPAR_H
14#define QGPAR_H
15
16#include "Types.h"
17#include "AMPLInterface.h"
18#include "LPEngine.h"
19#include "ParBranchAndBound.h"
20#include "ParReliabilityBrancher.h"
21#include "ParQGBranchAndBound.h"
22#include "Presolver.h"
23#include "Solver.h"
24
25namespace Minotaur {
26 typedef SolutionPool* SolutionPoolPtr;
31 class QGPar : public Solver {
32 public:
34 QGPar(EnvPtr env);
35
37 ~QGPar();
38
39 void doSetup();
40
41 //void sepDetection();
42
44 void showHelp() const;
45
47 int showInfo();
48
50 virtual int solve(ProblemPtr p);
51
53 virtual SolveStatus getStatus() {return status_;};
54
56 virtual SolutionPtr getSolution() {return sol_;};
57
59 double getUb() {return ub_;};
60
62 double getLb() {return lb_;};
63
64 private:
65 const static std::string me_;
66 double objSense_;
67 SolutionPtr sol_;
68 double lb_, ub_;
69 ProblemPtr oinst_;
70 SolveStatus status_;
71
72
73 BrancherPtr createBrancher_(ProblemPtr p, HandlerVector handlers,
74 EnginePtr e);
75 ParQGBranchAndBound* createParBab_(UInt numThreads, NodePtr &node,
76 RelaxationPtr relCopy[], ProblemPtr pCopy[],
77 ParPCBProcessorPtr nodePrcssr[],
78 ParNodeIncRelaxerPtr parNodeRlxr[],
79 SolutionPoolPtr solPool,
80 HandlerVector handlersCopy[],
81 LPEnginePtr lpeCopy[], EnginePtr eCopy[],
82 bool &prune);
83 int getEngines_(Engine **nlp_e, LPEngine **lp_e);
84 PresolverPtr presolve_(HandlerVector &handlers);
85 void setInitialOptions_();
86 void writeLPStats_(std::string name, std::vector<double> stats);
87 void writeNLPStats_(std::string name, std::vector<double> stats);
88 void writeParQGStats_(ParQGBranchAndBound *parbab, UInt numThreads, HandlerVector handlersCopy[]);
89 void writeParBnbStatus_(ParQGBranchAndBound *parbab, double wallTimeStart, clock_t clockTimeStart);
90 };
91}
92#endif
93
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 the default branch-and-bound-algorithm.
Declare Presolver class for presolving.
Define the abstract base class Solver.
Declare important 'types' used in Minotaur.
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
Definition: Node.h:54
Definition: ParNodeIncRelaxer.h:32
Default node processor used in solver for now.
Definition: ParPCBProcessor.h:47
Implement a generic parallel branch-and-bound algorithm on a multicore cpu.
Definition: ParQGBranchAndBound.h:48
Definition: Presolver.h:39
Definition: Problem.h:74
Definition: QGPar.h:31
void showHelp() const
show help messages
Definition: QGPar.cpp:172
int showInfo()
Display information.
Definition: QGPar.cpp:185
~QGPar()
Destroy.
Definition: QGPar.cpp:82
virtual SolveStatus getStatus()
get status of the last solve.
Definition: QGPar.h:53
virtual int solve(ProblemPtr p)
Solve the problem.
Definition: QGPar.cpp:398
double getLb()
Return the lower bound for the optimal value.
Definition: QGPar.h:62
double getUb()
Return the upper bound for the optimal value.
Definition: QGPar.h:59
virtual SolutionPtr getSolution()
get status of the last solve.
Definition: QGPar.h:56
QGPar(EnvPtr env)
Default constructor.
Definition: QGPar.cpp:70
Definition: Relaxation.h:53
Definition: SolutionPool.h:28
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