From coin-trac at coin-or.org Sun Feb 5 12:46:16 2012 From: coin-trac at coin-or.org (Couenne, a solver for non-convex MINLP problems) Date: Sun, 05 Feb 2012 17:46:16 -0000 Subject: [Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #14: feasible model declared infeasible In-Reply-To: <054.11ceb4c4a1184eb4cd7e3d579281fd86@coin-or.org> References: <054.11ceb4c4a1184eb4cd7e3d579281fd86@coin-or.org> Message-ID: <069.ab7786dc700fb6dfa909f6c2d119601c@coin-or.org> #14: feasible model declared infeasible -------------------------+---------------------- Reporter: stefan | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: -------------------------+---------------------- Comment (by stefan): Hi, if I tweak the Couenne interface in a way that the problem printed by Couenne (before reformulation) looks like the one printed for your .nl file, then Couenne indeed finds the optimal solution. The important difference was in the formulation of quadratic terms. While through AMPL you get things like x*(1-y), you will get x-x*y through the GAMS interface. Even though equivalent, Couenne seems to behave differently. So what happens if you pass the following AMPL model to Couenne? {{{ var x2 := 1; var x3 >= 0; var x4 := 1, >= 0; var x5 := 1, <= 2; var x6 := 2, <= 2; var x7 := 1; var x8 >= 0, <= 2; var x9 := 1, >= 0, <= 2; var x10 := 2, >= 0, <= 2; var x11 := 1, >= 0; var x12 >= 0; var x13 >= 0; var x14 := 4, >= 0; var x15 := 2, >= 0; var x16 >= 0; var x17 >= 0; var x18 >= 0; var x19 >= 0; var x20 := 4, >= 0; minimize obj: 1 - 2*x2 + x2^2; subject to e2: - x2 + 3*x3 + x4 - x11 = -1; e3: - x2 + x3 + 3*x4 - x12 = 2; e4: - x2 + 3*x5 + x6 + x13 = 4; e5: - x2 + x5 + 3*x6 + x14 = 10; e6: - x2 + x3 + x4 + x5 + x6 + 10*x7 + x8 + x9 + x10 = 16; e7: - x2 + 3*x8 + x9 + x10 - x15 + x16 = 0; e8: - x2 + x8 + 3*x9 + x10 - x17 + x18 = 4; e9: - x2 + x8 + x9 + 3*x10 - x19 + x20 = 10; e10: x11*x3 = 0; e11: x12*x4 = 0; e12: x13*2 - x13*x5 = 0; e13: x14*2 - x14*x6 = 0; e14: x15*x8 = 0; e15: x16*2 - x16*x8 = 0; e16: x17*x9 = 0; e17: x18*2 - x18*x9 = 0; e18: x19*x10 = 0; e19: x20*2 - x20*x10 = 0; }}} I guess the problem is similar to the one reported in ticket #18. Stefan -- Ticket URL: Couenne, a solver for non-convex MINLP problems Couenne, a solver for non-convex MINLP problems From coin-trac at coin-or.org Sun Feb 5 23:36:01 2012 From: coin-trac at coin-or.org (Couenne, a solver for non-convex MINLP problems) Date: Mon, 06 Feb 2012 04:36:01 -0000 Subject: [Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #14: feasible model declared infeasible In-Reply-To: <054.11ceb4c4a1184eb4cd7e3d579281fd86@coin-or.org> References: <054.11ceb4c4a1184eb4cd7e3d579281fd86@coin-or.org> Message-ID: <069.e6ffee5e85332a3c797384e6021e95ea@coin-or.org> #14: feasible model declared infeasible -------------------------+---------------------- Reporter: stefan | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: -------------------------+---------------------- Comment (by pbelotti): Although x(1-y) = x-xy, they are reformulated differently and trigger different performances. I tried the model above and I get an optimal solution of 0 with x2=1. This is the output (with the latest stable/0.4): {{{ Couenne 0.4 -- an Open-Source solver for Mixed Integer Nonlinear Optimization Mailing list: couenne at list.coin-or.org Instructions: http://www.coin-or.org/Couenne NLP0012I Num Status Obj It time Location NLP0014I 1 OPT 05.5g 5 0g Loaded instance "../../repos/problems/test/ticket14a.nl" Constraints: 18 Variables: 19 (0 integer) Auxiliaries: 17 (0 integer) Coin0506I Presolve 6 (-23) rows, 3 (-33) columns and 13 (-75) elements Clp0006I 0 Obj 0.0001 Primal inf 0.017925389 (1) Dual inf 1.9999999 (1) Clp0006I 0 Obj 0.0001 Primal inf 0.017925389 (1) Dual inf 1e+10 (1) Clp0006I 3 Obj -0.01412367 Clp0000I Optimal - objective value -0.01412367 Clp0032I Optimal objective -0.01412366957 - 3 iterations time 0.002, Presolve 0.00 Clp0000I Optimal - objective value -0.01412367 Cbc0012I Integer solution of 0 found by Couenne Rounding NLP after 0 iterations and 0 nodes (0.00 seconds) NLP Heuristic: NLP0014I 2 OPT 05.5g 15 0g no solution. Clp0000I Optimal - objective value -0.01412367 Optimality Based BT: 6 improved bounds Cbc0031I 2 added rows had average density of 2 Cbc0013I At root node, 3 cuts changed objective from -0.01412367 to -1.4045259e-05 in 5 passes Cbc0014I Cut generator 0 (Couenne convexifier cuts) - 5 row cuts average 2.0 elements, 41 column cuts (44 active) Cbc0001I Search completed - best objective 0, took 5 iterations and 0 nodes (0.02 seconds) Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost couenne: Optimal "Finished" Linearization cuts added at root node: 29 Linearization cuts added in total: 29 (separation time: 0s) Total solving time: 0.02s (0.02s in branch-and- bound) Lower bound: 0 Upper bound: 0 (gap: 0.00%) Branch-and-bound nodes: 0 }}} Also, I don't think this has to do with ticket #18, where some strange branching behavior occurs because of the inability of Couenne to provide a lower bound. -- Ticket URL: Couenne, a solver for non-convex MINLP problems Couenne, a solver for non-convex MINLP problems From coin-trac at coin-or.org Sat Feb 18 12:15:42 2012 From: coin-trac at coin-or.org (Couenne, a solver for non-convex MINLP problems) Date: Sat, 18 Feb 2012 17:15:42 -0000 Subject: [Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #20: wrong dual bound reported when running with nonzero gap tolerance Message-ID: <054.25d4cedb1d43be5dac888227398ea136@coin-or.org> #20: wrong dual bound reported when running with nonzero gap tolerance ------------------------+---------------------- Reporter: stefan | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Keywords: | ------------------------+---------------------- Hi, when I run Couenne/stable/0.4 with {{{bonmin.allowable_fraction_gap 0.2}}}, it reports the best found solutions objective value as best bound (bb.bestBound()), i.e., having closed the gap, if stopped due to the gap limit: {{{ Coin0506I Presolve 105 (-1) rows, 60 (-21) columns and 295 (-31) elements Clp0006I 0 Obj 42 Primal inf 69.55171 (10) Clp0006I 51 Obj 45.02 Clp0000I Optimal - objective value 45.02 Clp0032I Optimal objective 45.02 - 51 iterations time 0.002, Presolve 0.00 Clp0000I Optimal - objective value 45.02 Clp0000I Optimal - objective value 45.02 Cbc0013I At root node, 0 cuts changed objective from 45.02 to 45.02 in 1 passes Cbc0014I Cut generator 0 (Couenne convexifier cuts) - 0 row cuts average 0.0 elements, 1 column cuts (1 active) Cbc0010I After 0 nodes, 0 on tree, 1e+50 best solution, best possible 45.02 (0.05 seconds) Cbc0004I Integer solution of 53.1 found after 907 iterations and 86 nodes (0.51 seconds) Cbc0011I Exiting as integer gap of 8.06 less than 0 or 20% Cbc0001I Search completed - best objective 53.1, took 920 iterations and 87 nodes (0.57 seconds) Cbc0035I Maximum depth 42, 0 variables fixed on reduced cost Couenne convexifier cuts was tried 157 times and created 2166 cuts of which 219 were active after adding rounds of cuts Couenne finished. Found feasible solution. Best solution: 5.310000e+01 (87 nodes, 0.674 seconds) Best possible: 5.310000e+01 }}} If I run with zero gap tolerance and interrupt with Ctrl+C, a correct dual bound is reported: {{{ Coin0506I Presolve 105 (-1) rows, 60 (-21) columns and 295 (-31) elements Clp0006I 0 Obj 42 Primal inf 69.55171 (10) Clp0006I 51 Obj 45.02 Clp0000I Optimal - objective value 45.02 Clp0032I Optimal objective 45.02 - 51 iterations time 0.002, Presolve 0.00 Clp0000I Optimal - objective value 45.02 Clp0000I Optimal - objective value 45.02 Cbc0013I At root node, 0 cuts changed objective from 45.02 to 45.02 in 1 passes Cbc0014I Cut generator 0 (Couenne convexifier cuts) - 0 row cuts average 0.0 elements, 1 column cuts (1 active) Cbc0010I After 0 nodes, 0 on tree, 1e+50 best solution, best possible 45.02 (0.05 seconds) Cbc0004I Integer solution of 53.1 found after 907 iterations and 86 nodes (0.50 seconds) Cbc0010I After 100 nodes, 43 on tree, 53.1 best solution, best possible 45.046667 (0.75 seconds) Cbc0010I After 200 nodes, 88 on tree, 53.1 best solution, best possible 45.06 (1.11 seconds) Cbc0010I After 300 nodes, 134 on tree, 53.1 best solution, best possible 45.06 (1.49 seconds) ^CCbc0003I Exiting on maximum nodes Cbc0005I Partial search - best objective 53.1 (best possible 45.06), took 4042 iterations and 323 nodes (1.55 seconds) Cbc0035I Maximum depth 42, 26 variables fixed on reduced cost Couenne convexifier cuts was tried 608 times and created 8466 cuts of which 1067 were active after adding rounds of cuts Node or iteration limit exceeded or user interrupt, we will report iteration limit in listing file. Couenne finished. Found feasible solution. Best solution: 5.310000e+01 (323 nodes, 1.714 seconds) Best possible: 4.506000e+01 }}} -- Ticket URL: Couenne, a solver for non-convex MINLP problems Couenne, a solver for non-convex MINLP problems From coin-trac at coin-or.org Tue Feb 21 13:20:18 2012 From: coin-trac at coin-or.org (Couenne, a solver for non-convex MINLP problems) Date: Tue, 21 Feb 2012 18:20:18 -0000 Subject: [Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #20: wrong dual bound reported when running with nonzero gap tolerance In-Reply-To: <054.25d4cedb1d43be5dac888227398ea136@coin-or.org> References: <054.25d4cedb1d43be5dac888227398ea136@coin-or.org> Message-ID: <069.7c9f4aa6e4e79d9e0ed776dc9fb7cf13@coin-or.org> #20: wrong dual bound reported when running with nonzero gap tolerance -------------------------+---------------------- Reporter: stefan | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: -------------------------+---------------------- Comment (by pbelotti): Given that this is not the normal output by Couenne, I assume you are not using the standalone version. Recently, a few changes have been introduced in the way feasible solutions are saved. Check Couenne/src/main/BonCouenne.cpp at line 347, where lower and upper bound are retrieved from a separate data structure. I tried the standalone Couenne version with the same option (with and without the prefix "bonmin.") and obtained different lower and upper bounds when the allowed gap is nonzero. -- Ticket URL: Couenne, a solver for non-convex MINLP problems Couenne, a solver for non-convex MINLP problems From coin-trac at coin-or.org Wed Feb 22 10:30:29 2012 From: coin-trac at coin-or.org (Couenne, a solver for non-convex MINLP problems) Date: Wed, 22 Feb 2012 15:30:29 -0000 Subject: [Couenne-tickets] [Couenne, a solver for non-convex MINLP problems] #20: wrong dual bound reported when running with nonzero gap tolerance In-Reply-To: <054.25d4cedb1d43be5dac888227398ea136@coin-or.org> References: <054.25d4cedb1d43be5dac888227398ea136@coin-or.org> Message-ID: <069.d9d91105fd3f105396797bd50cb1906b@coin-or.org> #20: wrong dual bound reported when running with nonzero gap tolerance -------------------------+---------------------- Reporter: stefan | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: -------------------------+---------------------- Comment (by stefan): Yes, let's say I use Couenne as a library. The problem is not the upper bound, but the lower bound. I used {{{bb.bestBound()}}} where bb is the Bonmin::Bab class that, but I see that you use {{{bb.model().getBestPossibleObjValue()}}}. This seems to make a difference due to some bug either in Bonmin, in Cbc, or both, but not in Couenne :-). I submitted a [https://projects.coin-or.org/Bonmin/ticket/50 new bug report for Bonmin] and will use a workaround with {{{bb.model().getBestPossibleObjValue()}}} in the meanwhile. Stefan -- Ticket URL: Couenne, a solver for non-convex MINLP problems Couenne, a solver for non-convex MINLP problems