emp27.gms : Test LOGMIP/EMP on x.fx=0 handling

Description

Test LOGMIP behavior for the convex hull reformulation of a
disjunction when a var is fixed at 0 and appears in a NL equation of a
disjunction.

This turfed up a bug for GAMS 24.9.1 and previous.

Contributor: Steve Dirkse, Sep 2017


Small Model of Type : GAMS


Category : GAMS Test library


Main file : emp27.gms

$title 'Test LOGMIP/EMP on x.fx=0 handling' (EMP27,SEQ=738)

$onText
Test LOGMIP behavior for the convex hull reformulation of a
disjunction when a var is fixed at 0 and appears in a NL equation of a
disjunction.

This turfed up a bug for GAMS 24.9.1 and previous.

Contributor: Steve Dirkse, Sep 2017
$offText


$if not set TESTTOL $set TESTTOL 1e-6
scalars tol / %TESTTOL% /;

set i / i1 * i3 /;
parameters
  c(i) 'objective center' /
    i1  0.25
    i2  0.25
  /
  b1(i) 'ball1 center' /
    i1  2
    i2  2
    i3  1
  /
  b2(i) 'ball2 center' /
    i1  -2
    i2  -2
    i3  -1
  /

variables v(i), z;
equations zDef, ball1, ball2;

zDef.. sum{i, sqr(v(i)-c(i))} =E= z;
ball1.. sum{i, sqr(v(i)-b1(i))} =L= 3;
ball2.. sum{i, sqr(v(i)-b2(i))} =L= 3;

model m /all/ ;

file emp / '%emp.info%' /;
putclose emp
  / 'modeltype minlp'
  / 'default chull 100'
  / 'disjunction * ball1 else ball2'
  /;

option optcr =0.0;
option emp = logmip;

* this is the troublesome variable fixing
v.fx('i3') = 0;

solve m using EMP minimize z;

abort$[m.solveStat <> 1] 'expected solveStat==1, got:', m.solveStat;
abort$[abs(z.L-1.125) > 1e-6] 'expected z.L=1.125, got:', z.L;
abort$[abs(ball1.L-3) > 1e-6] 'expected ball1.L=3, got:', ball1.L;
abort$[abs(ball2.L-19) > 1e-6] 'expected ball2.L=19, got:', ball2.L;