[Minotaur] Quadratic QG implementation with Minotaur

Luca Mencarelli luca.mencarelli.university at gmail.com
Wed Sep 1 08:29:12 CDT 2021


Dear Minotaur developers and users,

I am trying to implement a quadratic version of the QG algorithm by adding a quadratic term to the master problem. I am using the simple-qg-cg source code in 0.2.1 version. Basically I have defined a new handler QuadPHandler starting by QGHandler and substituted the line

f2 = (FunctionPtr) new Function(lf);

with:

VariableConstIterator vbeg = rel_->varsBegin();
VariableConstIterator vend = rel_->varsEnd();
int n = rel_->getNumVars();
double *b = new double[n*n];
std::fill(b, b+n*n, 0.);
for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
    	b[I*j] = number;
qf = (QuadraticFunctionPtr) new QuadraticFunction(b, vbeg, vend);
f2 = (FunctionPtr) new Function(lf, qf);

where number is a given double. Apparently the previous modification does not impact the code. I have verified the new constraint is correctly built and added to the problem. I would ask you if you can help me.

Thanks very much. Bests,
Luca


More information about the Minotaur mailing list