Minotaur 0.4.1
Docs for developers
TransPoly.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2008 - 2025 The Minotaur Team.
5//
6
13#ifndef MINOTAURTRANSPOLY_H
14#define MINOTAURTRANSPOLY_H
15
16#include "Transformer.h"
17
18namespace Minotaur {
19
20class MultilinearTermsHandler;
21class MonomialFunction;
22class YEqMonomial;
23class YEqCG;
24typedef MonomialFunction* MonomialFunPtr;
25typedef MultilinearTermsHandler* MultilinearTermsHandlerPtr;
26
27
32class TransPoly : public Transformer {
33public:
34
37
40
42 ~TransPoly();
43
44 // base class method.
45 std::string getName() const;
46
47 // base class method.
49
50 // base class method.
52
53 // base class method.
54 void reformulate(ProblemPtr &newp, HandlerVector &handlers, int &status);
55
56private:
57
60
62 YEqMonomial *yMonoms_;
63
73 void assignMH_(ConstraintPtr con, VariablePtr v, MonomialFunPtr mf);
74
83 MonomialFunPtr monomToMl_(MonomialFunPtr mf);
84
97 VariablePtr newPolyVar_(MonomialFunPtr mf);
98
115 VariablePtr newPolyVar_(const CNode *cnode, MonomialFunPtr mf,
117 double d, double k);
118
130 void recursPolyRef_(const CNode *node,
132 VariablePtr &v, double &d, double &k);
133
156 void refMinus_(MonomialFunPtr mfl, MonomialFunPtr mfr,
159 double dl, double dr,
160 double kl, double kr,
162 VariablePtr &v, double &d, double &k);
163
186 void refMult_(MonomialFunPtr mfl, MonomialFunPtr mfr,
189 double dl, double dr,
190 double kl, double kr,
192 VariablePtr &v, double &d, double &k);
193
194
195 /*
196 * \brief Reformulate the constraints of the original problem into new
197 * problem.
198 */
199 void refNonlinCons_();
200
201 /*
202 * \brief Reformulate the objective function of the original problem into new
203 * problem.
204 */
205 void refNonlinObj_();
206
229 void refPlus_(MonomialFunPtr mfl, MonomialFunPtr mfr,
232 double dl, double dr,
233 double kl, double kr,
235 VariablePtr &v, double &d, double &k);
236
254 void refUnivarOpPoly_(const CNode *node, MonomialFunPtr mfl,
255 LinearFunctionPtr lfl, VariablePtr vl, double dl,
256 double kl, VariablePtr &v, double &d,
257 double &k);
258};
259}
260
261#endif
262
Declare base class for transforming problems.
CNode denotes a node in the computational graph. It stores the op-code, children, parents and other a...
Definition: CNode.h:48
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
Definition: Environment.h:28
The base class linear function is of the form c'x.
Definition: LinearFunction.h:31
MonomialFunction represents functions of the form of the form where .
Definition: PolynomialFunction.h:47
Definition: MultilinearTermsHandler.h:94
Definition: Problem.h:74
Definition: Solution.h:30
Base class for reformulating a general nonconvex mixed-integer problem into one that has univariate c...
Definition: TransPoly.h:32
TransPoly()
Default Constructor.
SolutionPtr getSolOrig(ConstSolutionPtr sol, int &err)
Translate the solution of reformulated problem into that of original problem.
Definition: TransPoly.cpp:73
void reformulate(ProblemPtr &newp, HandlerVector &handlers, int &status)
Perform the reformulation, and assign handlers.
Definition: TransPoly.cpp:756
SolutionPtr getSolTrans(ConstSolutionPtr sol, int &err)
Translate the solution of originial problem into that of reformulated problem.
Definition: TransPoly.cpp:80
std::string getName() const
Get the name of this Transformer.
Definition: TransPoly.cpp:67
~TransPoly()
Destroy.
Definition: TransPoly.cpp:49
Abstract base class for reformulating a problem so that handlers can be applied to it.
Definition: Transformer.h:53
Definition: Variable.h:31
Definition: YEqMonomial.h:28
Definition: ActiveNodeStore.h:20

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025