[Minotaur] Quadratic QG implementation with Minotaur

Ashutosh Mahajan amahajan at iitb.ac.in
Thu Sep 2 12:40:27 CDT 2021


Dear Luca

We would be happy to help you implement your ideas, if you can provide us more
details. The code snippet you share seems to create a new QuadraticFunction.
But it is not clear what you do with the new function f2. Do you add this
function create a new constraint for the problem? or use it for creating a
relaxation somehow? You may email me directly, and I will try to help.

--
Regards
Ashutosh Mahajan
IEOR, IIT Bombay

On Wed, Sep 01, 2021 at 03:29:12PM +0200, Luca Mencarelli wrote:
> 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
> _______________________________________________
> Minotaur mailing list
> Minotaur at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/minotaur


More information about the Minotaur mailing list