qextract1.gms : Exhibits bottleneck in GMO Q extraction

Description

With GAMS 47 and previous, GMO's Q extraction was quite slow
for larger versions (G=F=<30 or more>) of this model.

This has been addressed for GAMS 48.

Contributor: Steve Dirkse, Sep 2024


Small Model of Type : GAMS


Category : GAMS Test library


Main file : qextract1.gms

$title 'Exhibits bottleneck in GMO Q extraction' (QEXTRACT1,SEQ=964)

$onText
With GAMS 47 and previous, GMO's Q extraction was quite slow
for larger versions (G=F=<30 or more>) of this model.

This has been addressed for GAMS 48.

Contributor: Steve Dirkse, Sep 2024
$offText


$if not set G $set G 35
$if not set F $set F 35
$if not set q $set q 1

set G / 0*%G% /
    F / 1*%F% /
    k / 1,2 /;
alias (G,i,j);

variable
    d
    y(F,k)
    z(G,G,F)
    s(G,G,F)
    r(G,G,F,k);
binary variable z;
positive variable s, y;    
y.up(F,k) = 1;
 
Equation
   Assign_Customers(G,G)
   Quad_Dist_RHS(G,G,F)
   Quad_Dist_K1(G,G,F)
   Quad_Dist_K2(G,G,F)
   Quad_Dist(G,G,F);

Assign_Customers(i,j)..
    sum {f, z[i,j,f]} =e= 1;

$set M (2*sqrt(2))

Quad_Dist_RHS(i,j,f)..
     s[i,j,f] =e= d + %M%*(1 - z[i,j,f]);
Quad_Dist_K1(i,j,f)..
     r[i,j,f,'1'] =e= i.val/%G% - y[f,'1'];
Quad_Dist_K2(i,j,f)..
     r[i,j,f,'2'] =e= j.val/%G% - y[f,'2'];
Quad_Dist(i,j,f)..
     sum {k, sqr(r[i,j,f,k])} =l= sqr(s[i,j,f]);
     
model fac / all /;

$echo dumpgdx xyz.gdx   > convert.opt
$echo GDXQuadratic 1   >> convert.opt
$echo QExtractAlg  %q% >> convert.opt

fac.optfile = 1;
option limrow = 0, limcol = 0, solver = convert;
* option sys3=3;
solve fac min d using rmiqcp;