\$title Princeton Bilevel Optimization Example 9.1.1 (FLDS911,SEQ=27) \$ontext Test problem 9.2.2 in Handbook of Test Problems in Local and Global Optimization Test problem 9.1.1 on http://titan.princeton.edu/TestProblems/chapter9.html References: Floudas, C A, Pardalos, P M, Adjiman, C S, Esposito, W R, Gumus, Z H, Harding, S T, Klepeis, J L, Meyer, C A, and Schweiger, C A, Handbook of Test Problems in Local and Global Optimization. Kluwer Academic Publishers, 1999 Clark, P A, and Westerberg, A W, Bilevel Programming for Steady-State Chemical Process Design-i. Fundamentals and Algorithms. Comput. Chem. Eng. 14 (1990), 87-97. NOTE: The problem 9.1.1 on the web gives the solution y1=4, y2=2, and x=5. However, the KKT condition kt2.. 4*lb('2') - 2*lb('2') - 3*lb('3') =e= 0; seems to be incorrect. It does not match equation c1-c3. It but should be kt2.. 4*lb('1') - 2*lb('2') - 3*lb('3') =e= 0; Then, the model gives the solution y1=4, y2=6, and x=6 which is verified the EMP model below. We did NOT verify this by checking the original reference! Contributor: Alex Meeraus and Jan-H. Jagla, December 2009 \$offtext *Solution of problem 9.1.1 on the web scalar x_l / 6 / y1_l / 4 / y2_l / 6 / tol / 1e-6 /; variables z, y1, y2; positive variable x; equations ob, c1, c2, c3, c4, c5; ob.. - x - 3*y1 + 2*y2 =e= z; c1.. - 2*x + y1 + 4*y2 =l= 16; c2.. 8*x + 3*y1 - 2*y2 =l= 48; c3.. - 2*x + y1 - 3*y2 =l= -12; c4.. - y1 =l= 0; c5.. y1 =l= 4; model bilevel / all /; \$echo bilevel x max y1 * c1 c2 c3 c4 c5 > "%emp.info%" *Start from reported solution x.l = x_l ; y1.l = y1_l; y2.l = y2_l; solve bilevel using EMP minimizing z; abort\$( (abs( x.l - x_l) > tol) or (abs(y1.l - y1_l) > tol) or (abs(y2.l - y2_l) > tol) ) 'Deviated from reported solution';