Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::TransSep Class Reference

Public Member Functions

 TransSep ()
 Default constructor.
 
 TransSep (EnvPtr env, ProblemPtr problem)
 Default Constructor. More...
 
 ~TransSep ()
 Destroy.
 
void checkCons ()
 
void createCG (std::vector< CGraphPtr > *cg, CNodeQ *dq, int *itnum, CNode **tempN)
 Generate computation graph.
 
bool coeffValue (CNode *n2, double *cv, bool *n, CNode **n1, std::vector< UInt > *idx)
 
void commonConsCheck (std::vector< double > *constCoeff)
 
void depthFS (int j, CNode *n1, std::vector< UInt > *m, int *itnum, CNodeQ *sNodes, std::deque< int > *sOps, std::vector< CNode * > *sVars, std::vector< CNode * > *sConsts)
 Perform Depth first search rooted at node n1 at iteration number j.
 
bool explore (UInt *j, CNode *n1, std::vector< UInt > *m, int opc, int *itnum, UInt nvar, CNodeQ *sNodes, std::deque< int > *sOps, std::vector< CNode * > *sVars, std::vector< CNode * > *sConsts)
 Explore further from node n1 at iteration number j.
 
void finalCG (std::vector< CGraphPtr > *cg, CNode **tempN, std::vector< double > *constCoeff, double *coeff, std::vector< double > *hashVal1, double *x)
 Generate final computation graph.
 
void sepDetection ()
 Find separability of given problem.
 
UInt getNumVars ()
 Return no. of vars added.
 
void markVis (UInt i, int *itnum)
 
bool ifRepeated (CGraphPtr nlf, LinearFunctionPtr lfnew, CGraphPtr cg, double constCoeff, double coeff, LinearFunctionPtr lf)
 
void linearizeObj ()
 
void mergeItrInfo (int mNum, CNodeQ *sNodes, std::deque< int > *sOps, std::vector< CNode * > *sVars, std::vector< CNode * > *sConsts)
 Merge current iteration with iteration mNum.
 
int mergeItrNum (int j, int a, std::vector< UInt > *m)
 Find iteration to merge the current iteration to.
 
bool sepPartsSearch (UInt sp, std::vector< CGraphPtr > *nlfnew, std::vector< LinearFunctionPtr > *lfnew, CGraphPtr cg, double constCoeff, LinearFunctionPtr lf, std::vector< UInt > *nsp, double coeff)
 
bool rootChildren (const CNode *o, std::stack< CNode * > *candNodes, std::stack< int > *candOp, double *coeff, UInt nnode, UInt nvar, double *ub, LinearFunctionPtr lf)
 Check whether constraint is separable.
 
std::vector< CGraphPtrsepPartsCGraph (CNodeQ *dq, UInt nnode, std::vector< double > *constCoeff, double *coeff, std::vector< double > *hashVal1, double *x)
 Generate computational graph of separable parts.
 
bool sepCheck (double coeff, std::stack< CNode * > *candNodes, std::stack< int > *candOp, UInt nnode, UInt nvar, double *ub, LinearFunctionPtr lf)
 
void tempPopulate (CNode *n1, std::stack< CNode * > *tempNodes)
 Populate initial list for depth first search rooted at node n1.
 
void updateVisNodeItr (UInt *j, std::vector< UInt > *m, CNode *n1, int opc, int idx, CNodeQ *sNodes, std::deque< int > *sOps, std::vector< CNode * > *sVars, std::vector< CNode * > *sConsts)
 Add information of the node already visited.
 
void writeProb ()
 Write reformulated problem after separability detection.
 

Constructor & Destructor Documentation

◆ TransSep()

TransSep::TransSep ( EnvPtr  env,
ProblemPtr  problem 
)

Default Constructor.

Parameters
[in]envEnvironment pointer.
[in]minlpThe minlp for which separability is to detected

Member Function Documentation

◆ checkCons()

void TransSep::checkCons ( )

Check constraints of the given problem for separability. Constraints are expected in the form f(x) <= b

Generating cgraph of separable parts

vector cg contains cgraph of separable parts.

◆ markVis()

void TransSep::markVis ( UInt  i,
int *  itnum 
)

Mark nodes visited. Used in generating computation graph of separable parts

◆ sepCheck()

bool TransSep::sepCheck ( double  coeff,
std::stack< CNode * > *  candNodes,
std::stack< int > *  candOp,
UInt  nnode,
UInt  nvar,
double *  ub,
LinearFunctionPtr  lf 
)

Check if the nonlinear constraint is separable. 1 if separable 0 if not separable


The documentation for this class was generated from the following files:

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