/***********************************************************************/ /* // MIDACO 7 benchmark - Stochastic facility location sfacloc1_2_95 // ----------------------------------------------------------------- // // Facility location under uncertainty with a probabilistic (chance) // constraint at reliability level 0.95: 9 binary and 162 continuous // variables, 68 equality and 140 inequality constraints, nonlinear. // // Reference: M. A. Lejeune and F. Margot, Solving chance-constrained // optimization problems with stochastic quadratic inequalities, // Operations Research 64 (2016) 939-957. // MINLPLib instance sfacloc1_2_95: // https://www.minlplib.org/sfacloc1_2_95.html // // Variables: 171 variables (162 continuous, 9 binary) // Constraints: 208 (68 equality, 140 inequality) // Optimum: F(X) = 18.8500827 (best known, MINLPLib) // // MIDACO setting: all parameters by default except PMISQP = 2, // ACCURACY = 1e-4; start at the lower bounds; the run stops when // F(X) reaches the best known value + 0.01 % (FSTOP). // // Run it with: java --enable-native-access=ALL-UNNAMED Sfacloc1_2_95.java // // This benchmark needs a full MIDACO license: the limited version // solves problems with up to 8 variables and the default parameters. */ /***********************************************************************/ public class Sfacloc1_2_95 { static void problemFunction(double[] f, double[] g, double[] x) { /* MINLPLib model sfacloc1_2_95 in scalar form: objective f, constraints g */ /* g[0..67] are equality constraints (= 0), g[68..207] inequality constraints (>= 0) */ double t; f[0] = -(-x[68]-x[69]-x[70]-x[71]-x[72]-x[73]-x[74]-x[75]-x[76]- x[77]-x[78]-x[79]-x[80]-x[81]-x[82])/1.0; g[0] = (-1.01*x[0])*x[30]-1.01*x[1]*x[31]-1.01*x[30]*x[0]- 1.01*x[31]*x[1]+x[147]; g[1] = (-2.00666666666667*x[2])*x[32]-2.00666666666667*x[3]*x[33]- 2.00666666666667*x[32]*x[2]-2.00666666666667*x[33]*x[3]+x[148]; g[2] = (-2.38*x[4])*x[34]-2.38*x[5]*x[35]-2.38*x[34]*x[4]- 2.38*x[35]*x[5]+x[149]; g[3] = (-x[60]*x[37])*x[7]-x[60]*x[36]*x[6]+x[150]; g[4] = (-x[61]*x[39])*x[9]-x[61]*x[38]*x[8]+x[151]; g[5] = (-x[62]*x[41])*x[11]-x[62]*x[40]*x[10]+x[152]; g[6] = (-3.29666666666667*x[12])*x[42]- 3.29666666666667*x[13]*x[43]-3.29666666666667*x[42]*x[12]- 3.29666666666667*x[43]*x[13]+x[153]; g[7] = (-x[63]*x[45])*x[15]-x[63]*x[44]*x[14]+x[154]; g[8] = (-x[64]*x[47])*x[17]-x[64]*x[46]*x[16]+x[155]; g[9] = (-x[65]*x[49])*x[19]-x[65]*x[48]*x[18]+x[156]; g[10] = (-x[66]*x[51])*x[21]-x[66]*x[50]*x[20]+x[157]; g[11] = (-40.4533333333333*x[22])*x[52]- 40.4533333333333*x[23]*x[53]-40.4533333333333*x[52]*x[22]- 40.4533333333333*x[53]*x[23]+x[158]; g[12] = (-13.0733333333333*x[24])*x[54]- 13.0733333333333*x[25]*x[55]-13.0733333333333*x[54]*x[24]- 13.0733333333333*x[55]*x[25]+x[159]; g[13] = (-19.0*x[26])*x[56]-19.0*x[27]*x[57]-19.0*x[56]*x[26]- 19.0*x[57]*x[27]+x[160]; g[14] = (-x[67]*x[59])*x[29]-x[67]*x[58]*x[28]+x[161]; g[15] = x[0]+x[1]-1.0; g[16] = x[2]+x[3]-1.0; g[17] = x[4]+x[5]-1.0; g[18] = x[6]+x[7]-1.0; g[19] = x[8]+x[9]-1.0; g[20] = x[10]+x[11]-1.0; g[21] = x[12]+x[13]-1.0; g[22] = x[14]+x[15]-1.0; g[23] = x[16]+x[17]-1.0; g[24] = x[18]+x[19]-1.0; g[25] = x[20]+x[21]-1.0; g[26] = x[22]+x[23]-1.0; g[27] = x[24]+x[25]-1.0; g[28] = x[26]+x[27]-1.0; g[29] = x[28]+x[29]-1.0; g[30] = x[30]-x[87]-x[117]; g[31] = x[31]-x[88]-x[118]; g[32] = x[32]-x[89]-x[119]; g[33] = x[33]-x[90]-x[120]; g[34] = x[34]-x[91]-x[121]; g[35] = x[35]-x[92]-x[122]; g[36] = x[36]-x[93]-x[123]; g[37] = x[37]-x[94]-x[124]; g[38] = x[38]-x[95]-x[125]; g[39] = x[39]-x[96]-x[126]; g[40] = x[40]-x[97]-x[127]; g[41] = x[41]-x[98]-x[128]; g[42] = x[42]-x[99]-x[129]; g[43] = x[43]-x[100]-x[130]; g[44] = x[44]-x[101]-x[131]; g[45] = x[45]-x[102]-x[132]; g[46] = x[46]-x[103]-x[133]; g[47] = x[47]-x[104]-x[134]; g[48] = x[48]-x[105]-x[135]; g[49] = x[49]-x[106]-x[136]; g[50] = x[50]-x[107]-x[137]; g[51] = x[51]-x[108]-x[138]; g[52] = x[52]-x[109]-x[139]; g[53] = x[53]-x[110]-x[140]; g[54] = x[54]-x[111]-x[141]; g[55] = x[55]-x[112]-x[142]; g[56] = x[56]-x[113]-x[143]; g[57] = x[57]-x[114]-x[144]; g[58] = x[58]-x[115]-x[145]; g[59] = x[59]-x[116]-x[146]; g[60] = x[60]-0.28*x[162]-5.68; g[61] = x[61]-1.91333333333333*x[163]-40.18; g[62] = x[62]-4.51333333333333*x[164]-94.7666666666667; g[63] = x[63]-2.81333333333333*x[165]-59.0533333333333; g[64] = x[64]-2.55333333333333*x[166]-53.7333333333333; g[65] = x[65]-1.88666666666667*x[167]-1.88666666666667*x[168]- 37.7266666666667; g[66] = x[66]-2.84666666666667*x[169]-59.6466666666667; g[67] = x[67]-2.96666666666667*x[170]-59.2733333333333; t = 302.08-2.02*x[0]-4.01333333333333*x[2]-4.76*x[4]-5.96*x[6]- 42.0933333333333*x[8]-99.28*x[10]-6.59333333333333*x[12]- 61.8666666666667*x[14]-56.2866666666667*x[16]; t = t-41.5*x[18]-62.4933333333333*x[20]-80.9066666666667*x[22]- 26.1466666666667*x[24]-38.0*x[26]-62.24*x[28]; g[68] = t; t = 302.08-2.02*x[1]-4.01333333333333*x[3]-4.76*x[5]-5.96*x[7]- 42.0933333333333*x[9]-99.28*x[11]-6.59333333333333*x[13]- 61.8666666666667*x[15]-56.2866666666667*x[17]; t = t-41.5*x[19]-62.4933333333333*x[21]-80.9066666666667*x[23]- 26.1466666666667*x[25]-38.0*x[27]-62.24*x[29]; g[69] = t; g[70] = x[83]+x[87]-0.29424122; g[71] = x[84]+x[88]-0.29424122; g[72] = x[83]+x[89]-0.29760193; g[73] = x[84]+x[90]-0.29760193; g[74] = x[83]+x[91]-0.35149534; g[75] = x[84]+x[92]-0.35149534; g[76] = x[83]+x[93]-0.30458283; g[77] = x[84]+x[94]-0.30458283; g[78] = x[83]+x[95]-0.29951066; g[79] = x[84]+x[96]-0.29951066; g[80] = x[83]+x[97]-0.30694357; g[81] = x[84]+x[98]-0.30694357; g[82] = x[83]+x[99]-0.33520661; g[83] = x[84]+x[100]-0.33520661; g[84] = x[83]+x[101]-0.3400071; g[85] = x[84]+x[102]-0.3400071; g[86] = x[83]+x[103]-0.35227087; g[87] = x[84]+x[104]-0.35227087; g[88] = x[83]+x[105]-0.34225726; g[89] = x[84]+x[106]-0.34225726; g[90] = x[83]+x[107]-0.32776566; g[91] = x[84]+x[108]-0.32776566; g[92] = x[83]+x[109]-0.30438256; g[93] = x[84]+x[110]-0.30438256; g[94] = x[83]+x[111]-0.28538336; g[95] = x[84]+x[112]-0.28538336; g[96] = x[83]+x[113]-0.27950575; g[97] = x[84]+x[114]-0.27950575; g[98] = -x[83]+x[87]+0.29424122; g[99] = -x[84]+x[88]+0.29424122; g[100] = -x[83]+x[89]+0.29760193; g[101] = -x[84]+x[90]+0.29760193; g[102] = -x[83]+x[91]+0.35149534; g[103] = -x[84]+x[92]+0.35149534; g[104] = -x[83]+x[93]+0.30458283; g[105] = -x[84]+x[94]+0.30458283; g[106] = -x[83]+x[95]+0.29951066; g[107] = -x[84]+x[96]+0.29951066; g[108] = -x[83]+x[97]+0.30694357; g[109] = -x[84]+x[98]+0.30694357; g[110] = -x[83]+x[99]+0.33520661; g[111] = -x[84]+x[100]+0.33520661; g[112] = -x[83]+x[101]+0.3400071; g[113] = -x[84]+x[102]+0.3400071; g[114] = -x[83]+x[105]+0.34225726; g[115] = -x[84]+x[106]+0.34225726; g[116] = -x[83]+x[107]+0.32776566; g[117] = -x[84]+x[108]+0.32776566; g[118] = -x[83]+x[109]+0.30438256; g[119] = -x[84]+x[110]+0.30438256; g[120] = -x[83]+x[111]+0.28538336; g[121] = -x[84]+x[112]+0.28538336; g[122] = -x[83]+x[113]+0.27950575; g[123] = -x[84]+x[114]+0.27950575; g[124] = -x[83]+x[115]+0.25788969; g[125] = -x[84]+x[116]+0.25788969; g[126] = x[85]+x[119]+0.9536939; g[127] = x[86]+x[120]+0.9536939; g[128] = x[85]+x[121]+0.9004898; g[129] = x[86]+x[122]+0.9004898; g[130] = x[85]+x[123]+0.9114032; g[131] = x[86]+x[124]+0.9114032; g[132] = x[85]+x[125]+0.90071532; g[133] = x[86]+x[126]+0.90071532; g[134] = x[85]+x[127]+0.88043054; g[135] = x[86]+x[128]+0.88043054; g[136] = x[85]+x[129]+0.8680249; g[137] = x[86]+x[130]+0.8680249; g[138] = x[85]+x[131]+0.81034814; g[139] = x[86]+x[132]+0.81034814; g[140] = x[85]+x[133]+0.80843127; g[141] = x[86]+x[134]+0.80843127; g[142] = x[85]+x[135]+0.7794471; g[143] = x[86]+x[136]+0.7794471; g[144] = x[85]+x[137]+0.79930922; g[145] = x[86]+x[138]+0.79930922; g[146] = x[85]+x[139]+0.84280733; g[147] = x[86]+x[140]+0.84280733; g[148] = x[85]+x[141]+0.81379236; g[149] = x[86]+x[142]+0.81379236; g[150] = x[85]+x[143]+0.82457178; g[151] = x[86]+x[144]+0.82457178; g[152] = x[85]+x[145]+0.80226439; g[153] = x[86]+x[146]+0.80226439; g[154] = -x[85]+x[117]-0.98493628; g[155] = -x[86]+x[118]-0.98493628; g[156] = -x[85]+x[119]-0.9536939; g[157] = -x[86]+x[120]-0.9536939; g[158] = -x[85]+x[121]-0.9004898; g[159] = -x[86]+x[122]-0.9004898; g[160] = -x[85]+x[123]-0.9114032; g[161] = -x[86]+x[124]-0.9114032; g[162] = -x[85]+x[125]-0.90071532; g[163] = -x[86]+x[126]-0.90071532; g[164] = -x[85]+x[127]-0.88043054; g[165] = -x[86]+x[128]-0.88043054; g[166] = -x[85]+x[129]-0.8680249; g[167] = -x[86]+x[130]-0.8680249; g[168] = -x[85]+x[131]-0.81034814; g[169] = -x[86]+x[132]-0.81034814; g[170] = -x[85]+x[133]-0.80843127; g[171] = -x[86]+x[134]-0.80843127; g[172] = -x[85]+x[137]-0.79930922; g[173] = -x[86]+x[138]-0.79930922; g[174] = -x[85]+x[139]-0.84280733; g[175] = -x[86]+x[140]-0.84280733; g[176] = -x[85]+x[141]-0.81379236; g[177] = -x[86]+x[142]-0.81379236; g[178] = -x[85]+x[143]-0.82457178; g[179] = -x[86]+x[144]-0.82457178; g[180] = -x[85]+x[145]-0.80226439; g[181] = -x[86]+x[146]-0.80226439; g[182] = x[163]+x[164]-1.0; g[183] = x[162]+x[164]-1.0; g[184] = x[162]+x[163]-1.0; g[185] = x[164]+x[166]-1.0; g[186] = x[164]+x[165]-1.0; g[187] = x[163]+x[166]-1.0; g[188] = x[163]+x[165]-1.0; g[189] = x[162]+x[166]-1.0; g[190] = x[162]+x[165]-1.0; g[191] = x[167]-x[168]; g[192] = x[85]-x[86]; g[193] = -(-x[68]+x[147]); g[194] = -(-x[69]+x[148]); g[195] = -(-x[70]+x[149]); g[196] = -(-x[71]+x[150]); g[197] = -(-x[72]+x[151]); g[198] = -(-x[73]+x[152]); g[199] = -(-x[74]+x[153]); g[200] = -(-x[75]+x[154]); g[201] = -(-x[76]+x[155]); g[202] = -(-x[77]+x[156]); g[203] = -(-x[78]+x[157]); g[204] = -(-x[79]+x[158]); g[205] = -(-x[80]+x[159]); g[206] = -(-x[81]+x[160]); g[207] = -(-x[82]+x[161]); } public static void main(String[] args) { String key = "************************************************************"; Midaco.Problem problem = new Midaco.Problem(); // Problem specifications Midaco.Option option = new Midaco.Option(); // MIDACO options problem.function = Sfacloc1_2_95::problemFunction; // Handle for problem function problem.o = 1; /* Number of objectives */ problem.n = 171; /* Number of variables (in total) */ problem.ni = 9; /* Number of integer variables (0 <= ni <= n) */ problem.m = 208; /* Number of constraints (in total) */ problem.me = 68; /* Number of equality constraints (0 <= me <= m) */ problem.xl = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25788969, 0.25788969, -0.98493628, -0.98493628, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; problem.xu = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.26351883, 0.26351883, 0.22891574, 0.22891574, 0.21464835, 0.21464835, 0.17964414, 0.17964414, 0.17402843, 0.17402843, 0.15355962, 0.15355962, 0.1942283, 0.1942283, 0.25670555, 0.25670555, 0.27088619, 0.27088619, 0.28985675, 0.28985675, 0.25550303, 0.25550303, 0.19001726, 0.19001726, 0.23803143, 0.23803143, 0.23312962, 0.23312962, 0.27705307, 0.27705307, 5.96, 42.0933333333333, 99.28, 61.8666666666667, 56.2866666666667, 41.5, 62.4933333333333, 62.24, 0.5323080366, 0.918715169866666, 1.021726146, 1.0706790744, 7.32543671346667, 15.2453990736, 1.28061192466667, 15.8815166933333, 15.2472806811333, 12.029055125, 15.9672360214667, 15.3736631157333, 6.2237284564, 8.85892556, 17.2437830768, 0.35227087, 0.35227087, -0.7794471, -0.7794471, 0.0580296499999999, 0.0580296499999999, 0.0546689399999999, 0.0546689399999999, 0.09360565, 0.09360565, 0.0476880399999999, 0.0476880399999999, 0.05276021, 0.05276021, 0.04905388, 0.04905388, 0.07731692, 0.07731692, 0.08211741, 0.08211741, 0.09438118, 0.09438118, 0.08436757, 0.08436757, 0.06987597, 0.06987597, 0.04788831, 0.04788831, 0.0668875099999999, 0.0668875099999999, 0.07276512, 0.07276512, 0.09438118, 0.09438118, 0.20548918, 0.20548918, 0.1742468, 0.1742468, 0.1210427, 0.1210427, 0.1319561, 0.1319561, 0.12126822, 0.12126822, 0.10450574, 0.10450574, 0.11691138, 0.11691138, 0.17458814, 0.17458814, 0.17650501, 0.17650501, 0.20548918, 0.20548918, 0.18562706, 0.18562706, 0.14212895, 0.14212895, 0.17114392, 0.17114392, 0.1603645, 0.1603645, 0.18267189, 0.18267189, 0.5323080366, 0.918715169866666, 1.021726146, 1.0706790744, 7.32543671346667, 15.2453990736, 1.28061192466667, 15.8815166933333, 15.2472806811333, 12.029055125, 15.9672360214667, 15.3736631157333, 6.2237284564, 8.85892556, 17.2437830768, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; problem.x = problem.xl.clone(); /* Starting point: lower bounds */ option.maxeval = 10000000; option.maxtime = 60*60*24; option.printeval = 1000; option.save2file = 1; option.resumable = 0; option.param[ 0] = 1e-4; /* ACCURACY */ option.param[ 1] = 0.0; /* SEED */ option.param[ 2] = 18.8500827 + 1e-4*18.8500827; /* FSTOP */ option.param[ 3] = 0.0; /* ALGOSTOP */ option.param[ 4] = 0.0; /* EVALSTOP */ option.param[ 5] = 0.0; /* FOCUS */ option.param[ 6] = 0.0; /* ANTS */ option.param[ 7] = 0.0; /* KERNEL */ option.param[ 8] = 0.0; /* ORACLE */ option.param[ 9] = 0.0; /* PARETOMAX */ option.param[10] = 0.0; /* EPSILON */ option.param[11] = 0.0; /* BALANCE */ option.param[12] = 0.0; /* CHARACTER */ option.param[13] = 0.0; /* SURROGATE */ option.param[14] = 2.0; /* PMISQP */ option.parallel = 0; /* Serial: 0 or 1, Parallel: 2,3,4,5,6,7,8... */ Midaco.Solution solution = Midaco.run(problem, option, key); } }