lp15.gms : LP with many zeros at solution

Description

This model turfed up an issue with GAMS/KNITRO using the KNITRO 8.1.1 libs.
If you run with --DOFIXING=1 we fix vars whose optimal value is zero.

Contributor: Steve Dirkse, Apr 2013


Small Model of Type : LP


Category : GAMS Test library


Main file : lp15.gms

$title LP with many zeros at solution (LP15,SEQ=607)

$onText
This model turfed up an issue with GAMS/KNITRO using the KNITRO 8.1.1 libs.
If you run with --DOFIXING=1 we fix vars whose optimal value is zero.

Contributor: Steve Dirkse, Apr 2013
$offText

$if not set TESTTOL $set TESTTOL 1e-6

Variables  x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19
          ,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36
          ,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53
          ,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70
          ,x71,x72,x73,x74,x75,x76,x77,x78,x79,x80,x81,x82,x83,x84,x85,x86,x87
          ,x88,x89,x90,x91,x92,x93,x94,x95,x96,x97,x98,x99,x100,x101,x102,x103
          ,x104,x105,x106,x107,x108,x109,x110,x111,x112,x113,x114,x115,x116
          ,x117,x118,x119,x120,x121,x122,x123,x124,x125,x126,x127,x128,x129
          ,x130,x131;

Positive Variables  x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17
          ,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34
          ,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51
          ,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68
          ,x69,x70,x71,x72,x73,x74,x75,x76,x77,x78,x79,x80,x81,x82,x83,x84,x85
          ,x86,x87,x88,x89,x90,x91,x92,x93,x94,x95,x96,x97,x98,x99,x100,x101
          ,x102,x103,x104,x105,x106,x107,x108,x109,x110,x111,x112,x113,x114
          ,x115,x116,x117,x118,x119,x120,x121,x122,x123,x124,x125,x126,x127
          ,x128,x129,x130,x131;

Equations  e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19
          ,e20,e21;


e1..    x1 - 7.94371645704962*x2 - 2.26113114277088*x3 - 3.38065073538384*x4
      - 7.14300402192478*x5 - 5.04825110458736*x6 - 9.68973486680128*x7
      - 9.62106351516712*x8 - 9.09304802942527*x9 - 3.94792252101998*x10
      - 5.113900935716*x11 - 6.36563530642949*x12 - 8.90762227896649*x13
      - 2.53606265907487*x14 - 6.7024312289866*x15 - 7.94431618490897*x16
      - 6.12502399120752*x17 - 635.528516964996*x18 - 8.2989574166744*x19
      - 3.51037863350163*x20 - 4.90015537103137*x21 - 4.02637174837522*x22
      - 182.921962447185*x23 - 6.16953542942867*x24 - 5.89080103351099*x25
      - 6.20346714086806*x26 - 9.79495489237814*x27 - 3.89320550520756*x28
      - 7.86675625006026*x29 - 9.66263881863133*x30 - 9.54091790940512*x31
      - 3.30303672066149*x32 - 3.92452592975089*x33 - 2.93310115654553*x34
      - 2.56562683599376*x35 - 7.5812921108628*x36 - 3.4314614890109*x37
      - 7.82628532808339*x38 - 6.55687972827566*x39 - 3.6189886023889*x40
      - 7.66629398751903*x41 - 1.06990163834191*x42 - 8.79859557701635*x43
      - 1.13627774625693*x44 - 4.85456775109504*x45 - 4.22785669536148*x46
      - 7.34386142551861*x47 - 613.051894636754*x48 - 5.94823507714054*x49
      - 635.527267228557*x50 - 7.29622906419617*x51 - 9.40128606448877*x52
      - 5.22352796221324*x53 - 2.92262154255386*x54 - 5.59705624007455*x55
      - 4.29147205754465*x56 - 9.41861735090758*x57 - 97872.111590446*x58
      - 5.53481361632918*x59 - 4.53168940774262*x60 - 2.84370150641597*x61
      - 5.76591571168938*x62 - 6.30179550297372*x63 - 4.1122392201559*x64
      - 3.27595087357815*x65 - 5.92892704547841*x66 - 5.92734699814815*x67
      - 1.52441433237004*x68 - 4.39961518627275*x69 - 9.7666130268134*x70
      - 4.41838148875139*x71 - 2.4066522358941*x72 - 5.25032919420018*x73
      - 4.57303055190211*x74 - 2.84970863729927*x75 - 6.64609115864812*x76
      - 1.03195545160583*x77 - 5.53558723392698*x78 - 1.02010089697586*x79
      - 5.69230207781374*x80 - 8.52514382942082*x81 - 1.64908894163007*x82
      - 7.84585027397479*x83 - 3.61132733126844*x84 - 3.20458330378815*x85
      - 4.92382496448448*x86 - 4.31928096315115*x87 - 5.98081885376981*x88
      - 1.67200187929256*x89 - 9.18498543665824*x90 - 1.43832410505014*x91
      - 8.38322243050532*x92 - 8.13656186534732*x93 - 6.93582836784554*x94
      - 4.5259496152817*x95 - 4.71838122788287*x96 - 8.7911402160097*x97
      - 9.77786488576035*x98 - 6.15139913485822*x99 - 3.8257176474547*x100
      - 5.09528676627499*x101 - 4.33918817634576*x102 - 4.77864256135252*x103
      - 1.76774203476989*x104 - 8.33090782768015*x105 - 5.58278280770798*x106
      - 7.60976726119461*x107 - 8.41946283048195*x108 - 4.73077189214691*x109
      - 9.31986011165097*x110 - 4.54733953507616*x111 - 4.99884583272851*x112
      - 7.25925195857439*x113 - 7.09024670352171*x114 - 6.14389597778061*x115
      - 2.56165203698043*x116 - 6.43914629898514*x117 - 6.27396347805049*x118
      - 7.55003954612009*x119 - 3.21605413604563*x120 - 2.27875045585279*x121
      - 9.02074522225042*x122 - 4.98489368899947*x123 - 2.02912140635919*x124
      - 9.1325829669723*x125 - 4.00467380701076*x126 - 9.96421622248631*x127
      - 5.18047760513443*x128 - 5.7744441049842*x129 - 2.71347492357036*x130
      - 2.79153249176609*x131 =E= 0;

e2..    x2 + x3 + x4 + x5 + x6 + x7 - x23 - x32 - x38 - x47 - x69 - x81 =E= 0;

e3..    x8 + x9 + x10 + x11 + x12 + x13 + x14 - x15 - x24 - x33 - x39 - x53
      - x70 - x107 - x121 =E= 0;

e4..  - x8 + x15 + x16 + x17 + x18 + x19 + x20 + x21 + x22 - x34 - x71 - x77
      - x85 - x98 =E= 0;

e5..  - x9 - x16 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 - x48
      - x61 - x72 - x92 - x103 - x114 - x122 =E= 0;

e6..  - x2 - x25 + x32 + x33 + x34 + x35 + x36 + x37 - x49 - x62 - x82 - x86
      - x108 - x128 =E= 0;

e7..  - x3 - x17 - x26 - x35 + x38 + x39 + x40 + x41 + x42 + x43 + x44 + x45
      + x46 - x54 - x63 =E= -1;

e8..  - x10 + x47 + x48 + x49 + x50 + x51 + x52 - x55 - x73 - x83 - x87 - x93
      - x99 - x115 =E= 0;

e9..  - x40 - x50 + x53 + x54 + x55 + x56 + x57 + x58 + x59 + x60 - x64 - x74
      - x88 - x104 - x129 =E= 0;

e10..  - x4 - x41 - x56 + x61 + x62 + x63 + x64 + x65 + x66 + x67 + x68 - x78
       - x94 =E= 0;

e11..  - x18 - x65 + x69 + x70 + x71 + x72 + x73 + x74 + x75 + x76 - x100
       - x109 - x123 =E= 0;

e12..  - x11 - x27 + x77 + x78 + x79 + x80 - x95 - x110 - x124 - x130 =E= 0;

e13..  - x28 - x42 - x57 - x75 - x79 + x81 + x82 + x83 + x84 - x101 - x111
       - x116 =E= 0;

e14..  - x12 - x29 - x58 - x84 + x85 + x86 + x87 + x88 + x89 + x90 + x91 - x105
       - x117 - x131 =E= 0;

e15..  - x19 - x76 - x89 + x92 + x93 + x94 + x95 + x96 + x97 - x102 - x125
       =E= 0;

e16..  - x5 - x13 - x20 - x43 - x59 - x66 + x98 + x99 + x100 + x101 + x102
       - x126 =E= 0;

e17..  - x14 - x21 + x103 + x104 + x105 + x106 =E= 0;

e18..  - x6 - x36 - x44 - x51 - x80 + x107 + x108 + x109 + x110 + x111 + x112
       + x113 - x118 =E= 0;

e19..  - x7 - x30 - x45 - x60 - x90 - x96 - x112 + x114 + x115 + x116 + x117
       + x118 + x119 + x120 =E= 1;

e20..  - x22 - x37 - x46 - x67 - x106 - x119 + x121 + x122 + x123 + x124 + x125
       + x126 + x127 =E= 0;

e21..  - x31 - x52 - x68 - x91 - x97 - x113 - x120 - x127 + x128 + x129 + x130
       + x131 =E= 0;

* set non-default levels
x1.l = 7.29969557525491;
x2.l = 0.000489988128077299;
x3.l = 0.00483776106437889;
x4.l = 0.000143062685291375;
x5.l = 0.000321147077853275;
x6.l = 0.000212063791197897;
x7.l = 7.94717370884318E-5;
x8.l = 0.000318785924930735;
x9.l = 0.000347653064019926;
x10.l = 0.000722188024112967;
x11.l = 0.000593414610540324;
x12.l = 0.000252631524559881;
x13.l = 0.000396554110410454;
x14.l = 0.00272093103986709;
x15.l = 0.00069076940526544;
x16.l = 0.00047818233180975;
x17.l = 0.0029543518193458;
x18.l = 2.31453892642548E-6;
x19.l = 0.000446889186594945;
x20.l = 0.000903396425408334;
x21.l = 0.00118397873666409;
x22.l = 0.000660501503018066;
x23.l = 1.6969565954801E-5;
x24.l = 0.00083010954467402;
x25.l = 0.00139741289201819;
x26.l = 0.00312840732483265;
x27.l = 0.000502548749055438;
x28.l = 0.000801473391672192;
x29.l = 0.00029030896198679;
x30.l = 0.000108743779458923;
x31.l = 0.000398636466485315;
x32.l = 0.0010175354025098;
x33.l = 0.000421276540865463;
x34.l = 0.000211235534633512;
x35.l = 0.983204090612027;
x36.l = 0.000168895371840052;
x37.l = 5.45390958794833E-5;
x38.l = 0.000362785889777749;
x39.l = 0.000273586756966628;
x40.l = 0.000352358315562705;
x41.l = 0.000227989654172674;
x42.l = 9.2882503083605E-5;
x43.l = 0.000219030551179005;
x44.l = 2.1078029659396E-5;
x45.l = 7.90502197651646E-5;
x46.l = 0.000113587897152561;
x47.l = 0.00255526577764412;
x48.l = 2.23318682659569E-6;
x49.l = 0.00360555422808058;
x50.l = 2.2733640195965E-6;
x51.l = 7.39992933842439E-5;
x52.l = 0.000230603816819018;
x53.l = 0.000403534341703178;
x54.l = 0.00663472606212624;
x55.l = 0.000301347430814556;
x56.l = 0.000450275032720486;
x57.l = 0.000246732529782611;
x58.l = 1.33592453509267E-8;
x59.l = 0.000346358090578397;
x60.l = 0.000113716121160851;
x61.l = 0.000465199564382656;
x62.l = 0.000600024021946217;
x63.l = 0.000983012934609177;
x64.l = 0.000793222534810449;
x65.l = 0.000561131109183453;
x66.l = 0.000410324001615664;
x67.l = 0.000379575889837393;
x68.l = 0.000379273523236681;
x69.l = 0.00122550250696173;
x70.l = 0.000414225726023575;
x71.l = 0.000603799688164847;
x72.l = 0.00066733389210397;
x73.l = 0.00051130073231922;
x74.l = 0.00103996260224949;
x75.l = 0.000617855820027095;
x76.l = 0.000447703544270948;
x77.l = 0.00465315699984357;
x78.l = 0.00219425164180796;
x79.l = 0.000708200799339531;
x80.l = 0.00034450139395203;
x81.l = 0.00090543534103894;
x82.l = 0.973116993364857;
x83.l = 0.000548901888828404;
x84.l = 9.33748333003515E-5;
x85.l = 0.00117429035989348;
x86.l = 0.00186661437898002;
x87.l = 0.000876490109767453;
x88.l = 0.00134744430191274;
x89.l = 0.00213223514043943;
x90.l = 0.000113594300940695;
x91.l = 0.00100629062264905;
x92.l = 0.000527614660034766;
x93.l = 0.000563918098711969;
x94.l = 0.00155618456562918;
x95.l = 0.000902695719958425;
x96.l = 0.000150302311725666;
x97.l = 0.000406188047678767;
x98.l = 0.00035911543956672;
x99.l = 0.000629215932097273;
x100.l = 0.00121911066502029;
x101.l = 0.00066486498994538;
x102.l = 0.000637873908978289;
x103.l = 0.000485971876344683;
x104.l = 0.00286089801688682;
x105.l = 0.000126848554061959;
x106.l = 0.000431191329237728;
x107.l = 0.000758369054605783;
x108.l = 0.000936827023093695;
x109.l = 0.00250588603524506;
x110.l = 0.000569336709184385;
x111.l = 0.000904958332691112;
x112.l = 0.00016263625810755;
x113.l = 0.00052038385218252;
x114.l = 0.00404025550328707;
x115.l = 0.00231656745012231;
x116.l = 0.970627737061482;
x117.l = 0.0037025649697624;
x118.l = 0.00553785938507648;
x119.l = 0.00464687777123837;
x120.l = 0.00993565258727808;
x121.l = 0.0015602869283373;
x122.l = 0.000460166597328929;
x123.l = 0.00123924216374569;
x124.l = 0.00130618024702949;
x125.l = 0.000442201623455167;
x126.l = 0.000913370678562807;
x127.l = 0.000364825247904212;
x128.l = 0.00306415852070257;
x129.l = 0.00210054383268988;
x130.l = 0.004025934799175;
x131.l = 0.00405121701166614;

* set non-default marginals
e1.m = 1;
e2.m = 377.447109825993;
e3.m = 380.168650231271;
e4.m = 379.372765262116;
e5.m = 379.885183158084;
e6.m = 379.245263620647;
e7.m = 376.690593589385;
e8.m = 384.432993989349;
e9.m = 378.132098270894;
e10.m = 375.452122441055;
e11.m = 376.21140623482;
e12.m = 380.236692511213;
e13.m = 380.893673633347;
e14.m = 379.662319708859;
e15.m = 379.04199197675;
e16.m = 379.714469236533;
e17.m = 378.133201378297;
e18.m = 379.522343141135;
e19.m = 383.453006961638;
e20.m = 378.548360975549;
e21.m = 381.719371440159;
x2.m = 9.74187025170414;
x3.m = 1.50461490616265;
x4.m = 1.38566335044554;
x5.m = 9.41036343246476;
x6.m = 7.12348441972945;
x7.m = 15.6956320024464;
x8.m = 8.82517854601245;
x9.m = 8.80958095623872;
x10.m = 8.21226627909847;
x11.m = 5.18194321565836;
x12.m = 5.8593047840181;
x13.m = 8.45344128422866;
x14.m = 0.500613806100781;
x15.m = 7.49831619814128;
x16.m = 8.4567340808771;
x17.m = 3.44285231847615;
x18.m = 632.3671579377;
x19.m = 7.96818413130889;
x20.m = 3.85208260791847;
x21.m = 3.66059148721195;
x22.m = 3.20196746180857;
x23.m = 180.483889115094;
x24.m = 6.45300250261522;
x25.m = 5.25088149607424;
x26.m = 3.00887757216856;
x27.m = 10.146464245507;
x28.m = 4.90169598047039;
x29.m = 7.64389280083542;
x30.m = 13.2304626221852;
x31.m = 11.3751061914798;
x32.m = 1.50488292600697;
x33.m = 4.84791254037418;
x34.m = 3.06060279801415;
x35.m = 0.0109568047310055;
x36.m = 7.85837163135037;
x37.m = 2.73455884391287;
x38.m = 8.58280156469162;
x39.m = 10.0349363701617;
x40.m = 5.06049328389877;
x41.m = 6.42782283918896;
x42.m = 5.27298168230424;
x43.m = 11.8224712241646;
x44.m = 3.96802729800725;
x45.m = 11.6169811233484;
x46.m = 6.08562408152621;
x47.m = 0.357977262162304;
x48.m = 608.504083805489;
x49.m = 0.760504708438752;
x50.m = 629.226371510102;
x51.m = 2.38557821598195;
x52.m = 6.68766351529843;
x53.m = 7.26007992258942;
x54.m = 1.48111686104399;
x55.m = 11.8979519585292;
x56.m = 1.61149622770471;
x57.m = 12.18019271336;
x58.m = 97873.641811884;
x59.m = 7.11718458196753;
x60.m = 9.85259809848612;
x61.m = 7.27676222344554;
x62.m = 9.5590568912822;
x63.m = 7.54026665130379;
x64.m = 6.79221504999584;
x65.m = 4.03523466734386;
x66.m = 10.1912738409567;
x67.m = 9.02358553264293;
x68.m = 7.7916633314743;
x69.m = 5.63531877744535;
x70.m = 13.7238570232638;
x71.m = 7.57974051604713;
x72.m = 6.08042915915797;
x73.m = 13.4719169487291;
x74.m = 6.49372258797634;
x75.m = 7.53197603582597;
x76.m = 9.47667690057836;
x77.m = 0.168028202508804;
x78.m = 0.751017163768513;
x79.m = 1.67708201910979;
x80.m = 4.97795270773566;
x81.m = 5.07858002206672;
x82.m = 0.000678928930484526;
x83.m = 11.385170629977;
x84.m = 2.37997340678077;
x85.m = 2.91502885704487;
x86.m = 4.50676887627258;
x87.m = 9.08995524364103;
x88.m = 4.45059741580502;
x89.m = 1.05167414718377;
x90.m = 12.975672689437;
x91.m = 3.49537583634968;
x92.m = 9.22641361183895;
x93.m = 13.527563877946;
x94.m = 3.3459588321496;
x95.m = 5.72065014974423;
x96.m = 9.12939621277038;
x97.m = 11.468519679418;
x98.m = 9.43616091134352;
x99.m = 10.8699238876745;
x100.m = 0.322654645742124;
x101.m = 6.27449116308911;
x102.m = 3.66671091656341;
x103.m = 6.53062434114006;
x104.m = 1.76663892736781;
x105.m = 9.86002615824285;
x106.m = 5.99794240496075;
x107.m = 8.25607435133033;
x108.m = 8.14238330999438;
x109.m = 1.41983498583223;
x110.m = 10.0342094817291;
x111.m = 5.91867002728818;
x112.m = 8.92950965323156;
x113.m = 9.45628025759827;
x114.m = 3.52242289996784;
x115.m = 7.12388300549177;
x116.m = 0.00231870868938674;
x117.m = 2.64845904620642;
x118.m = 2.34329965754743;
x119.m = 2.64539356003144;
x120.m = 1.48241861456645;
x121.m = 3.89903971157411;
x122.m = 10.3575674047852;
x123.m = 2.64793894827038;
x124.m = 3.71745294202287;
x125.m = 9.62621396817345;
x126.m = 5.17078206799425;
x127.m = 13.1352266870958;
x128.m = 2.70636978562298;
x129.m = 2.18717093571987;
x130.m = 1.23079599462457;
x131.m = 0.734480760466549;

$ifThen set DOFIXING
x2.fx = 0;
x3.fx = 0;
x4.fx = 0;
x5.fx = 0;
x6.fx = 0;
x7.fx = 0;
x8.fx = 0;
x9.fx = 0;
x10.fx = 0;
x11.fx = 0;
x12.fx = 0;
x13.fx = 0;
x14.fx = 0;
x15.fx = 0;
x16.fx = 0;
x17.fx = 0;
x18.fx = 0;
x19.fx = 0;
x20.fx = 0;
x21.fx = 0;
x22.fx = 0;
x23.fx = 0;
x24.fx = 0;
x25.fx = 0;
x26.fx = 0;
x27.fx = 0;
x28.fx = 0;
x29.fx = 0;
x30.fx = 0;
x31.fx = 0;
x32.fx = 0;
x33.fx = 0;
x34.fx = 0;
* x35 unfixed
x36.fx = 0;
x37.fx = 0;
x38.fx = 0;
x39.fx = 0;
x40.fx = 0;
x41.fx = 0;
x42.fx = 0;
x43.fx = 0;
x44.fx = 0;
x45.fx = 0;
x46.fx = 0;
x47.fx = 0;
x48.fx = 0;
x49.fx = 0;
x50.fx = 0;
x51.fx = 0;
x52.fx = 0;
x53.fx = 0;
x54.fx = 0;
x55.fx = 0;
x56.fx = 0;
x57.fx = 0;
x58.fx = 0;
x59.fx = 0;
x60.fx = 0;
x61.fx = 0;
x62.fx = 0;
x63.fx = 0;
x64.fx = 0;
x65.fx = 0;
x66.fx = 0;
x67.fx = 0;
x68.fx = 0;
x69.fx = 0;
x70.fx = 0;
x71.fx = 0;
x72.fx = 0;
x73.fx = 0;
x74.fx = 0;
x75.fx = 0;
x76.fx = 0;
x77.fx = 0;
x78.fx = 0;
x79.fx = 0;
x80.fx = 0;
x81.fx = 0;
* x82 unfixed
x83.fx = 0;
x84.fx = 0;
x85.fx = 0;
x86.fx = 0;
x87.fx = 0;
x88.fx = 0;
x89.fx = 0;
x90.fx = 0;
x91.fx = 0;
x92.fx = 0;
x93.fx = 0;
x94.fx = 0;
x95.fx = 0;
x96.fx = 0;
x97.fx = 0;
x98.fx = 0;
x99.fx = 0;
x100.fx = 0;
x101.fx = 0;
x102.fx = 0;
x103.fx = 0;
x104.fx = 0;
x105.fx = 0;
x106.fx = 0;
x107.fx = 0;
x108.fx = 0;
x109.fx = 0;
x110.fx = 0;
x111.fx = 0;
x112.fx = 0;
x113.fx = 0;
x114.fx = 0;
x115.fx = 0;
* x116 unfixed
x117.fx = 0;
x118.fx = 0;
x119.fx = 0;
x120.fx = 0;
x121.fx = 0;
x122.fx = 0;
x123.fx = 0;
x124.fx = 0;
x125.fx = 0;
x126.fx = 0;
x127.fx = 0;
x128.fx = 0;
x129.fx = 0;
x130.fx = 0;
x131.fx = 0;
$endIf

Model m / all /;

m.limrow=0; m.limcol=0;

Solve m using LP minimizing x1;

abort$[m.modelstat <> 1] 'not solved';

scalars
  tol     / %TESTTOL% /
  zbar 'known solution' / 6.77636781462 /
  z
  ;
z = x1.l;

file log / '' /;
log.nd = 16;
put log / 'zbar = ', zbar
        / '   z = ', z
        /;
abort$[abs(z-zbar) > tol] 'wrong optimum value', zbar, z, tol;