From MAILER-DAEMON Tue Jul 12 08:35:38 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bMwuY-0004CL-6s for mharc-help-glpk@gnu.org; Tue, 12 Jul 2016 08:35:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMwuW-00049f-6z for help-glpk@gnu.org; Tue, 12 Jul 2016 08:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMwuT-0001cN-W3 for help-glpk@gnu.org; Tue, 12 Jul 2016 08:35:35 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMwuT-0001cI-Qt for help-glpk@gnu.org; Tue, 12 Jul 2016 08:35:33 -0400 Received: from [2a00:1370:8124:92:dd7c:1e8f:ce88:5f26] (port=51883) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1bMwuS-0000vh-4T for help-glpk@gnu.org; Tue, 12 Jul 2016 08:35:32 -0400 Message-ID: <1468326933.3413.0.camel@corvax> From: Andrew Makhorin To: help-glpk@gnu.org Date: Tue, 12 Jul 2016 15:35:33 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e Subject: [Help-glpk] [Fwd: Interface for exact solutions] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 12:35:37 -0000 -------- Forwarded Message -------- From: Nico Del Piano To: help-glpk@gnu.org Subject: Interface for exact solutions Date: Tue, 12 Jul 2016 08:44:39 -0300 Hi all, I'm using the exact simplex solver provided by glpk to compute exact solutions from a project written in Java (using the Java bindings java-libglpk) and I haven't found a way to retrieve those exact values: I'm getting double precision solutions. To overcome this, I defined a not-so-pretty interface to store these exact values (I provided two ways to do this, both for rational precision and fixed precision) here [1]. Basically, I just copied the `glp_smcp` structure and added some parameters to properly store the solutions in the desired precision. I also added two solvers `glp_exact_sol` (for rationals) and `glp_fixed_sol` (for user-defined precision). For example, if we use the `glp_fixed_sol` solver, we can specify in the structure the precision we want, and store there the solutions, in order to get those values later on. Obviously, this doesn't seem to be the best approach, so the purpose of this email is to discuss how to improve this interface, or, even better, how to add this feature in glpk. Furthermore, if you think this can be done in glpk and I'm just ignoring it, please let me know. Thanks, Nico. [1]: https://github.com/nicodelpiano/glpk/tree/fixed_precision From MAILER-DAEMON Tue Jul 12 17:36:10 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bN5Le-0003B5-M7 for mharc-help-glpk@gnu.org; Tue, 12 Jul 2016 17:36:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN5Lb-0003Ao-Vg for help-glpk@gnu.org; Tue, 12 Jul 2016 17:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bN5LZ-0001sl-EW for help-glpk@gnu.org; Tue, 12 Jul 2016 17:36:07 -0400 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:34614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN5LY-0001sf-UL for help-glpk@gnu.org; Tue, 12 Jul 2016 17:36:05 -0400 Received: by mail-lf0-x232.google.com with SMTP id h129so24233777lfh.1 for ; Tue, 12 Jul 2016 14:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=eBMxCkqd/th979ap5jmVwHpeMCeOz2djFx5gWKTqWoc=; b=vZQNKWyD0WkgKdeQC/1dh/iNP2D1CZN8EGwMlBvhYPF6MGM9MRRzZZfaQ8RnLvuWZk gDT8pcQB29XjOIkj5QViDDqQI4yrHGbjIkDQfdcuuclWGA4xbBBHpU6QGbLNzBqgDamw 1KOVdAdUpKN0QpPkPzi2Kwld8FyJzcIavGmk5e+IgyqufbDnzKQr9oliLOMe+uPp7FNL DtI7178dgfnpfkMBoqhHW50g1IDHtpR0NNLshe5yjU0MByCzLFegNjEE32NTHH0uFVqS FhuDjNtRA8ST8oh19D6Gs8jExbrGhlVQBEiZFp5qSz0Suo+I46sZVQvMInAgMW0POxwj 6bFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eBMxCkqd/th979ap5jmVwHpeMCeOz2djFx5gWKTqWoc=; b=Rwoy54hLwfMluO2uQuF2SfbRkxVA7bSksau3oalLCzXbFI08lV96AKivClE+nSDcRy nqBeymJ+3drv3cSkO2k1Tqb77seTmeBmLVvP3wvYFHu6xASkqQvM9hSI8qh17P8QbB9h PxK974SEoE0fHjC+WkJfboT2DZsBQmfqyI5xbqCmZttPo1uApL+Y06Dur0lvvOKVX6Jt MmaSd121QE91Mx0AyEPlGcNT0f10GrXJPOUkpuEMrgvHEY+Ya0J5CpTMnntWCO9ORENS t8nl0se+qslSXaqSYfHthMRmkIYysaTVdG/aQRIBOo1CJJGbPcqCs9pp1JD8kNcRUtK9 fYoQ== X-Gm-Message-State: ALyK8tLIyRhkYajz6r39Jpr+QiJEETHjnSRIGD9zC60fzCyPWJ1yDN5chnln35AaKqSDOuNx86U4Mx1sEn1e9A== X-Received: by 10.46.32.150 with SMTP id g22mr2403075lji.30.1468359363222; Tue, 12 Jul 2016 14:36:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.212.207 with HTTP; Tue, 12 Jul 2016 14:36:02 -0700 (PDT) From: Gopal Sundaram Date: Tue, 12 Jul 2016 14:36:02 -0700 Message-ID: To: help-glpk@gnu.org Content-Type: multipart/alternative; boundary=001a114309a83f5f7a0537770ef7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::232 Subject: [Help-glpk] How to get intermediate solution in the middle X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 21:36:09 -0000 --001a114309a83f5f7a0537770ef7 Content-Type: text/plain; charset=UTF-8 Hi- I am new to using GLPK and have a basic question. How do I get an intermediate results from GLPK solver? GLPK Integer Optimizer, v4.52 245 rows, 5780 columns, 74425 non-zeros 5780 integer variables, all of which are binary 219 rows, 5780 columns, 74425 non-zeros 5780 integer variables, all of which are binary Scaling... A: min|aij| = 1.000e+00 max|aij| = 4.800e+02 ratio = 4.800e+02 GM: min|aij| = 8.409e-01 max|aij| = 1.189e+00 ratio = 1.414e+00 EQ: min|aij| = 7.071e-01 max|aij| = 1.000e+00 ratio = 1.414e+00 2N: min|aij| = 4.688e-01 max|aij| = 1.000e+00 ratio = 2.133e+00 Constructing initial basis... Size of triangular part is 219 Solving LP relaxation... GLPK Simplex Optimizer, v4.52 219 rows, 5780 columns, 74425 non-zeros 0: obj = 0.000000000e+00 infeas = 1.987e+02 (0) * 215: obj = 2.076000000e+03 infeas = 2.922e-16 (0) * 359: obj = 1.692000000e+03 infeas = 3.642e-15 (0) OPTIMAL LP SOLUTION FOUND Integer optimization begins... + 359: mip = not found yet >= -inf (1; 0) + 18965: >>>>> 1.728000000e+03 >= 1.692000000e+03 2.1% (27; 0) + 35208: mip = 1.728000000e+03 >= 1.692000000e+03 2.1% (332; 5) + 65967: mip = 1.728000000e+03 >= 1.692000000e+03 2.1% (452; 10) + 73524: >>>>> 1.727000000e+03 >= 1.692000000e+03 2.0% (472; 11) Solution found by heuristic: 1695.5 +119791: mip = 1.695500000e+03 >= 1.692000000e+03 0.2% (90; 890) +214828: mip = 1.695500000e+03 >= 1.692000000e+03 0.2% (155; 940) +267053: mip = 1.695500000e+03 >= 1.692000000e+03 0.2% (184; 970) Solution found by heuristic: 1694.5 +310964: mip = 1.694500000e+03 >= 1.692000000e+03 0.1% (174; 1055) +355652: mip = 1.694500000e+03 >= 1.692000000e+03 0.1% (197; 1078) +407645: mip = 1.694500000e+03 >= 1.692000000e+03 0.1% (230; 1106) +461623: mip = 1.694500000e+03 >= 1.692000000e+03 0.1% (269; 1131) +508530: mip = 1.694500000e+03 >= 1.692000000e+03 0.1% (290; 1159) Time used: 60.0 secs. Memory used: 14.2 Mb. Solution found by heuristic: 1694 +558883: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (118; 1642) +614633: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (120; 1724) +668817: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (141; 1758) +714634: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (156; 1789) +766751: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (168; 1842) +817245: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (179; 1890) +863583: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (182; 1935) +903378: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (192; 1957) +950337: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (199; 1992) +1003705: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (197; 2060) +1051498: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (206; 2096) +1097592: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (215; 2138) Time used: 120.1 secs. Memory used: 14.7 Mb. +1146344: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (228; 2185) +1200995: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (217; 2273) +1252811: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (221; 2326) +1305695: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (214; 2404) +1355169: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (227; 2441) +1410459: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (230; 2508) +1462302: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (229; 2579) +1508966: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (229; 2630) +1557680: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (240; 2686) +1608641: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (254; 2736) +1654290: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (276; 2763) Time used: 180.2 secs. Memory used: 16.4 Mb. +1704351: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (282; 2812) +1758047: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (287; 2866) +1809837: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (294; 2914) +1859729: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (299; 2984) +1908448: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (305; 3029) +1961399: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (310; 3077) +2014725: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (316; 3134) +2063757: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (328; 3190) +2108863: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (333; 3247) +2157464: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (331; 3304) +2210431: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (347; 3351) +2259316: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (363; 3389) Time used: 240.2 secs. Memory used: 18.5 Mb. +2306956: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (362; 3454) +2360452: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (366; 3510) +2413187: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (378; 3563) +2463614: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (392; 3620) +2508314: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (400; 3665) +2555599: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (399; 3732) +2607963: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (407; 3790) +2659538: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (411; 3858) +2705092: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (418; 3907) +2758073: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (429; 3962) +2812762: mip = 1.694000000e+03 >= 1.692000000e+03 0.1% (426; 403 >From the logs, I assume that we are 0.1% away from optimal - but do not know how to get the intermediate solution. Thanks Gopal --001a114309a83f5f7a0537770ef7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi-

I am new to using GLPK and have a b= asic question.=C2=A0 How do I get an intermediate results from GLPK solver?= =C2=A0

GLPK Integer Optimizer, v4.52
245 rows, 5780 columns, 74425 non-zeros
5780 integer variables= , all of which are binary
219 rows, 5780 columns, 74425 non-zeros=
5780 integer variables, all of which are binary
Scalin= g...
=C2=A0A: min|aij| =3D =C2=A01.000e+00 =C2=A0max|aij| =3D =C2= =A04.800e+02 =C2=A0ratio =3D =C2=A04.800e+02
GM: min|aij| =3D =C2= =A08.409e-01 =C2=A0max|aij| =3D =C2=A01.189e+00 =C2=A0ratio =3D =C2=A01.414= e+00
EQ: min|aij| =3D =C2=A07.071e-01 =C2=A0max|aij| =3D =C2=A01.= 000e+00 =C2=A0ratio =3D =C2=A01.414e+00
2N: min|aij| =3D =C2=A04.= 688e-01 =C2=A0max|aij| =3D =C2=A01.000e+00 =C2=A0ratio =3D =C2=A02.133e+00<= /div>
Constructing initial basis...
Size of triangular part i= s 219
Solving LP relaxation...
GLPK Simplex Optimizer, = v4.52
219 rows, 5780 columns, 74425 non-zeros
=C2=A0 = =C2=A0 =C2=A0 0: obj =3D =C2=A0 0.000000000e+00 =C2=A0infeas =3D =C2=A01.98= 7e+02 (0)
* =C2=A0 215: obj =3D =C2=A0 2.076000000e+03 =C2=A0infe= as =3D =C2=A02.922e-16 (0)
* =C2=A0 359: obj =3D =C2=A0 1.6920000= 00e+03 =C2=A0infeas =3D =C2=A03.642e-15 (0)
OPTIMAL LP SOLUTION F= OUND
Integer optimization begins...
+ =C2=A0 359: mip = =3D =C2=A0 =C2=A0 not found yet >=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0-inf =C2=A0 =C2=A0 =C2=A0 =C2=A0(1; 0)
+ 18965: >= >>>> =C2=A0 1.728000000e+03 >=3D =C2=A0 1.692000000e+03 =C2= =A0 2.1% (27; 0)
+ 35208: mip =3D =C2=A0 1.728000000e+03 >=3D = =C2=A0 1.692000000e+03 =C2=A0 2.1% (332; 5)
+ 65967: mip =3D =C2= =A0 1.728000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 2.1% (452; 10)
+ 73524: >>>>> =C2=A0 1.727000000e+03 >=3D =C2=A0= 1.692000000e+03 =C2=A0 2.0% (472; 11)
Solution found by heuristi= c: 1695.5
+119791: mip =3D =C2=A0 1.695500000e+03 >=3D =C2=A0 = 1.692000000e+03 =C2=A0 0.2% (90; 890)
+214828: mip =3D =C2=A0 1.6= 95500000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.2% (155; 940)
+267053: mip =3D =C2=A0 1.695500000e+03 >=3D =C2=A0 1.692000000e+03 = =C2=A0 0.2% (184; 970)
Solution found by heuristic: 1694.5
<= div>+310964: mip =3D =C2=A0 1.694500000e+03 >=3D =C2=A0 1.692000000e+03 = =C2=A0 0.1% (174; 1055)
+355652: mip =3D =C2=A0 1.694500000e+03 &= gt;=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (197; 1078)
+407645: mi= p =3D =C2=A0 1.694500000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (23= 0; 1106)
+461623: mip =3D =C2=A0 1.694500000e+03 >=3D =C2=A0 1= .692000000e+03 =C2=A0 0.1% (269; 1131)
+508530: mip =3D =C2=A0 1.= 694500000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (290; 1159)
<= div>Time used: 60.0 secs.=C2=A0 Memory used: 14.2 Mb.
Solution fo= und by heuristic: 1694
+558883: mip =3D =C2=A0 1.694000000e+03 &g= t;=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (118; 1642)
+614633: mip= =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (120= ; 1724)
+668817: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.= 692000000e+03 =C2=A0 0.1% (141; 1758)
+714634: mip =3D =C2=A0 1.6= 94000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (156; 1789)
+766751: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 = =C2=A0 0.1% (168; 1842)
+817245: mip =3D =C2=A0 1.694000000e+03 &= gt;=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (179; 1890)
+863583: mi= p =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (18= 2; 1935)
+903378: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1= .692000000e+03 =C2=A0 0.1% (192; 1957)
+950337: mip =3D =C2=A0 1.= 694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (199; 1992)
<= div>+1003705: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03= =C2=A0 0.1% (197; 2060)
+1051498: mip =3D =C2=A0 1.694000000e+03= >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (206; 2096)
+1097592:= mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% = (215; 2138)
Time used: 120.1 secs.=C2=A0 Memory used: 14.7 Mb.
+1146344: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000= e+03 =C2=A0 0.1% (228; 2185)
+1200995: mip =3D =C2=A0 1.694000000= e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (217; 2273)
+1252= 811: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0= .1% (221; 2326)
+1305695: mip =3D =C2=A0 1.694000000e+03 >=3D = =C2=A0 1.692000000e+03 =C2=A0 0.1% (214; 2404)
+1355169: mip =3D = =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (227; 244= 1)
+1410459: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.6920= 00000e+03 =C2=A0 0.1% (230; 2508)
+1462302: mip =3D =C2=A0 1.6940= 00000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (229; 2579)
= +1508966: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2= =A0 0.1% (229; 2630)
+1557680: mip =3D =C2=A0 1.694000000e+03 >= ;=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (240; 2686)
+1608641: mip= =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (254= ; 2736)
+1654290: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1= .692000000e+03 =C2=A0 0.1% (276; 2763)
Time used: 180.2 secs.=C2= =A0 Memory used: 16.4 Mb.
+1704351: mip =3D =C2=A0 1.694000000e+0= 3 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (282; 2812)
+1758047= : mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1%= (287; 2866)
+1809837: mip =3D =C2=A0 1.694000000e+03 >=3D =C2= =A0 1.692000000e+03 =C2=A0 0.1% (294; 2914)
+1859729: mip =3D =C2= =A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (299; 2984)<= /div>
+1908448: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.6920000= 00e+03 =C2=A0 0.1% (305; 3029)
+1961399: mip =3D =C2=A0 1.6940000= 00e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (310; 3077)
+20= 14725: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0= 0.1% (316; 3134)
+2063757: mip =3D =C2=A0 1.694000000e+03 >= =3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (328; 3190)
+2108863: mip = =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (333;= 3247)
+2157464: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.= 692000000e+03 =C2=A0 0.1% (331; 3304)
+2210431: mip =3D =C2=A0 1.= 694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (347; 3351)
<= div>+2259316: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03= =C2=A0 0.1% (363; 3389)
Time used: 240.2 secs.=C2=A0 Memory used= : 18.5 Mb.
+2306956: mip =3D =C2=A0 1.694000000e+03 >=3D =C2= =A0 1.692000000e+03 =C2=A0 0.1% (362; 3454)
+2360452: mip =3D =C2= =A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (366; 3510)<= /div>
+2413187: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.6920000= 00e+03 =C2=A0 0.1% (378; 3563)
+2463614: mip =3D =C2=A0 1.6940000= 00e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (392; 3620)
+25= 08314: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0= 0.1% (400; 3665)
+2555599: mip =3D =C2=A0 1.694000000e+03 >= =3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (399; 3732)
+2607963: mip = =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (407;= 3790)
+2659538: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.= 692000000e+03 =C2=A0 0.1% (411; 3858)
+2705092: mip =3D =C2=A0 1.= 694000000e+03 >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (418; 3907)
<= div>+2758073: mip =3D =C2=A0 1.694000000e+03 >=3D =C2=A0 1.692000000e+03= =C2=A0 0.1% (429; 3962)
+2812762: mip =3D =C2=A0 1.694000000e+03= >=3D =C2=A0 1.692000000e+03 =C2=A0 0.1% (426; 403

<= /div>
From the logs, I assume that we are 0.1% away from optimal - but = do not know how to get the intermediate solution.

= Thanks
Gopal
--001a114309a83f5f7a0537770ef7-- From MAILER-DAEMON Wed Jul 13 01:30:03 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bNCkF-0000GR-Ql for mharc-help-glpk@gnu.org; Wed, 13 Jul 2016 01:30:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCkC-0000F0-Bz for help-glpk@gnu.org; Wed, 13 Jul 2016 01:30:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNCk7-0007FB-Aj for help-glpk@gnu.org; Wed, 13 Jul 2016 01:29:59 -0400 Received: from mout.gmx.net ([212.227.17.22]:50379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCk7-0007F4-0J for help-glpk@gnu.org; Wed, 13 Jul 2016 01:29:55 -0400 Received: from [109.91.48.91] by msvc-mesg-gmx012.server.lan (via HTTP); Wed, 13 Jul 2016 07:29:52 +0200 MIME-Version: 1.0 Message-ID: From: "Heinrich Schuchardt" To: "Gopal Sundaram" , help-glpk@gnu.org Content-Type: text/html; charset=UTF-8 Date: Wed, 13 Jul 2016 07:29:52 +0200 X-Provags-ID: V03:K0:4Y3s4ICiSCUK3XlorHBo006hZPqzIp2re9j62Qz+ZMi rtVu5EM02tUAFS25Rg/Kw4QBKjCKMbttnssv1m86kuutSaRN+7 4eXhxJm+vTd6F2nL7XK3t8qeK0GdMPiQgZnkdGIpaHvCyK0XS4 buJLEY6r+WISKEq/YAco6SSHi1E/XmeIsairBNKXBv7RQs7eR3 Iu4fYDaz4jlAH0DKsITEE0O9V+qCUJfYz7FF0C+8gAx9XTDYY0 pgQUnDCfKBabTB1WMC6q3fmEJGt8T5yXT7E0uhulSp4SUJw6DY aSRAzY= X-UI-Out-Filterresults: notjunk:1;V01:K0:mNPK7rx4Ou0=:o7TBuOKjL4p+2egXLGrmDp wMyDR6PxfULWZUgwGyZqnUuD6o4kQuQBGclR9eKgt6ghEEnjp5s/KbYaCIICy6yS5ScYjBiVD 3vl/t/YeyDZInel7NljowLleH7ivpEl9Y0rKjvR7h+RqHFahNw2sOM2O60OVq/GrHwwBRiv+A e82jv3lx5ahzJ2GqkJCyKr/+jgG4hBktNIieV+dFXBBa70BNFg02lH0U+Q6OcgGCjb/bbNkyz LBkf1JtaiIpLPJLwJNlc2Ni3PmcObBQb6uwdNjXykBGV6BaKqyXGjdf1Nrjb+AgHSDCYTBGpZ HZUec0qJl3BiPo04ZPXukRZ2MUxOdIweVaHr3MpOwSPC+klKxjnHxuuzBwckPuLWTJV+nDn5v nkrgl9YDGG6D3sPj2iX8JzpH4Xl5TG669aPHOZKmcqHyEMqO0dQNLB5mFSdm7ne0/A5d9BUZ1 rtvr6dLVCEj7WKH9bj3u/7HHFnIGfvIKMNefd8QFrsHfq4Xz4oy5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.22 Subject: Re: [Help-glpk] How to get intermediate solution in the middle X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 05:30:02 -0000
glpsol --help shows the parameters for a time and a gap limit.

cf. https://en.m.wikibooks.org/wiki/GLPK/Using_GLPSOL
Am 12.07.2016, 23:36, Gopal Sundaram <sundaramgp@gmail.com> schrieb:
Hi-

I am new to using GLPK and have a basic question.  How do I get an intermediate results from GLPK solver?  

GLPK Integer Optimizer, v4.52
245 rows, 5780 columns, 74425 non-zeros
5780 integer variables, all of which are binary
219 rows, 5780 columns, 74425 non-zeros
5780 integer variables, all of which are binary
Scaling...
 A: min|aij| =  1.000e+00  max|aij| =  4.800e+02  ratio =  4.800e+02
GM: min|aij| =  8.409e-01  max|aij| =  1.189e+00  ratio =  1.414e+00
EQ: min|aij| =  7.071e-01  max|aij| =  1.000e+00  ratio =  1.414e+00
2N: min|aij| =  4.688e-01  max|aij| =  1.000e+00  ratio =  2.133e+00
Constructing initial basis...
Size of triangular part is 219
Solving LP relaxation...
GLPK Simplex Optimizer, v4.52
219 rows, 5780 columns, 74425 non-zeros
      0: obj =   0.000000000e+00  infeas =  1.987e+02 (0)
*   215: obj =   2.076000000e+03  infeas =  2.922e-16 (0)
*   359: obj =   1.692000000e+03  infeas =  3.642e-15 (0)
OPTIMAL LP SOLUTION FOUND
Integer optimization begins...
+   359: mip =     not found yet >=              -inf        (1; 0)
+ 18965: >>>>>   1.728000000e+03 >=   1.692000000e+03   2.1% (27; 0)
+ 35208: mip =   1.728000000e+03 >=   1.692000000e+03   2.1% (332; 5)
+ 65967: mip =   1.728000000e+03 >=   1.692000000e+03   2.1% (452; 10)
+ 73524: >>>>>   1.727000000e+03 >=   1.692000000e+03   2.0% (472; 11)
Solution found by heuristic: 1695.5
+119791: mip =   1.695500000e+03 >=   1.692000000e+03   0.2% (90; 890)
+214828: mip =   1.695500000e+03 >=   1.692000000e+03   0.2% (155; 940)
+267053: mip =   1.695500000e+03 >=   1.692000000e+03   0.2% (184; 970)
Solution found by heuristic: 1694.5
+310964: mip =   1.694500000e+03 >=   1.692000000e+03   0.1% (174; 1055)
+355652: mip =   1.694500000e+03 >=   1.692000000e+03   0.1% (197; 1078)
+407645: mip =   1.694500000e+03 >=   1.692000000e+03   0.1% (230; 1106)
+461623: mip =   1.694500000e+03 >=   1.692000000e+03   0.1% (269; 1131)
+508530: mip =   1.694500000e+03 >=   1.692000000e+03   0.1% (290; 1159)
Time used: 60.0 secs.  Memory used: 14.2 Mb.
Solution found by heuristic: 1694
+558883: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (118; 1642)
+614633: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (120; 1724)
+668817: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (141; 1758)
+714634: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (156; 1789)
+766751: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (168; 1842)
+817245: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (179; 1890)
+863583: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (182; 1935)
+903378: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (192; 1957)
+950337: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (199; 1992)
+1003705: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (197; 2060)
+1051498: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (206; 2096)
+1097592: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (215; 2138)
Time used: 120.1 secs.  Memory used: 14.7 Mb.
+1146344: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (228; 2185)
+1200995: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (217; 2273)
+1252811: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (221; 2326)
+1305695: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (214; 2404)
+1355169: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (227; 2441)
+1410459: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (230; 2508)
+1462302: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (229; 2579)
+1508966: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (229; 2630)
+1557680: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (240; 2686)
+1608641: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (254; 2736)
+1654290: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (276; 2763)
Time used: 180.2 secs.  Memory used: 16.4 Mb.
+1704351: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (282; 2812)
+1758047: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (287; 2866)
+1809837: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (294; 2914)
+1859729: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (299; 2984)
+1908448: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (305; 3029)
+1961399: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (310; 3077)
+2014725: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (316; 3134)
+2063757: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (328; 3190)
+2108863: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (333; 3247)
+2157464: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (331; 3304)
+2210431: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (347; 3351)
+2259316: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (363; 3389)
Time used: 240.2 secs.  Memory used: 18.5 Mb.
+2306956: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (362; 3454)
+2360452: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (366; 3510)
+2413187: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (378; 3563)
+2463614: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (392; 3620)
+2508314: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (400; 3665)
+2555599: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (399; 3732)
+2607963: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (407; 3790)
+2659538: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (411; 3858)
+2705092: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (418; 3907)
+2758073: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (429; 3962)
+2812762: mip =   1.694000000e+03 >=   1.692000000e+03   0.1% (426; 403

From the logs, I assume that we are 0.1% away from optimal - but do not know how to get the intermediate solution.

Thanks
Gopal
_______________________________________________ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
From MAILER-DAEMON Wed Jul 13 16:19:30 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bNQd0-00012e-Ec for mharc-help-glpk@gnu.org; Wed, 13 Jul 2016 16:19:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNQcx-0000wD-M1 for help-glpk@gnu.org; Wed, 13 Jul 2016 16:19:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNQct-0001Wk-GV for help-glpk@gnu.org; Wed, 13 Jul 2016 16:19:26 -0400 Received: from mout.gmx.net ([212.227.15.19]:52965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNQct-0001Vo-1H; Wed, 13 Jul 2016 16:19:23 -0400 Received: from [192.168.123.45] ([109.91.48.91]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Ldq9D-1awaCS3KE7-00j1Ca; Wed, 13 Jul 2016 22:19:19 +0200 To: Nico Del Piano References: <1468326933.3413.0.camel@corvax> Cc: Andrew Makhorin , GLPK Help List From: Heinrich Schuchardt X-Enigmail-Draft-Status: N1110 Message-ID: Date: Wed, 13 Jul 2016 22:19:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:eWJRwJgVoy+6PLgKH6q6NaV+w6ED7lsrQ0P9WLhHgP4fsW+1d7R EnLE+sZREpRjY9NmWQQv1beRbO29ARBNT26o4FkgRCYJdNGa/67e8zyLbGr2bXGEn2rEtdV Gepfp5sgy/ZmHeVxA1mRyPop6iuIHDxdcE7VZJJeSO3yzWOVO0/C9gfvjk8pjd2ws+y+LUx YdXIm7l61CLO3fZGkZEgA== X-UI-Out-Filterresults: notjunk:1;V01:K0:eKLq3zeJUl4=:A/AKCFh4t0KUoUZ21lWP/A 7bx//5dOrBUiLMZJWq3IEehyzjOpws/9v2b+GQ+4Fx/YzdyNGOqtsBiAkIuY9mVyJ/v/yhfaT TGAFEKOYYCSF6wYY2DaKijyFwJLAIYAsrF0lboO477vQ0tBMvkn/WOeYCaVJVczO6WBLseiqi 2zvgMPYyUgx7H9FXbjr7u3MyplEAjnAU41aNEd0/AbyCdb1eVcDkrKvDRd8xDYRsE0hXo62t5 Ojo2yMhYIRhfZsWbFMGGEL3syuUxqNDrcSthJ47VFG8CeJSIcE1W/3K5zJPwkCq2uiwAUCJDa EjqSY2Sjui/BMoFcBtSlox2Hs/0s1qY74HOvmGh4lK4h1bR9WDVvCGdMyC45CHdYvXJcWZP5X sYRe/Zkc5ge6KJhow4qnudW0LFdhW0X5UAaNysv48Y387QMXamm82EFDduttM9WdgJZteCaAQ iLc+IQHmHAvuQzpACcICb9H3pB6nFO9g1l/GLu5q7RgXZWM0KXxuSnAFmo9nDUAVjz+Tzovr8 EcnVC8Sc0QinRWZ16xGEOSZfcV64nflNZsM/ZK15Ph1h6AefVxwk+5XhM5qyRRUHL5tMSvjXw D1So3Z36XnnFI/3GnHoObh7EdZ3TC++Oepp/PP+Npc73n22OAdQfZYqY6/wGs4yahzX/DJOGH p/OKqdok0xziyTIL0hSN891ku5wlIi9dCngiUcG9iFNTcKH72TXKRkaIy/u7gkhYdeMwzkgoF tOZk7Kvg57M54fyRUcnA+W+8nVavtiQJbh76Xs/rwfqv0ACTjYTFvca64NsJgAQ+vjZzeLTYB QV8iefd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 Subject: Re: [Help-glpk] [Fwd: Interface for exact solutions] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 20:19:29 -0000 Hello Nico, so your current changeset is in branch get_exact_values. https://github.com/nicodelpiano/glpk/commits/get_exact_values Thank you for your contribution. I have started reviewing the changes. Some parts of the code may have to be adjusted before Andrew can integrate them: Do we need three different scmp structures and three initalization routines? I suggest to add the additional parameters to the existing smcp structure. smcp->exact_size is only used in malloc statements. That is strange. Shouldn't the following code consider the value you have chosen for exact_size? You dereference parm for malloc. Afterwards you check if it is NULL. You should move the check to before malloc. Why do you malloc at all? You are calling mpz_get_str with str = NULL. So you request allocation of memory here. smcp is a parameter structure. You should not put results there. Why can't you use the glp_prob structure for transfering the results? Do we really need glp_exact_sol()? Can't the result transfer be integrated in the existing glp_exact() function? mpz_get_str should be called with a custom allocator using xmalloc and xfree. Use mp_set_memory_functions to set custome allocation function. This will make it easier to identify mermory leaks. When I checked out the branch it contained a superfluous file "prec". Best regards Heinrich Schuchardt On 07/12/2016 03:39 PM, Nico Del Piano wrote: > Hello Heinrich, > > thanks for your fast reply and sorry for the code, yes, it was a complete mess! > > I created a new cleaned branch, this is the specific commit > https://github.com/nicodelpiano/glpk/commit/da11fac3996d9ed1012f1c50e76971e20f2b343e > > I am using gmp, so I first configure the project with --with-gmp. > > Best regards, > > Nico. > > 2016-07-12 9:48 GMT-03:00 Heinrich Schuchardt : >> Hello Nico, >> >> your mail had to be forwarded manually because you're not subscribed to the GLPK Help list. >> >> In GitHub the history of the exactsolver branch is messed up. >> >> You have been committing all sorts of files which are not source like configure.log, •.o, ... >> >> I cannot find any meaningful commit messages. >> >> Please, create a clean branch. >> >> Best regards >> >> Heinrich Schuchardt >> >> http://www.xypron.de >> >> Am 12.07.16 um 14:35 schrieb Andrew Makhorin >> >>> -------- Forwarded Message -------- >>> From: Nico Del Piano >>> To: help-glpk@gnu.org >>> Subject: Interface for exact solutions >>> Date: Tue, 12 Jul 2016 08:44:39 -0300 >>> >>> Hi all, >>> >>> I'm using the exact simplex solver provided by glpk to compute exact >>> solutions from a project written in Java (using the Java bindings >>> java-libglpk) and I haven't found a way to retrieve those exact >>> values: I'm getting double precision solutions. >>> >>> To overcome this, I defined a not-so-pretty interface to store these >>> exact values (I provided two ways to do this, both for rational >>> precision and fixed precision) here [1]. Basically, I just copied the >>> `glp_smcp` structure and added some parameters to properly store the >>> solutions in the desired precision. I also added two solvers >>> `glp_exact_sol` (for rationals) and `glp_fixed_sol` (for user-defined >>> precision). For example, if we use the `glp_fixed_sol` solver, we can >>> specify in the structure the precision we want, and store there the >>> solutions, in order to get those values later on. >>> >>> Obviously, this doesn't seem to be the best approach, so the purpose >>> of this email is to discuss how to improve this interface, or, even >>> better, how to add this feature in glpk. Furthermore, if you think >>> this can be done in glpk and I'm just ignoring it, please let me know. >>> >>> Thanks, >>> >>> Nico. >>> >>> [1]: https://github.com/nicodelpiano/glpk/tree/fixed_precision >>> >>> >>> >>> >>> _______________________________________________ >>> Help-glpk mailing list >>> Help-glpk@gnu.org >>> https://lists.gnu.org/mailman/listinfo/help-glpk > From MAILER-DAEMON Thu Jul 14 10:50:11 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bNhxr-0008Ug-2S for mharc-help-glpk@gnu.org; Thu, 14 Jul 2016 10:50:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNhxp-0008Qc-I8 for help-glpk@gnu.org; Thu, 14 Jul 2016 10:50:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNhxn-0001at-Gu for help-glpk@gnu.org; Thu, 14 Jul 2016 10:50:08 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNhxn-0001Z0-EA for help-glpk@gnu.org; Thu, 14 Jul 2016 10:50:07 -0400 Received: from [2a00:1370:8124:92:ed59:8640:692e:4a15] (port=49947) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1bNhxl-0007JI-HI for help-glpk@gnu.org; Thu, 14 Jul 2016 10:50:05 -0400 Message-ID: <1468507806.5544.0.camel@corvax> From: Andrew Makhorin To: help-glpk@gnu.org Date: Thu, 14 Jul 2016 17:50:06 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e Subject: [Help-glpk] [Fwd: GMPL Enhancements Request] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 14:50:10 -0000 -------- Forwarded Message -------- From: Ankolekar, Suresh To: help-glpk@gnu.org Subject: GMPL Enhancements Request Date: Thu, 14 Jul 2016 12:51:11 +0000 Dear GLPK/GMPL team, Thank you for a very useful optimization kit. I would like to suggest following AMPL features as enhancements to GMPL: 1. Access to GNU Scientific Library (GSL) through load xxxgsl.dll; and function gsl_xxx_xxx; statements, and subsequent use of gsl_xxx_xxx() function in the expressions. 2. Extend the computable parameter feature by allowing subsequent assignment (:=) operation through a let statement (e.g. param x default 0; ... let x := x + 1;... and so on. 3. Allow if_then_else and let within a for {...} block. 4. Allow loop control statement, continue and break, for a better control of loop structure. Thanks and regards, Suresh [cid:image001.jpg@01CF9544.2D65E140] Suresh Ankolekar Emeritus Professor of e-Business Endepolsdomein 150, 6229 EP Maastricht T: +31433113762 ankolekar@msm.nl www.msm.nl From MAILER-DAEMON Sun Jul 17 16:55:00 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bOt5Y-0005zg-HV for mharc-help-glpk@gnu.org; Sun, 17 Jul 2016 16:55:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOt5U-0005xE-Sy for help-glpk@gnu.org; Sun, 17 Jul 2016 16:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOt5S-0006jA-5M for help-glpk@gnu.org; Sun, 17 Jul 2016 16:54:55 -0400 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:35486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOt5O-0006iP-Kl; Sun, 17 Jul 2016 16:54:50 -0400 Received: by mail-lf0-x235.google.com with SMTP id f93so119324130lfi.2; Sun, 17 Jul 2016 13:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=AEbgANqLS1U8sul4rEzDoeONaRjQ4SXDilDU34A67QU=; b=PFypuZC2KKWvZdosLMfD0qzgQK/5liS1lZtR07eaXZmHZPZ50SglECUA+ndxy9do8Q XrFx4+vpyr22FldprQEWlix5O1pdM5R02sYGaHBi6cawFRabXHnRqLkKzZm4GmQix2wd y8Jm1P/Ie7prK5Z0CBh/BFehlIEh/Xhenmhq3s+6oeSnHtYBnY9hs74zALoF34IyzCQA PU5zxC1EKGUgyHxWPX+/PNkVQ9KF8B9r05KhGPlvXVyNLwGnXgXQofBcQhz8d43tJmIY +C48XB4mgYeaYOwKgsDyEUjXx0WgG++YUwYV2drmJfkF3leUVC2yE15dNOn5tgjAfBUa 74dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AEbgANqLS1U8sul4rEzDoeONaRjQ4SXDilDU34A67QU=; b=KUtngxsbCIiAvzAgVohM4bZU/tml665GGjQ9k3v3Z0okcCcE1ma8WiLy3KfAbFi/IL 5J8Drvb/S2pUuazklw5TPZvBaihFzXCzaoywvaWANSaBnUZK/LoZzeH7jCkqJYgcGY5c +LatLoCaSwOdzjvl+0+Mud8JtCaZmoJ10nVk1kPiZRzrVjglzNLFN3F6eddkWney6z+X apWQIeabDzqIbmDQScjFcrpijUsdl8nrTICUtFfKnuqyg3GHWaOmCEHw9CdVoD8wHr5+ DAdAjBOQwHPQ/wLtAehbU4wA3IlzPpIAg/a4Tdf4uCZmu7Ere6DT1RDWmCY6tcjPg5r3 IsuQ== X-Gm-Message-State: ALyK8tKxVvSH5cz7H/JvDwYDUU0fX+SowEn0PcBeP/9hRKxs+T6+OYv0WrYkNV0mK8GVNLVRvfQXw5FqLt3YEw== X-Received: by 10.25.89.65 with SMTP id n62mr759307lfb.89.1468788889284; Sun, 17 Jul 2016 13:54:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.74.203 with HTTP; Sun, 17 Jul 2016 13:54:47 -0700 (PDT) In-Reply-To: References: <1468326933.3413.0.camel@corvax> From: Nico Del Piano Date: Sun, 17 Jul 2016 17:54:47 -0300 Message-ID: To: Heinrich Schuchardt Cc: Andrew Makhorin , GLPK Help List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 Subject: Re: [Help-glpk] [Fwd: Interface for exact solutions] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2016 20:54:58 -0000 Hi Heinrich, thanks a lot for the code review. > so your current changeset is in branch get_exact_values. > https://github.com/nicodelpiano/glpk/commits/get_exact_values Yes, I will be working there for this enhancement. > Do we need three different scmp structures and three initalization routin= es? No, of course. I just did it that way as I was trying to not break anything from the previous functionality. Now I have integrated them into the `glp_smcp` structure. > You should move the check to before malloc. Sure, I don't know why I did it before the NULL check. > Why do you malloc at all? You are calling mpz_get_str with str =3D NULL. You are right. I have changed that and works fine for the exact rational results. For the fixed precision case, if I do not malloc here https://github.com/nicodelpiano/glpk/commit/693d02b81fc2b7608cf1087cd3= 1bbeb56f6390ea#diff-152a5a13f47885a5d7b50b4ed1db48a8R309 then the statement https://github.com/nicodelpiano/glpk/commit/693d02b81fc2b7608cf1087cd31bbeb= 56f6390ea#diff-152a5a13f47885a5d7b50b4ed1db48a8R470 will not work. > Can't the result transfer be integrated in the existing glp_exact() funct= ion? Yes, definitely, I have put them into that function. > mpz_get_str should be called with a custom allocator using xmalloc and > xfree. Use mp_set_memory_functions to set custome allocation function. I tried to do this, but I couldn't make it work. I guess this customization should be done before any GMP allocation (when there are no active GMP objects) and that is why I am getting errors. Is it too bad to leave the default allocation instead? If you have any suggestions please let me know. > smcp->exact_size is only used in malloc statements. That is strange. > Shouldn't the following code consider the value you have chosen for > exact_size? I have changed the things a bit. I put three parameters in `glp_smcp` structure that I think are the ones we need: - num_states: this specifies the number of states of the solutions - precision: an integer that specifies the precision in bits - n_digits: number of decimal digits (this is used here https://github.com/nicodelpiano/glpk/commit/693d02b81fc2b7608cf1087cd31bbeb= 56f6390ea#diff-152a5a13f47885a5d7b50b4ed1db48a8R470 we can get rid of this parameter) Another thing I changed are the calls to `set_d_eps`: as I needed the exact results I put `mpq_set_d` when loading data, for example here https://github.com/nicodelpiano/glpk/commit/693d02b81fc2b7608cf1087cd31bbeb= 56f6390ea#diff-152a5a13f47885a5d7b50b4ed1db48a8R165 If GMP is not active we should put this between HAVE_GMP flag, am I right? Sorry for the excessive amount of links, if something is not clear enough, let me know. Thanks! Nico. 2016-07-13 17:19 GMT-03:00 Heinrich Schuchardt : > Hello Nico, > > so your current changeset is in branch get_exact_values. > https://github.com/nicodelpiano/glpk/commits/get_exact_values > > Thank you for your contribution. > > I have started reviewing the changes. Some parts of the code may have to > be adjusted before Andrew can integrate them: > > Do we need three different scmp structures and three initalization > routines? I suggest to add the additional parameters to the existing > smcp structure. > > smcp->exact_size is only used in malloc statements. That is strange. > Shouldn't the following code consider the value you have chosen for > exact_size? > > You dereference parm for malloc. Afterwards you check if it is NULL. > You should move the check to before malloc. > > Why do you malloc at all? You are calling mpz_get_str with str =3D NULL. > So you request allocation of memory here. > > smcp is a parameter structure. You should not put results there. > Why can't you use the glp_prob structure for transfering the results? > > Do we really need glp_exact_sol()? Can't the result transfer be > integrated in the existing glp_exact() function? > > mpz_get_str should be called with a custom allocator using xmalloc and > xfree. Use mp_set_memory_functions to set custome allocation function. > This will make it easier to identify mermory leaks. > > When I checked out the branch it contained a superfluous file "prec". > > Best regards > > Heinrich Schuchardt > > > On 07/12/2016 03:39 PM, Nico Del Piano wrote: >> Hello Heinrich, >> >> thanks for your fast reply and sorry for the code, yes, it was a complet= e mess! >> >> I created a new cleaned branch, this is the specific commit >> https://github.com/nicodelpiano/glpk/commit/da11fac3996d9ed1012f1c50e769= 71e20f2b343e >> >> I am using gmp, so I first configure the project with --with-gmp. >> >> Best regards, >> >> Nico. >> >> 2016-07-12 9:48 GMT-03:00 Heinrich Schuchardt : >>> Hello Nico, >>> >>> your mail had to be forwarded manually because you're not subscribed to= the GLPK Help list. >>> >>> In GitHub the history of the exactsolver branch is messed up. >>> >>> You have been committing all sorts of files which are not source like c= onfigure.log, =E2=80=A2.o, ... >>> >>> I cannot find any meaningful commit messages. >>> >>> Please, create a clean branch. >>> >>> Best regards >>> >>> Heinrich Schuchardt >>> >>> http://www.xypron.de >>> >>> Am 12.07.16 um 14:35 schrieb Andrew Makhorin >>> >>>> -------- Forwarded Message -------- >>>> From: Nico Del Piano >>>> To: help-glpk@gnu.org >>>> Subject: Interface for exact solutions >>>> Date: Tue, 12 Jul 2016 08:44:39 -0300 >>>> >>>> Hi all, >>>> >>>> I'm using the exact simplex solver provided by glpk to compute exact >>>> solutions from a project written in Java (using the Java bindings >>>> java-libglpk) and I haven't found a way to retrieve those exact >>>> values: I'm getting double precision solutions. >>>> >>>> To overcome this, I defined a not-so-pretty interface to store these >>>> exact values (I provided two ways to do this, both for rational >>>> precision and fixed precision) here [1]. Basically, I just copied the >>>> `glp_smcp` structure and added some parameters to properly store the >>>> solutions in the desired precision. I also added two solvers >>>> `glp_exact_sol` (for rationals) and `glp_fixed_sol` (for user-defined >>>> precision). For example, if we use the `glp_fixed_sol` solver, we can >>>> specify in the structure the precision we want, and store there the >>>> solutions, in order to get those values later on. >>>> >>>> Obviously, this doesn't seem to be the best approach, so the purpose >>>> of this email is to discuss how to improve this interface, or, even >>>> better, how to add this feature in glpk. Furthermore, if you think >>>> this can be done in glpk and I'm just ignoring it, please let me know. >>>> >>>> Thanks, >>>> >>>> Nico. >>>> >>>> [1]: https://github.com/nicodelpiano/glpk/tree/fixed_precision >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Help-glpk mailing list >>>> Help-glpk@gnu.org >>>> https://lists.gnu.org/mailman/listinfo/help-glpk >> From MAILER-DAEMON Sat Jul 23 10:04:08 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bQxXE-00069J-8l for mharc-help-glpk@gnu.org; Sat, 23 Jul 2016 10:04:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQxXB-00069C-V6 for help-glpk@gnu.org; Sat, 23 Jul 2016 10:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQxX9-0003oR-SG for help-glpk@gnu.org; Sat, 23 Jul 2016 10:04:04 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQxX9-0003oM-Oh for help-glpk@gnu.org; Sat, 23 Jul 2016 10:04:03 -0400 Received: from [2a00:1370:8124:92:f812:a90d:1fdf:35da] (port=52107) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1bQxX8-0004JS-23 for help-glpk@gnu.org; Sat, 23 Jul 2016 10:04:02 -0400 Message-ID: <1469282647.4397.0.camel@corvax> From: Andrew Makhorin To: help-glpk@gnu.org Date: Sat, 23 Jul 2016 17:04:07 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e Subject: [Help-glpk] [Fwd: Please help me] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2016 14:04:07 -0000 -------- Forwarded Message -------- From: Reza Salehi Reply-to: Reza Salehi To: help-glpk@gnu.org Subject: Please help me Date: Sat, 23 Jul 2016 13:44:59 +0000 (UTC) Dear GLPK builders, when I try to run my code which have the following line, I receive error: for{(m,i)in arcs, b in source,t in sink,(i,j) in arcs, k in source,l in sink: i in nodes diff source and j in nodes diff sink }: if Flow[i,j,k,l]=1 then Flow[m,i,b,t]=1 else Flow[m,i,b,t]=0; Please help me to correct it. Thanks a lot From MAILER-DAEMON Sun Jul 24 18:20:07 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bRRkl-0005Ta-Rj for mharc-help-glpk@gnu.org; Sun, 24 Jul 2016 18:20:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRRkj-0005SG-Pj for help-glpk@gnu.org; Sun, 24 Jul 2016 18:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRRkh-0002su-LZ for help-glpk@gnu.org; Sun, 24 Jul 2016 18:20:04 -0400 Received: from mout.gmx.net ([212.227.15.19]:59161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRRkc-0002rM-Rp; Sun, 24 Jul 2016 18:19:59 -0400 Received: from [192.168.123.51] ([109.91.48.91]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M8NWM-1b6BZo08NW-00vuCh; Mon, 25 Jul 2016 00:19:54 +0200 To: Andrew Makhorin , help-glpk@gnu.org, Reza Salehi References: <1469282647.4397.0.camel@corvax> From: Heinrich Schuchardt Message-ID: <9ceaa31c-dbb6-ab68-29c3-fe3c0950f887@gmx.de> Date: Mon, 25 Jul 2016 00:19:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <1469282647.4397.0.camel@corvax> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:5t51cy/D6Sy5PgQQlgU1wAYQfnO+R89U2r66sKZNV8WFTdS8McJ c1cTqpqyHIOC7ttynfyZmiT/tYFuuQUa/WxpADKnbfQJaUv1mwjjnS0fpGrWhjRNdAzGbpG GEv76t6ImwKrFhadVvgKX8FAFfd5LirXPU5+HFBlf8CfYSApDC3LqdcIPWBXOhg98xkOKNv tzqzlVANqnKtNyMhuhgfQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2//f/wb3bqw=:mBt1tlVWZqa41LnLRCfGLS k4QMnp8yLFkIz4o8b3WK27fIjbwa1Zyk/sHseLg1NJ52ukinjYzj/Cke5go19FLXm0gfNpqbv /PdUQj3xlLKIhiXMd0SVm0oD8BhRq7GYL+Mf+L3glOz9vwKdz4YdXwwkOedNYLvUnu/yiWLYf BMyBnT4nsdGYKBlaK+8m9QSNHZtc66iBI7ztuCVolOJtDa1XPLDdB6NtWke7RvVFdsDa6PJKb w+pX+EeawyyNI1ir+pEhzgta574lmXW2hloR1FK/NjJ+U+kwiGNH37T8KntCTXcaM8j4YnWZF 5aSOJegaMpeVCazIG9hBIa4k3l4II9Ctoxu1MG1nm374DmuoHLaG43qSy427rSe+XfTNMzRPI B2Gzr9GMFBCjAObpfDtPGaPVLhT0Adc0Ezi3PCPY6huGL44TfCXfFcsMywlJPEY4/PvCBm5y/ cxMdo3/qrHDb8AABBICD1A2DW1QR4OVSVVU1IUsXBEXOhp9GmeD5gvjAEpLGmz02WkLpjrGra +kNIJpH09Zm/JgN6THnevucBy3od9QEDKj0GIusACoCkoNaeE8fBbGBoUfE36+Q1tol984hzU WiGLoAhhUDQqsJin6nZZT5GpriGuOpbfG3KDwgb9Ub8ugsnd3H79O6JCOlDRSofbj1rQBq3e6 9wFUkvzEgF40oQI/KRedboirqspKpA0oEPAnBdk2SMWcnP7iOR/iGR6u8Oyy3Tpz0Iq05cr7J QGzaHPvkyiaP8QDxwdCaUgJMOdqJIlPbdqPAuuFZx2WtrPdkcpoJCrA3CL57TEXgeettlbM3p oTsc/hX X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 Subject: Re: [Help-glpk] [Fwd: Please help me] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 22:20:06 -0000 Dear Reza, the source of GLPK comes with documentation for the GMPL language in file doc/gmpl.doc. Please, read it carefully. There is also an examples directory. The source is available at http://ftp.gnu.org/gnu/glpk/glpk-4.60.tar.gz Best regards Heinrich Schuchardt On 07/23/2016 04:04 PM, Andrew Makhorin wrote: > -------- Forwarded Message -------- > To: help-glpk@gnu.org > Subject: Please help me > Date: Sat, 23 Jul 2016 13:44:59 +0000 (UTC) > > Dear GLPK builders, > when I try to run my code which have the following line, I receive > error: > > > for{(m,i)in arcs, b in source,t in sink,(i,j) in arcs, k in source,l in > sink: i in nodes diff source and j in nodes diff sink }: if > Flow[i,j,k,l]=1 then Flow[m,i,b,t]=1 else Flow[m,i,b,t]=0; > > > Please help me to correct it. > Thanks a lot From MAILER-DAEMON Mon Jul 25 04:42:00 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bRbSa-0001Tk-I4 for mharc-help-glpk@gnu.org; Mon, 25 Jul 2016 04:42:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRbSY-0001TA-4r for help-glpk@gnu.org; Mon, 25 Jul 2016 04:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRbSV-0008Qm-0u for help-glpk@gnu.org; Mon, 25 Jul 2016 04:41:58 -0400 Received: from out1.fundp.ac.be ([138.48.4.135]:36383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRbSU-0008Pw-Nv for help-glpk@gnu.org; Mon, 25 Jul 2016 04:41:54 -0400 Received: from sogo.srv.fundp.ac.be (sogo.srv.fundp.ac.be [138.48.4.171]) by out1.fundp.ac.be (8.13.1/8.13.1) with ESMTP id u6P8fVtX030180 for ; Mon, 25 Jul 2016 10:41:32 +0200 from: "Ebrahim Khalil ABBASI" X-Forward: 95.80.156.1 content-type: text/plain; charset="utf-8" date: Mon, 25 Jul 2016 10:41:31 +0200 MIME-Version: 1.0 to: help-glpk@gnu.org message-id: <2612-5795d080-5-8c670f0@258651650> User-Agent: SOGoMail 2.3.13 content-transfer-encoding: quoted-printable X-FUNDP-MailScanner-Information: Please contact the ISP for more information X-FUNDP-MailScanner: Found to be clean X-FUNDP-MailScanner-From: ebrahim.abbasi@unamur.be X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 138.48.4.135 Subject: [Help-glpk] glpk performance X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 08:41:59 -0000 Dear all, I used glpk (with JAVA API) to solve an integer linear problem with 265= 1 variable and 101 constraint. I got the average 240 ms execution time for this with the following sys= tem: Intel Pentium CPU G3240 3.10 GHz 4.00 GB RAM 64-bit Windows 8.1 I used the default setting of glpk. Is there any other tuning to improv= e this performance? Best From MAILER-DAEMON Mon Jul 25 14:12:54 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bRkN4-0005e5-Gv for mharc-help-glpk@gnu.org; Mon, 25 Jul 2016 14:12:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRkN2-0005dv-DQ for help-glpk@gnu.org; Mon, 25 Jul 2016 14:12:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRkMy-00052e-NK for help-glpk@gnu.org; Mon, 25 Jul 2016 14:12:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:50935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRkMy-00052Z-Cm for help-glpk@gnu.org; Mon, 25 Jul 2016 14:12:48 -0400 Received: from [192.168.123.30] ([109.91.48.91]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M70HF-1b4yHg41rR-00wn4b; Mon, 25 Jul 2016 20:12:46 +0200 To: Ebrahim Khalil ABBASI , help-glpk@gnu.org References: <2612-5795d080-5-8c670f0@258651650> From: Heinrich Schuchardt Message-ID: <6326a49c-3351-808b-1b4b-bc9956c44ae1@gmx.de> Date: Mon, 25 Jul 2016 20:12:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <2612-5795d080-5-8c670f0@258651650> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:4vVLmfDg53B+mZ3ygtfxv29nfTExvBW4dD6H7ipXMn9UL6EXVd7 lZ3MYXYPE2fCSJUv4ZY1N844ZatyX6I5ipmtmFj+iG8XliAM9VHXG18z7C4w7i9RLjX96Wj LDtcEfjCeYWB6HNUz9wqO3NPjRKSAn1+3aGiqC9tCPbAuypI06pn8xEvN9gO6ESlDg0GSTE CGxfdd4IukdU1vmNjuFwA== X-UI-Out-Filterresults: notjunk:1;V01:K0:JnXQxSNGMcw=:vUxAYH7kKLsQXTHmaFcl1W ZZvYiFrffQYYPuAAYeT0qeBJh/6VOho8xw3EdgNdxxwvdb896sb2dAbeokLXqb0MDa6T/0onU 3vd0WDtK/nlOUsJ6A5xzx2t9YrJOjqKxDe/g1kjErLhIKGib4OYIF18+3HYekdkk4qmmLm6Ux jq4MjmHC9uamxBdlI6OZwnmiwObCyltj7WMSevKC/A0jQfu/Y0rW+k7/zhu+VE/C0w+M/pMjd Cj5ZOcXrRYzjJiS7xj5HK73WDTCF9beLRAMtGao1dkeTzHpNxhmBhLviYyddmRzI+iXCcilqx efgoBDvLWH8NaNqzAPDPwyn7dg9kGTPeevU1YxNDyT6IOLzssAnsaZ+CLygPIx4Iqj3uyNErZ QQW4e4WM9PUiep5SKPsO6/7CYbfwuDaAfrTDWpReovrayxOAkWSv3Ep9kBPo10MSdFBgrVX2L vBpshmGfekZXuQmqPDLVWtWpeMDk46mTYMUOgzA0ki807bNJK7t8EEC6uZliU/XERhUfOnUWs 7Y5ghJzMCcjIX38byjeNDGYI6j26HHi0hzeBwIahCRnMQiV5gFqi4zdotUIAsekduy49dDXH5 VY9Ki++pSbZsRwTrCuUyV046tkyUa8Zo/YgJEv44RUELW6XtU21LiCGvxvvSK3DdCJMp/PixY xhN8lgtsdKVuLRI6pCR9wokfO+wz6BcVil/yAdW3Gg6WIAerRGWoHQLYG2xor2H6qhRqvKeTI Ha4ZBolKEIuOjuiYFpnY8GqEPn30pECBjvPZpUqDgI5rW5qmfAcoPEHSQ0jhAExGKPzuzX+jr DO4VIQK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 Subject: Re: [Help-glpk] glpk performance X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 18:12:53 -0000 Hello Ebrahim, please, read glpk-4.60/doc/glpk.pdf, chapter 2.10.5 glp_intopt - Control parameters. This chapter describes the parameters that you can set in the glp_iocp structure. Best regards Heinrich Schuchardt On 25.07.2016 10:41, Ebrahim Khalil ABBASI wrote: > Dear all, > > I used glpk (with JAVA API) to solve an integer linear problem with 2651 variable and 101 constraint. > > I got the average 240 ms execution time for this with the following system: > > Intel Pentium CPU G3240 3.10 GHz > 4.00 GB RAM > 64-bit Windows 8.1 > > > I used the default setting of glpk. Is there any other tuning to improve this performance? From MAILER-DAEMON Tue Jul 26 06:12:15 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bRzLT-0002Ot-TZ for mharc-help-glpk@gnu.org; Tue, 26 Jul 2016 06:12:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRzLS-0002Om-72 for help-glpk@gnu.org; Tue, 26 Jul 2016 06:12:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRzLN-0000rU-U9 for help-glpk@gnu.org; Tue, 26 Jul 2016 06:12:13 -0400 Received: from forward9p.cmail.yandex.net ([87.250.241.194]:54867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRzLM-0000qj-Im for help-glpk@gnu.org; Tue, 26 Jul 2016 06:12:09 -0400 Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [77.88.29.164]) by forward9p.cmail.yandex.net (Yandex) with ESMTP id C8CC42144E for ; Tue, 26 Jul 2016 13:11:55 +0300 (MSK) Received: from web24g.yandex.ru (web24g.yandex.ru [95.108.253.233]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mlUhJccuIb-BtM8Z1Ti; Tue, 26 Jul 2016 13:11:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1469527915; bh=iPYqZD9BKTzcGxzelag82uS2uIWM0HC5KpYx74d7zo4=; h=From:To:Subject:Message-Id:Date; b=Hgy0/VSu9GxOihPRTvynWhN+vLPMpu6MAtuubNCpY1Yrq4fDhIEcjBN2WCrdUZgN5 xJ+yRte5utEr4vGFMMWhCiUIAeMnPxiwHQKqh7p9+TC+pC0hS/U3PuBR+adSocBeRH yFJmqQk33DqyhObW7jtV7VCBst9YAU6jpWZQ/7+Q= Authentication-Results: mxback3g.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by web24g.yandex.ru with HTTP; Tue, 26 Jul 2016 13:11:55 +0300 From: Ponomarenko Andrey To: help-glpk@gnu.org MIME-Version: 1.0 Message-Id: <1555361469527915@web24g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 26 Jul 2016 13:11:55 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 87.250.241.194 Subject: [Help-glpk] API/ABI changes analysis X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 10:12:15 -0000 Hello, I've created an open-source tool for analysis of API/ABI changes in C libraries and tested it on the GLPK. The report is published and updated daily here: http://abi-laboratory.pro/tracker/timeline/glpk/ Thank you. From MAILER-DAEMON Wed Jul 27 15:12:41 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bSUG1-0002bo-2g for mharc-help-glpk@gnu.org; Wed, 27 Jul 2016 15:12:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSUFy-0002Zh-90 for help-glpk@gnu.org; Wed, 27 Jul 2016 15:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSUFt-0008P4-8a for help-glpk@gnu.org; Wed, 27 Jul 2016 15:12:37 -0400 Received: from mout.gmx.net ([212.227.15.19]:57095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSUFs-0008OY-UM for help-glpk@gnu.org; Wed, 27 Jul 2016 15:12:33 -0400 Received: from [192.168.123.51] ([109.91.48.91]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MbOoG-1blFak2ayy-00IiW8; Wed, 27 Jul 2016 21:12:30 +0200 To: Ponomarenko Andrey , help-glpk@gnu.org References: <1555361469527915@web24g.yandex.ru> From: Heinrich Schuchardt Message-ID: <4a033caf-8908-f8fd-0790-840ee2f1f7a1@gmx.de> Date: Wed, 27 Jul 2016 21:12:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <1555361469527915@web24g.yandex.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zdl2yzuzcn2l4SmcJgOHPX3RHD2oE5GqJMq4w40zRTK3sYgMONn sj0aqpA/HFduixYQAsXbzvn6xK2+8OUASQe9ZFfJeStqcd0HUdW2MdC03A7WVZ3xpbwZjBA KhLrRsa9Ynl5ZB5LJABJvL1Qnn65EsdLY5YOoJP7rv6dkvV49XQmohTSv49IWmOxzHK6yTf ghiAHY+mB9fQsA8DlYyVQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ae9gtlrhwSk=:EmDQZ+AEHKxJhVHix+H3ra 0QMEAiSgB28z5oQbQRAwC/y2X8SBfKKTwEHE8Q5o7MLtoHPNizDOu6k9ZbPtbFypTA/xV1mH7 jVgbYUMTc6Hx/fB3gblYm8QdCyW/1f7kCfN3JggAHqpXsLErNOm2fifB3OUaBwugp+Mw7WbNV YuR+lyg6BUFJ1L7+ImLOjHLfn3Uyj+TqhUu45lBvK7OcTwPqJAGAIBRjwwQ0TWN+aN2hqvBDk JrOxh7yVppISFb2Ts5BeP5nKyGLXo/C2gQ3RwwiL20e7xZRkLjvbmkrqb+jgC3Mg/vU0+UM5M GC3b/v5nfM/mySX9qAcbl4q2D+1CNcJpSHNMwNHPy1v8Fy91qA6mlL85Vni8otGE3sWtO0Fhp HkOAzGgO6yN89VFOHVvhgBHt0gOFp1lmZ8cxM2fW7fb+pKlpw7mu6nY1a5b1f7gLNGV1P+Zuh AHRGj8MGMyQJMjSpiseS/a0g96xe0LN6TRufL00zBUIkSC5poDJ1h2dUKrO7Bn9+IkVrjfn4K MsTMNbaes8ggpHDGoU9F09pR4DaXLAjFE1JpmPq4Lz7UQ7gow4VG6FptWKNZ1DgV+vsxCIonv tx1vyxN0Y9Du6rBjUoqmZj1U/4vjmbJ1MP39jIEkAfy961AVBxcMUFPpe0HLKTcMUcsfAVhyT 33bLvj/8c5khjAvdtNX7IewHm1k4ZMGcf1PuOgnL2TkteTWMU46SYVM54NiihStb8PL+3LRBs oxxpnctp4WmRdAVXH3zjwShp8OnfG9ZqALXLM+vLeJmZEVDlleWTMaWsG7N6cXc6Ir19CNDlk lVXjmFw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 Subject: Re: [Help-glpk] API/ABI changes analysis X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:12:39 -0000 Hello Andrew, looks like a very handy tool to me. The current version of GLPK is 4.60. You list unfortunately stops at 4.57. The source is available at http://ftp.gnu.org/gnu/glpk. Best regards On 07/26/2016 12:11 PM, Ponomarenko Andrey wrote: > Hello, > > I've created an open-source tool for analysis of API/ABI changes in C libraries and tested it on the GLPK. The report is published and updated daily here: http://abi-laboratory.pro/tracker/timeline/glpk/ > > Thank you. From MAILER-DAEMON Wed Jul 27 16:21:55 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bSVL1-0007sT-SH for mharc-help-glpk@gnu.org; Wed, 27 Jul 2016 16:21:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSVKz-0007qi-PT for help-glpk@gnu.org; Wed, 27 Jul 2016 16:21:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSVKx-0000l0-Ml for help-glpk@gnu.org; Wed, 27 Jul 2016 16:21:52 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSVKx-0000km-Fy for help-glpk@gnu.org; Wed, 27 Jul 2016 16:21:51 -0400 Received: by mail-wm0-x233.google.com with SMTP id i5so78598624wmg.0 for ; Wed, 27 Jul 2016 13:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=jPKl3QJ/Jd7vdlhXCvtyFeUY4MklnRk6xqmoz6PgzqQ=; b=lDoiaVXM0F62jpY0jVo1NvSElSLz5ErJn9DwInhu+QOa8d6ZMwma2HSKI2exqE2cE5 cfVdQbZ6D56R+QIh0Wn8UpyvDhg8GHQbFsRYtIJAP3E8HjAOYzPdSYhAIJ3loNRnzCFL B/9rjiOm9GAyHhWDhAVpvMQwjvX40fRgoXhLM9009saFtS/Hav1D4Uur8xu+yQkLKcvW k+xRpYB555/wR4MTvWrShGNq4rtLaEB8LIJAoMiSVAFEbeQt3HpVpHiA+VKXeihYm7vp fezstlw2Jv9l2Ua7Udz+zQCCazG3QVz3NDugIu/MOQPfGxyy8AQwdtXiFOqTVawGuSTJ go6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jPKl3QJ/Jd7vdlhXCvtyFeUY4MklnRk6xqmoz6PgzqQ=; b=Sd9UHCKUjFaASMLBNcWmgCiKamAiJou3hbBKE8752357pLgb7vxhgeOHm3/WN+/dTL hf5ehyPt1uSDMSJuZSoymdnfikreTAeTb6BpRw0hOr9RanoY1s258I9JaEGKEaWu4dRe uTFjwD2gTCRZdCCs9+N/mIL9opZAtqqABCoam24bEYDHJgYxIZchvg86fmwQjtyczjPz kmh5mMoODBUsnBoX2CDOl2gqGn9iiXGXwCD0OfCuvuch2OsY6tVgMiwvqph8D4dSVOQ7 aSXsB/ORUVWPpj82r8XRfWAcuBnAMxf/6jOpHURPHiWk8XyHzmdtw73rVneQ7eSXej4E AX3g== X-Gm-Message-State: ALyK8tJvKnvzHbYUlkr4+UNFQmhZT4nWwd2C7xwfFeWSh6/3B5sEXUOBS4RZyAg15tkfjIJOT38275LuFYZCZQ== X-Received: by 10.28.197.68 with SMTP id v65mr56885977wmf.2.1469650910248; Wed, 27 Jul 2016 13:21:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.68.215 with HTTP; Wed, 27 Jul 2016 13:21:49 -0700 (PDT) From: usa usa Date: Wed, 27 Jul 2016 16:21:49 -0400 Message-ID: To: Help Glpk Content-Type: multipart/alternative; boundary=94eb2c0d7c607302e20538a3c4e2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::233 Subject: [Help-glpk] MILP how to make constraints numbers as a decision variable X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:21:54 -0000 --94eb2c0d7c607302e20538a3c4e2 Content-Type: text/plain; charset=UTF-8 Hi, I am trying to build a MILP. I need to set the number of linear constraints in the model as a decision variable. For example: max 8* x1 + 6 * x2 - x3 s.t. constraint 1 : x1 + x2 <= 29 constraint 2 : x1 - x2 <= 5 constraint 3 : x2 + x3 <= 56 I would like to make the all three constraints as candidates such that 1. the objective maximized. 2. At least one constraint must be active 3. How many of candidate constraints are active depends on the objective optimization value. I know this may have exponential complexity because for 3 candidates, I can have 2^3 = 8 combinations of constraints. Are there some ways to out all candidate in the model and solve it for one run to get the optimal solution and let the model decide which candidates should be active / thanks David --94eb2c0d7c607302e20538a3c4e2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I am tryin= g to build a MILP.

I need to set the number of linear constra= ints in the model as a decision variable.

For example:
max 8* x1 + 6 * x2=C2=A0 - x3
s.t.
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 constraint 1 : x1 + x2 <=3D 29
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 constraint 2 : x1 - x2 <=3D 5
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 constraint 3 : x2 + x3 <=3D 56

I would like to make the all three constraints as candidates such = that

1. the objective maximized.
2. At least one constraint mus= t be active
3. How many of candidate constraints are active d= epends on the objective optimization value.

I know this m= ay have exponential complexity because for 3 candidates, I can have 2^3 =3D= 8 combinations of constraints.

Are there some ways to out all candidate in the model and solve it for one=20 run to get the optimal solution and let the model decide which=20 candidates should be active=C2=A0 /

thanks

<= div>David



--94eb2c0d7c607302e20538a3c4e2-- From MAILER-DAEMON Thu Jul 28 01:57:35 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bSeK7-0007sw-Mq for mharc-help-glpk@gnu.org; Thu, 28 Jul 2016 01:57:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSeK4-0007sn-R3 for help-glpk@gnu.org; Thu, 28 Jul 2016 01:57:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSeK0-0005ZM-N2 for help-glpk@gnu.org; Thu, 28 Jul 2016 01:57:31 -0400 Received: from mout.gmx.net ([212.227.17.22]:52779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSeK0-0005ZH-Ci for help-glpk@gnu.org; Thu, 28 Jul 2016 01:57:28 -0400 Received: from [192.168.123.30] ([109.91.48.91]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M4CB5-1bBFrS2I6N-00roYP; Thu, 28 Jul 2016 07:57:25 +0200 To: usa usa , Help Glpk References: From: Heinrich Schuchardt Message-ID: Date: Thu, 28 Jul 2016 07:57:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:qTOLRm+S+B19DZPpvCdD8DaxSz/qXbBPS+AzYvHXv+VMv0cF8vl P/Oif4zpVrDgtFmhsQj2b5uuS8VqIMsWnnRgMRXRImzlYrJs3PZMQhPjc0ZDrDi57QfmJIg BjT6GUUX53qXXN9250HgEEzuLBf3eD3IiVLa84TllY6jeJJyVNTw87Je0M8BOx0Bi4/Ufdj Bc105Ss1NziAKkI28DLNA== X-UI-Out-Filterresults: notjunk:1;V01:K0:fVIlfxjCqF4=:7dfM0pMJ//Xu35Qcth3nrq KU+SlgrVn8nYhXV9lBsU76rh6LC74WyZqAVjtiJB09Quil2t6aiWWm9NAg5osvwGh75cWqof/ /HGd5vuce0uEp7UxO4Xb9dtXFNFG+H6YFi6AEo4XwIlSxpVXWKkMBD3hkzw+dnC3GYyZkaiLm szaU3n3ysIzRiOwNREBaT5mhYVp8A1oXAGLW63VekmAEcoxrkrWpc0Lcm3mjuFy7SIsWXmqRd SyGIH9AwP+OTpZNrfIb9FoHYmHEazVwcgQVlkZWbg+0Y+YXaDKinUuF42CgTZPm28I/CNGa92 oG6w6ZeMibv/I9UGoxOE9PSQCd/KXndr45AJ6eah7GND3QRaHz4CXgJatYShhamoTxhGjfQ3O /i8E3hBOxWMOSB+5A377FIfxEFyos78grxAyaltNzkKX7TfRHgrHLFIHdTWQuVsa2Vvpr90cd zEJdqQD2DHonlvHuSEudmGODc4WwMKDiuKMzQOjFZDloz/YRTzcTX2/g0NksyCgU+Ssf8mFBe MoCP3lgYq56pbdF1hORD3wBhREGVwjYNB5NBoT6b4OAAaf5gjF3YhqU6UGutFqLUmyNXt0bfy JZlbiPDJS2TZ70hheTIEMxiAhgpT59QovAL7HOW9YnUMeyJytgJR7V8sFD/5dqSJzs/yfhUGv P8V9gUEigA/HsEG2+8tqt7HPWjBn1ZTf70BUaJr5hm+IocW7JqVyB0VneDC+3NicoN2QpEwr8 0aj7ZQ12Fo1T+AuiNy/yPDWTulQWwmiFI18hLzotYPWmQ4wkXNxLCWxFNoapx+BfXV23/5gzW zBUBmu4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.22 Subject: Re: [Help-glpk] MILP how to make constraints numbers as a decision variable X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 05:57:34 -0000 Hello David, have a look at the "Big M method". Take care to choose M as small as possible. Best regards Heinrich Schuchardt On 27.07.2016 22:21, usa usa wrote: > Hi, > > I am trying to build a MILP. > > I need to set the number of linear constraints in the model as a > decision variable. > > For example: > > max 8* x1 + 6 * x2 - x3 > s.t. > constraint 1 : x1 + x2 <= 29 > constraint 2 : x1 - x2 <= 5 > constraint 3 : x2 + x3 <= 56 > > I would like to make the all three constraints as candidates such that > > 1. the objective maximized. > 2. At least one constraint must be active > 3. How many of candidate constraints are active depends on the objective > optimization value. > > I know this may have exponential complexity because for 3 candidates, I > can have 2^3 = 8 combinations of constraints. > > Are there some ways to out all candidate in the model and solve it for > one run to get the optimal solution and let the model decide which > candidates should be active / > > thanks > > David > > > > > > _______________________________________________ > Help-glpk mailing list > Help-glpk@gnu.org > https://lists.gnu.org/mailman/listinfo/help-glpk > From MAILER-DAEMON Thu Jul 28 05:50:16 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bShxH-0003A6-T9 for mharc-help-glpk@gnu.org; Thu, 28 Jul 2016 05:50:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bShxF-00039c-4C for help-glpk@gnu.org; Thu, 28 Jul 2016 05:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bShxE-0003WR-3g for help-glpk@gnu.org; Thu, 28 Jul 2016 05:50:13 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bShxE-0003WN-0o for help-glpk@gnu.org; Thu, 28 Jul 2016 05:50:12 -0400 Received: from [2a00:1370:8124:92:f10e:8a7b:dfd1:31be] (port=42966) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1bShxD-0003uw-4Q for help-glpk@gnu.org; Thu, 28 Jul 2016 05:50:11 -0400 Message-ID: <1469699419.3610.1.camel@corvax> From: Andrew Makhorin To: help-glpk@gnu.org Date: Thu, 28 Jul 2016 12:50:19 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e Subject: [Help-glpk] [Fwd: Fleet assigment] X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 09:50:14 -0000 -------- Forwarded Message -------- From: Javier Diego Reply-to: Javier Diego To: help-glpk@gnu.org Subject: Fleet assigment Date: Thu, 28 Jul 2016 08:53:08 +0000 (UTC) Hello I am an old GLPK’s user, and I have a question about modelling, but not a question about GLPK itself. Sorry if this is not the forum for that. In a fleet assignment problem, I have two legs L1 and L2, and there are three vehicles (V1, V2 and V3) that can be assigned to L1 and L2. L1’s distance is d1 and L2’s distance is d2. If L1 and L2 are allocate to the same vehicle, I have to add 80 miles because an empty leg must be done. I have the following variables: L1_V1 is 1 if L1 is assigned to V1 L1_V2 is 1 if L1 is assigned to V2 L2_V1 is 1 if L2 is assigned to V1 L2_V2 is 1 if L2 is assigned to V2 X12 if L1 and L2 are assigned to the same vehicle I already have posted the following constraints L1 is assigned once: L1_V1 + L1_V2 <= 1 L2 is assigned once: L2_V1 + L2_V2 <= 1 If X12 is activated, then L1 and L2 are allocated to a vehicle: X12 <= L1_V1 + L1_V2 and X12 <= L2_V1 + L2_V2. Now I need to post a constraint about the distance travelled by every vehicle, without declarating new variables. I would be easy weather I created the variables X12_V1 (V1 allocates L1 and L2) and X12_V2 (V2 allocates L1 and L2). With these variables, the distances travelled by every vehicle are: Distance_V1 = d1 · L1-V1 + d2 · L2_V1 + 80 · X12_V1 Distance_V2 = d1 · L1-V2 + d2 · L2_V2 + 80 · X12_V2 Does anybody know how to model the distance for every individual vehicle without creating X12_V1 and X12_V2, and only with X12? Thanks a lot From MAILER-DAEMON Thu Jul 28 08:25:34 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bSkNa-0000WC-P4 for mharc-help-glpk@gnu.org; Thu, 28 Jul 2016 08:25:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSkNV-0000W6-LJ for help-glpk@gnu.org; Thu, 28 Jul 2016 08:25:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSkNP-00013J-N1 for help-glpk@gnu.org; Thu, 28 Jul 2016 08:25:28 -0400 Received: from forward3o.cmail.yandex.net ([37.9.109.247]:35216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSkNO-00012Q-Bi for help-glpk@gnu.org; Thu, 28 Jul 2016 08:25:23 -0400 Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [37.140.190.24]) by forward3o.cmail.yandex.net (Yandex) with ESMTP id 03B1520EA0; Thu, 28 Jul 2016 15:25:14 +0300 (MSK) Received: from web27o.yandex.ru (web27o.yandex.ru [95.108.205.127]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nBnxeNJhiN-PDHuJjJK; Thu, 28 Jul 2016 15:25:13 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1469708713; bh=tEdvo9S74jhvX3/ohy98P4FWR6pEDz8DQOaWVle/m0g=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=OPKngecwDbrcLfST1SqmAPPdmowTMG2PINoCLncEZa5cTC3X3GinXfsMLlFq0Y3Qq ppADppXnyISSB8NEi7m3XK6YYdyogA9XSmEnWCoYKBgks1rBMX7McYbR6irxnPWKIP 2fK0aULYmld3JPol0A+dH1OpHDlqB5b5LwOrb1WY= Authentication-Results: mxback10o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by web27o.yandex.ru with HTTP; Thu, 28 Jul 2016 15:25:13 +0300 From: Ponomarenko Andrey To: Heinrich Schuchardt , "help-glpk@gnu.org" In-Reply-To: <4a033caf-8908-f8fd-0790-840ee2f1f7a1@gmx.de> References: <1555361469527915@web24g.yandex.ru> <4a033caf-8908-f8fd-0790-840ee2f1f7a1@gmx.de> MIME-Version: 1.0 Message-Id: <963311469708713@web27o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 28 Jul 2016 15:25:13 +0300 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.9.109.247 Subject: Re: [Help-glpk] API/ABI changes analysis X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:25:33 -0000 Hello, The report is fixed. Latest versions have been added to the report: http:= //abi-laboratory.pro/tracker/timeline/glpk/ Thank you. 27.07.2016, 22:12, "Heinrich Schuchardt": > Hello Andrew, > > looks like a very handy tool to me. > > The current version of GLPK is 4.60. You list unfortunately stops at 4.= 57. > > The source is available at http://ftp.gnu.org/gnu/glpk. > > Best regards > > On 07/26/2016 12:11 PM, Ponomarenko Andrey wrote: >> =C2=A0Hello, >> >> =C2=A0I've created an open-source tool for analysis of API/ABI changes= in C libraries and tested it on the GLPK. The report is published and up= dated daily here: http://abi-laboratory.pro/tracker/timeline/glpk/ >> >> =C2=A0Thank you. From MAILER-DAEMON Fri Jul 29 06:40:50 2016 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bT5Dm-0005PH-9M for mharc-help-glpk@gnu.org; Fri, 29 Jul 2016 06:40:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT5Dj-0005Op-S6 for help-glpk@gnu.org; Fri, 29 Jul 2016 06:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT5Dh-0004xn-T1 for help-glpk@gnu.org; Fri, 29 Jul 2016 06:40:46 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:38747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT5Dh-0004xd-Lo for help-glpk@gnu.org; Fri, 29 Jul 2016 06:40:45 -0400 Received: by mail-wm0-x229.google.com with SMTP id o80so145884586wme.1 for ; Fri, 29 Jul 2016 03:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=2o08gii+uCGVW5tYiPEl76XSc3J1PBdZFL2nHnnNNsw=; b=ydwbYMZfvL5BWhN6spVzmDbdASEbI5YLw/SqPLztRkYBgalxHHneZ2SiIP5LtmfkH1 HBnpKAiee+45PzGpy9yPKKQmKn4ZRm+WDNS+mlNu0Wcym1bH74UHT6QUuMksf3pdlgc0 oS3vSrVslqplkYlR/Auo9RNslJUgfid0fdk0GIAJRH4+hNtYNA3sR8m69q5cgJxI9qpq nUY1o+XNfiGUvMa0CnoYuVzV+zjbg2J9aDaDOQeQLmpOx+vrq/YCm46Lmapg9Vj/xlRv CU8zuoby1fMa3J+vuLIKwEeGZY7EUegYX7wkEGdAP+D9BqxfZN+7VxuDlY7i9xm+wubR 8VqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2o08gii+uCGVW5tYiPEl76XSc3J1PBdZFL2nHnnNNsw=; b=GEtt8tQSnfVA9r++pqYw31spRpaAcomjcOL36wPWmsKCV5CWwpFdicYWEaAaNvjqVS Ytcqqkut++j1ujbnr8remqtv8EFE68e2B6TnosmYoJJ9WqWDI01KeO/iBm0ojMmmjN6g FZgNbUcxzlstopTmr7NxJdBzxs9InEvazbJwSi18IBo1deRjmWtdnMGYha1ECtVx4sK1 0aVwoaoLTTAjDqW3ZDunFvaUnQjeNu3+nNB7tyUqbVU4URTVYkmxb5Y1MNPhjoBqc1fk mB8zxPBeuA+u+rEWLMDuqGlJmucTi0/OwZTKQoJViRbE771qqjslxGBjRatpVJoyDGOp T7cA== X-Gm-Message-State: AEkoouvCIm8/LjIwblHSdKteNHpZusBIjU8c8EUnH/gkCm3Sitto+79A5L3NvlCXK8GmC7jc1cQDiXUoYPAbKA== X-Received: by 10.28.230.205 with SMTP id e74mr44712689wmi.42.1469788844614; Fri, 29 Jul 2016 03:40:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.44.67 with HTTP; Fri, 29 Jul 2016 03:40:44 -0700 (PDT) From: Giovanni Di Stasi Date: Fri, 29 Jul 2016 12:40:44 +0200 Message-ID: To: help-glpk@gnu.org Content-Type: multipart/alternative; boundary=001a11476ae6fa70d70538c3e1a2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::229 Subject: [Help-glpk] piecewise functions in glpk X-BeenThere: help-glpk@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Users list for GLPK \(GNU Linear Programming Kit\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 10:40:49 -0000 --001a11476ae6fa70d70538c3e1a2 Content-Type: text/plain; charset=UTF-8 Hi everyone, I was trying to solve a problem where I have the constraints that are sums of piecewise functions. Such functions are not 0 in the origin, so I was wondering how can I specify them. I've read that there is a notation to specify where the function is zero, but it is not very clear to me how to correctly write that. If you start, for instance, with this example, taken from the docs: <> Trans[i,j] how can you specify where the function assumes zero as value? Moreover, what if the function assumes 0 in more points? Thanks a lot, Giovanni --001a11476ae6fa70d70538c3e1a2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi everyone,

I was t= rying to solve a problem where I have the constraints that are sums of piec= ewise functions. Such functions are not 0 in the origin, so I was wondering= how can I specify them.=C2=A0

I've read that there is a notation t= o specify where the function is zero, but it is not very clear to me how to= correctly write that.

If you start, for instance, with this example, t= aken from the docs:=C2=A0

<<limit1[i,j], limit2[i,j]; rate1[i,j],= rate2[i,j], rate3[i,j]>> Trans[i,j]

how can you specify wher= e the function assumes zero as value? Moreover, what if the function assume= s 0 in more points?

Thanks a lot,
= Giovanni

--001a11476ae6fa70d70538c3e1a2--