[Fwd: For help]
Forwarded Message Date: Fri, 12 Aug 2022 11:18:40 +0800 Subject: For help To: help-glpk@gnu.org From: travelor <1085886...@qq.com> > Hello, I'm having some trouble, could you tell me some parameter > for GLPK to optimizing many Linear problem? > I understarded many usage, such as ‘mipgap’and’ tmlim’. I want to know > If there are any other parameters to optimizing problem? > Regardless of the outcome, thank you very much. Looking forward to you > reply. >
Re: [Fwd: installation help]
On 7/15/20 11:06 PM, Andrew Makhorin wrote: > Forwarded Message > From: "Pandey, Sanjit" > To: help-glpk@gnu.org > Subject: installation help > Date: Wed, 15 Jul 2020 20:45:19 + > >> Hi, >> >> I keep getting following error when I try to install glpk for java. >> Any idea what is going on ? >> >> src/c/glpk_wrap.c:14977: error: ‘arg1’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:14977: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:14983: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI_LPXKKT_1cs_1quality_1set’: >> src/c/glpk_wrap.c:14991: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:14991: error: ‘arg1’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:14991: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:14997: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI_LPXKKT_1cs_1quality_1get’: >> src/c/glpk_wrap.c:15005: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:15005: error: ‘arg1’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:15005: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:15011: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI_new_1LPXKKT’: >> src/c/glpk_wrap.c:15020: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:15020: error: ‘result’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:15035: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:15043: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI_delete_1LPXKKT’: >> src/c/glpk_wrap.c:15049: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:15049: error: ‘arg1’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:15049: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:15053: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1create_1prob’: >> src/c/glpk_wrap.c:15093: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1prob_1name’: >> src/c/glpk_wrap.c:15697: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1obj_1name’: >> src/c/glpk_wrap.c:15730: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1row_1name’: >> src/c/glpk_wrap.c:15864: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1col_1name’: Dear Sanjit, symbol lpx_get_col_name() exists in GLPK 4.40 but not in GLPK 4.65. So it seems that besides GLPK 4.65 an old version of GLPK is installed. And you tried to wrap the glpk.h from that old version. Maybe you installed a GLPK version that came with your operating system distribution. Please, uninstall all old versions of GLPK and retry. If you need further assistance, please, provide * operating system * installation paths * full log including your input Best regards Heinrich >> src/c/glpk_wrap.c:15899: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1check_1kkt’: >> src/c/glpk_wrap.c:17213: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:17213: error: ‘arg3’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:17213: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:17221: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1check_1int’: >> src/c/glpk_wrap.c:18172: error: ‘LPXKKT’ undeclared (first use in >> this function) >> src/c/glpk_wrap.c:18172: error: ‘arg2’ undeclared (first use in this >> function) >> src/c/glpk_wrap.c:18172: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c:18179: error: expected expression before ‘)’ token >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1mps’: >> src/c/glpk_wrap.c:18390: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1freemps’: >> src/c/glpk_wrap.c:18547: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1cpxlp’: >> src/c/glpk_wrap.c:18624: warning: cast to pointer from integer of >> different size >> src/c/glpk_wrap.c: In function >> ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1model’: >>
[Fwd: installation help]
Forwarded Message From: "Pandey, Sanjit" To: help-glpk@gnu.org Subject: installation help Date: Wed, 15 Jul 2020 20:45:19 + > Hi, > > I keep getting following error when I try to install glpk for java. > Any idea what is going on ? > > src/c/glpk_wrap.c:14977: error: ‘arg1’ undeclared (first use in this > function) > src/c/glpk_wrap.c:14977: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:14983: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI_LPXKKT_1cs_1quality_1set’: > src/c/glpk_wrap.c:14991: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:14991: error: ‘arg1’ undeclared (first use in this > function) > src/c/glpk_wrap.c:14991: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:14997: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI_LPXKKT_1cs_1quality_1get’: > src/c/glpk_wrap.c:15005: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:15005: error: ‘arg1’ undeclared (first use in this > function) > src/c/glpk_wrap.c:15005: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:15011: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI_new_1LPXKKT’: > src/c/glpk_wrap.c:15020: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:15020: error: ‘result’ undeclared (first use in > this function) > src/c/glpk_wrap.c:15035: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:15043: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI_delete_1LPXKKT’: > src/c/glpk_wrap.c:15049: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:15049: error: ‘arg1’ undeclared (first use in this > function) > src/c/glpk_wrap.c:15049: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:15053: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1create_1prob’: > src/c/glpk_wrap.c:15093: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1prob_1name’: > src/c/glpk_wrap.c:15697: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1obj_1name’: > src/c/glpk_wrap.c:15730: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1row_1name’: > src/c/glpk_wrap.c:15864: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1get_1col_1name’: > src/c/glpk_wrap.c:15899: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1check_1kkt’: > src/c/glpk_wrap.c:17213: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:17213: error: ‘arg3’ undeclared (first use in this > function) > src/c/glpk_wrap.c:17213: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:17221: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1check_1int’: > src/c/glpk_wrap.c:18172: error: ‘LPXKKT’ undeclared (first use in > this function) > src/c/glpk_wrap.c:18172: error: ‘arg2’ undeclared (first use in this > function) > src/c/glpk_wrap.c:18172: error: expected expression before ‘)’ token > src/c/glpk_wrap.c:18179: error: expected expression before ‘)’ token > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1mps’: > src/c/glpk_wrap.c:18390: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1freemps’: > src/c/glpk_wrap.c:18547: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1cpxlp’: > src/c/glpk_wrap.c:18624: warning: cast to pointer from integer of > different size > src/c/glpk_wrap.c: In function > ‘Java_org_gnu_glpk_GLPKJNI__1glp_1lpx_1read_1model’: > src/c/glpk_wrap.c:18713: warning: cast to pointer from integer of > different size > make[2]: *** [all] Error 1 > make[2]: Leaving directory `/storage2/APPS/MOST/libglpk-java- > 1.12.0/swig' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/storage2/APPS/MOST/libglpk-java-1.12.0' > make: *** [all] Error 2 > > > > I have following dependencies installed: > > glpsol --version > GLPSOL: GLPK LP/MIP Solver, v4.65 > Copyright (C) 2000-2017 Andrew Makhorin, Department for Applied > Informatics, Moscow Aviation Institute, Moscow, Russia. All rights > reserved. E-mail: . > > This program has ABSOLUTELY NO WARRANTY. > > This
Re: [Fwd: Need help in Fixing GUSEK Code]
On Fri, 10 Apr 2020, Andrew Makhorin wrote: Forwarded Message From: sahani rathnasiri To: help-glpk@gnu.org Subject: Need help in Fixing GUSEK Code Date: Fri, 10 Apr 2020 19:08:39 +1000 ... I am running code in GUSEK and I need to define three indexes. I am getting a syntax error. Please help me fix this. My constraint; subject to order_quantity_constraint_min {i in I, j in J, n in N: i <= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n]; The result I receive in NEOS; amplin, line 50 (offset 2865): syntax error context: subject to order_quantity_constraint_min {i in I, j in J, n in N: i <= >>> t, <<< j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n]; Presumably the offending t is supposed to be j or n. -- Michael henne...@web.cs.ndsu.nodak.edu "Sorry but your password must contain an uppercase letter, a number, a haiku, a gang sign, a heiroglyph, and the blood of a virgin." -- someeecards
Re: [Fwd: Need help in Fixing GUSEK Code]
On 4/10/20 11:57 AM, Andrew Makhorin wrote: > Forwarded Message > From: sahani rathnasiri > To: help-glpk@gnu.org > Subject: Need help in Fixing GUSEK Code > Date: Fri, 10 Apr 2020 19:08:39 +1000 > >> Hi All, >> >> I am running code in GUSEK and I need to define three indexes. I am >> getting a syntax error. Please help me fix this. >> My constraint; >> subject to order_quantity_constraint_min {i in I, j in J, n in N: i >> <= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n]; >> >> The result I receive in NEOS; >> >> amplin, line 50 (offset 2865): >> syntax error >> context: subject to order_quantity_constraint_min {i in I, j in J, n >> in N: i <= >>> t, <<< j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= >> a[i,n]; Dear Sahani, the output points you to where the problem is: "t,". Probably you mean i <= t and j <> 2 and n <= r Best regards Heinrich >> Executing AMPL. >> >> If anyone can help me, really appreciate your help in this regard. >> >> Thank You, >> >> Best Regards, >> >> Sahani
[Fwd: Need help in Fixing GUSEK Code]
Forwarded Message From: sahani rathnasiri To: help-glpk@gnu.org Subject: Need help in Fixing GUSEK Code Date: Fri, 10 Apr 2020 19:08:39 +1000 > Hi All, > > I am running code in GUSEK and I need to define three indexes. I am > getting a syntax error. Please help me fix this. > My constraint; > subject to order_quantity_constraint_min {i in I, j in J, n in N: i > <= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n]; > > The result I receive in NEOS; > > amplin, line 50 (offset 2865): > syntax error > context: subject to order_quantity_constraint_min {i in I, j in J, n > in N: i <= >>> t, <<< j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= > a[i,n]; > Executing AMPL. > > If anyone can help me, really appreciate your help in this regard. > > Thank You, > > Best Regards, > > Sahani > >
Re: [Help-glpk] [Fwd: Download help]
Hello Christian, see https://en.m.wikibooks.org/wiki/GLPK Best regards Heinrich Schuchardt http://www.xypron.de Am 15.02.17 um 17:49 schrieb Andrew Makhorin > Forwarded Message > From: Christian Samatis> To: help-glpk@gnu.org > Subject: Download help > Date: Wed, 15 Feb 2017 09:00:38 -0500 > > Hello, > > > I am completely new to programming and I am trying to download GLPK to > my computer via the link http://ftp.gnu.org/gnu/glpk/ However, I am not > sure how to accomplish this. When I click on the link it opens an Index > with a ton of files. Which file(s) am I supposed to open/and or save to > my computer? How do I gain access to GLPK? > > > Thanks for all the help, > Christian Samatis > > > > ___ > Help-glpk mailing list > Help-glpk@gnu.org > https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Please help me]
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 + (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 ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: Need help in reading .csv file]
Forwarded Message From: Kaveti NaveenkumarTo: help-glpk@gnu.org Subject: Need help in reading .csv file Date: Tue, 12 Apr 2016 15:33:49 +0530 Hi, I am using Gusek in Mac (via WINE). While I am trying to read .csv files its throwing an error "invalid field name" but when I am running transp_csv.mod file its reading .csv files from provided examples. I am not sure why this is happening. I would be grateful if someone help me to sort it out. Thank you. -- Regards, Naveen ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: need help about gusek]
Forwarded Message From: 郑志鹏 304758...@qq.com To: Makhorin m...@gnu.org Subject: need help about gusek Date: Thu, 3 Apr 2014 17:38:17 +0800 Hello,Andrew: My name is Zheng Zhipeng,I am a student from China,these days I am using the GUSEk program. There are some problems I don't know to handle.First,when I use the CSV file to store the data,I defined the sets and parameters,but when I run GUSEK,it told me that :duplicate tuple (4023,20,4136,4022,9715) detected.in fact ,there is only one (4023,20,4136,4022,9715) in the CSV file ,so I have to delete it ,it can run successfully,but sometimes I need this data . Second ,if I want to solve the least-absolute-deviation problem using gusek,how should I convert the objective function.My objective function is following: sum{a in A,c in C}|(sum{i in I,j in J} pl[i,j,a,c]*d[i,j]-col[a,c])| +sum{a in A,b in B,c in C}|(sum{i in I,j in J} pls[i,j,a,b,c]*d[i,j]-cot[a,b,c])| +sum{i in I,j in J}|(d[i,j]-dt[i,j])|. There is an attachment which is my GUSEK code ,if you can help me check the error I mentioned previous,it will be a great help for me.Thank you very much! Your Sincerely static_odme_coded_by_GLPK.rar Description: Binary data ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: need help about gusek]
Dear Zheng, your mail had to be forwarded manually be cause you are not registered for the GLPK help list. See https://lists.gnu.org/mailman/listinfo/help-glpk With statement table tab_movementproportion IN CSV movement_proportion_back.csv: Q-[origin_zone,destination_zone,from_node,intermeadi_node,to_node],pls~movement_proportion; the following records are read: 4023,20,4136,4022,9715,0 4023,20,4136,4022,9715,1 Both contain identical field values (4023,20,4136,4022,9715) for set Q and hence would create duplicates in Q. Best regards Heinrich Schuchardt http://www.xypron.de Heinrich Schuchardt http://www.xypron.de Forwarded Message Subject: need help about gusek Date: Thu, 3 Apr 2014 17:38:17 +0800 Hello,Andrew: My name is Zheng Zhipeng,I am a student from China,these days I am using the GUSEk program. There are some problems I don't know to handle.First,when I use the CSV file to store the data,I defined the sets and parameters,but when I run GUSEK,it told me that :duplicate tuple (4023,20,4136,4022,9715) detected.in fact ,there is only one (4023,20,4136,4022,9715) in the CSV file ,so I have to delete it ,it can run successfully,but sometimes I need this data . Second ,if I want to solve the least-absolute-deviation problem using gusek,how should I convert the objective function.My objective function is following: sum{a in A,c in C}|(sum{i in I,j in J} pl[i,j,a,c]*d[i,j]-col[a,c])| +sum{a in A,b in B,c in C}|(sum{i in I,j in J} pls[i,j,a,b,c]*d[i,j]-cot[a,b,c])| +sum{i in I,j in J}|(d[i,j]-dt[i,j])|. There is an attachment which is my GUSEK code ,if you can help me check the error I mentioned previous,it will be a great help for me.Thank you very much! Your Sincerely ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: need help about gusek]
Second ,if I want to solve the least-absolute-deviation problem using gusek,how should I convert the objective function.My objective function is following: sum{a in A,c in C}|(sum{i in I,j in J} pl[i,j,a,c]*d[i,j]-col[a,c])| +sum{a in A,b in B,c in C}|(sum{i in I,j in J} pls[i,j,a,b,c]*d[i,j]-cot[a,b,c])| +sum{i in I,j in J}|(d[i,j]-dt[i,j])|. You may look at some examples included in the glpk distribution, namely, cf12a.mod, cf12b.mod, cflsq.mod, qfit.mod, xyacfs.mod, and yacfs.mod. ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: Newbie help request]
Forwarded Message From: Tóth Tamás tomika_nos...@freemail.hu To: help-glpk@gnu.org Subject: Newbie help request Date: Tue, 19 Nov 2013 18:07:17 +0100 Hi all, I'm totally new in linear programming and I have to solve a task-to-employee assignment problem. Almost everything is fine but I cannot make linear the travelling section of problem (I mean it should be summarized how much an employee should travel with summarizing the distance between tasks following each other). In the objective expression you can see as I try to filter by calculated assignment for both tasks (searching for pairs that follows each other) but I got multiplications of linear forms not allowed. Please someone tell me if it can be linearized at all and if it's possible how. Thanks in advance. Best regards, Tóth Tamás PS.: Sorry for my poor english. My program is: set TASKS := { 44911405.1396, 45917349.728, 45935255.760, 45940559.937, 45940616.810, 45850077.1834, 45867819.665, 45875315.776, 45890352.675, 45893970.1566, 45867241.631, 45903630.1515, 45934020.614, 45889432.867, 45891512.1801, 45918734.827, 45921337.721, 45939669.674 }; set EMPLOYEES := { 105170, 105171, 105172, 105173, 109912, 109915, 97819 }; set HOURS := 1..24; param max_travel_cost := 9.9; param scheduling{TASKS, HOURS}, binary; param distances{TASKS, TASKS}, = 0; param competence{EMPLOYEES, TASKS}, binary; param cost{EMPLOYEES, TASKS}; param private_limits{EMPLOYEES}, = 0, = 24; var assignments{EMPLOYEES, TASKS}, binary; minimize total: card(TASKS) - sum{e in EMPLOYEES, t in TASKS} assignments[e,t] * 100 + sum{t in TASKS, e in EMPLOYEES} assignments[e,t] * cost[e,t] + sum{e in EMPLOYEES, h in HOURS, t in TASKS: scheduling[t,h] = 1} (assignments[e,t] * if h 1 then ( sum{t2 in TASKS: scheduling[t2,h-1] = 1} assignments[e,t2] * distances[t,t2] ) else max_travel_cost); competent{e in EMPLOYEES, t in TASKS}: assignments[e,t] = competence[e,t]; overlap{e in EMPLOYEES, h in HOURS}: sum{t in TASKS} assignments[e,t] * scheduling[t,h] = 1; unique{t in TASKS}: sum{e in EMPLOYEES} assignments[e,t] = 1; private_limit{e in EMPLOYEES}: sum{h in HOURS, t in TASKS} assignments[e,t] * scheduling[t,h] = private_limits[e]; solve; for {e in EMPLOYEES, t in TASKS: assignments[e,t] != 0} printf ASSIGNMENTS %s %s\n, t, e; data; param scheduling: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 := 44911405.1396 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45917349.728 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45935255.760 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45940559.937 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45940616.810 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45850077.1834 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 45867819.665 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 45875315.776 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 45890352.675 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 45893970.1566 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 45867241.631 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 45903630.1515 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 45934020.614 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 45889432.867 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 45891512.1801 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 45918734.827 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 45921337.721 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 45939669.674 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0; param distances: 44911405.1396 45917349.728 45935255.760 45940559.937 45940616.810 45850077.1834 45867819.665 45875315.776 45890352.675 45893970.1566 45867241.631 45903630.1515 45934020.614 45889432.867 45891512.1801 45918734.827 45921337.721 45939669.674 := 44911405.1396 0 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 0.5687 9.9 9.9 9.9 9.9 9.9 9.9 0.1045 45917349.728 9.9 0 9.9 9.9 9.9 0.1076 0.5568 0.4025 9.9 9.9 9.9 0.0948 0.0417 9.9 9.9 1.8267 2.8377 9.9 45935255.760 9.9 9.9 0 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 45940559.937 9.9 9.9 9.9 0 0.1142 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 45940616.810 9.9 9.9 9.9 0.1142 0 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 45850077.1834 9.9 0.1076 9.9 9.9 9.9 0 0.4898 0.4699 9.9 9.9 9.9 0.1428 0.0749 9.9 9.9 1.7899 2.7741 9.9 45867819.665 9.9 0.5568 9.9 9.9 9.9 0.4898 0 0.6026 9.9 9.9 9.9 0.6289 0.5168 9.9 9.9 1.3237 2.2845 9.9 45875315.776 9.9 0.4025 9.9 9.9 9.9 0.4699 0.6026 0 9.9 9.9 9.9 0.4852 0.4063 9.9 9.9 1.627 2.7272 9.9 45890352.675 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 0 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 45893970.1566 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 0 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 45867241.631 0.5687 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 0 9.9 9.9 9.9 9.9
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hello Kazi, glpk-4.50/src/glpk.h has no constyant LPX_LP. You obviously use a GLPK for Java built against an older include file. Check directory /usr/include. Best regards Heinrich Schuchardt http://www.xypron.de Am 09.06.13 um 21:54 schrieb Kazi Moyeen ul Huq Hi, What is this Timer-0 error ? Thanks Kazi. ~/application/state-optimizer$ java -Djava.library.path=/usr/local/lib/jni/ -classpath /usr/local/share/java/glpk-java.jar -jar st.jar Problem created ...test_MPC3 *Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.LPX_LP_get()I* at org.gnu.glpk.GLPKJNI.LPX_LP_get(Native Method) at org.gnu.glpk.GLPKConstants.clinit(GLPKConstants.java:122) at org.totalgrid.reef.examples.stateoptimizer.DESDAlgorithm.optimize(DESDAlgorithm.java:145) at org.totalgrid.reef.examples.stateoptimizer.StateOptimizerManager$1.run(StateOptimizerManager.java:65) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) -Kazi On Sun, Jun 9, 2013 at 9:46 AM, Heinrich Schuchardt xypron.g...@gmx.dewrote: On 09.06.2013 15:33, Kazi Moyeen ul Huq wrote: java -Djava.library.path=/usr/lib/**jni -jar st.jar Hello Kazi, the default installation path for GLPK and GLPK for Java is /usr/local If you did not configure with --prefix the command line to execute you jar file should be java -Djava.library.path=/usr/**local/lib/jni \ -classpath /usr/local/share/java/glpk-**java.jar -jar st.jar Best regards Heinrich Schuchardt ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hi, Should usr/include contain a copy of glpk.h ? I don't have one. Should I copy the glpk.h to usr/include or should I install another time ? I installed glpk4.50 in the home directory. But, glpsol --version shows GLPSOL: GLPK LP/MIP Solver, v4.50 -Kazi On Mon, Jun 10, 2013 at 3:26 AM, xypron.g...@gmx.de wrote: Hello Kazi, glpk-4.50/src/glpk.h has no constyant LPX_LP. You obviously use a GLPK for Java built against an older include file. Check directory /usr/include. Best regards Heinrich Schuchardt http://www.xypron.de Am 09.06.13 um 21:54 schrieb Kazi Moyeen ul Huq Hi, What is this Timer-0 error ? Thanks Kazi. ~/application/state-optimizer$ java -Djava.library.path=/usr/local/lib/jni/ -classpath /usr/local/share/java/glpk-java.jar -jar st.jar Problem created ...test_MPC3 *Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.LPX_LP_get()I* at org.gnu.glpk.GLPKJNI.LPX_LP_get(Native Method) at org.gnu.glpk.GLPKConstants.clinit(GLPKConstants.java:122) at org.totalgrid.reef.examples.stateoptimizer.DESDAlgorithm.optimize(DESDAlgorithm.java:145) at org.totalgrid.reef.examples.stateoptimizer.StateOptimizerManager$1.run(StateOptimizerManager.java:65) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) -Kazi On Sun, Jun 9, 2013 at 9:46 AM, Heinrich Schuchardt xypron.g...@gmx.de wrote: On 09.06.2013 15:33, Kazi Moyeen ul Huq wrote: java -Djava.library.path=/usr/lib/**jni -jar st.jar Hello Kazi, the default installation path for GLPK and GLPK for Java is /usr/local If you did not configure with --prefix the command line to execute you jar file should be java -Djava.library.path=/usr/**local/lib/jni \ -classpath /usr/local/share/java/glpk-**java.jar -jar st.jar Best regards Heinrich Schuchardt ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hello Kazi GLPK for Java looks in /usr/include and /usr/local/include for glpk.h. Best regards Heinrich Schuchardt http://www.xypron.de Am 10.06.13 um 13:42 schrieb Kazi Moyeen ul Huq Hi, Should usr/include contain a copy of glpk.h ? I don't have one. Should I copy the glpk.h to usr/include or should I install another time ? I installed glpk4.50 in the home directory. But, glpsol --version shows GLPSOL: GLPK LP/MIP Solver, v4.50 -Kazi On Mon, Jun 10, 2013 at 3:26 AM, xypron.g...@gmx.de wrote: Hello Kazi, glpk-4.50/src/glpk.h has no constyant LPX_LP. You obviously use a GLPK for Java built against an older include file. Check directory /usr/include. Best regards Heinrich Schuchardt http://www.xypron.de Am 09.06.13 um 21:54 schrieb Kazi Moyeen ul Huq Hi, What is this Timer-0 error ? Thanks Kazi. ~/application/state-optimizer$ java -Djava.library.path=/usr/local/lib/jni/ -classpath /usr/local/share/java/glpk-java.jar -jar st.jar Problem created ...test_MPC3 *Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.LPX_LP_get()I* at org.gnu.glpk.GLPKJNI.LPX_LP_get(Native Method) at org.gnu.glpk.GLPKConstants.clinit(GLPKConstants.java:122) at org.totalgrid.reef.examples.stateoptimizer.DESDAlgorithm.optimize(DESDAlgorithm.java:145) at org.totalgrid.reef.examples.stateoptimizer.StateOptimizerManager$1.run(StateOptimizerManager.java:65) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) -Kazi On Sun, Jun 9, 2013 at 9:46 AM, Heinrich Schuchardt xypron.g...@gmx.de wrote: On 09.06.2013 15:33, Kazi Moyeen ul Huq wrote: java -Djava.library.path=/usr/lib/**jni -jar st.jar Hello Kazi, the default installation path for GLPK and GLPK for Java is /usr/local If you did not configure with --prefix the command line to execute you jar file should be java -Djava.library.path=/usr/**local/lib/jni \ -classpath /usr/local/share/java/glpk-**java.jar -jar st.jar Best regards Heinrich Schuchardt ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hello Kazi, in the description on http://glpk-java.sourceforge.net/gettingStarted.html I forgot the following step after installation of GLPK. sudo ldconfig Best regards Heinrich Schuchardt On 09.06.2013 01:23, Kazi Moyeen ul Huq wrote: Hi, Looks like I made some progress ! But, I received these 2 messages, when I was installing according to the http://glpk-java.sourceforge.net/gettingStarted.html , GLPK /LPK for Java instructions : 1. In the glpk 4.50 installation, after make install (no error msg upto this point) : ~/glpk-4.50$ glpsol --version glpsol: error while loading shared libraries: libglpk.so.35: cannot open shared object file: No such file or directory 2.During make check for glpk-java-1.0.28 : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= 3. when I tried to test run my program, I got the following error : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: no glpk_java in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at org.gnu.glpk.GLPK.clinit(GLPK.java:20) ... ... ... The detailed error messages are attached in the email, Please suggest how I can take care of the dynamic link library error ? Thanks a lot Kazi ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hi, The 1 2 issue in the previous mail is now solved. But I still have the 3rd problem. For some reason it can't load the dynamic library during runtime. Any suggestion for that ? I'm using the following command to run the executable jar file ( it works in the latest version of Ubuntu) java -Djava.library.path=/usr/lib/jni -jar st.jar Thanks Kazi -- The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: no glpk_java in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at org.gnu.glpk.GLPK.clinit(GLPK.java:20) at org.totalgrid.reef.examples.stateoptimizer.DESDAlgorithm.optimize(DESDAlgorithm.java:138) at org.totalgrid.reef.examples.stateoptimizer.StateOptimizerManager$1.run(StateOptimizerManager.java:65) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) On Sun, Jun 9, 2013 at 3:27 AM, Heinrich Schuchardt xypron.g...@gmx.dewrote: Hello Kazi, in the description on http://glpk-java.sourceforge.**net/gettingStarted.htmlhttp://glpk-java.sourceforge.net/gettingStarted.html I forgot the following step after installation of GLPK. sudo ldconfig Best regards Heinrich Schuchardt On 09.06.2013 01:23, Kazi Moyeen ul Huq wrote: Hi, Looks like I made some progress ! But, I received these 2 messages, when I was installing according to the http://glpk-java.sourceforge.**net/gettingStarted.htmlhttp://glpk-java.sourceforge.net/gettingStarted.html, GLPK /LPK for Java instructions : 1. In the glpk 4.50 installation, after make install (no error msg upto this point) : ~/glpk-4.50$ glpsol --version glpsol: error while loading shared libraries: libglpk.so.35: cannot open shared object file: No such file or directory 2.During make check for glpk-java-1.0.28 : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= 3. when I tried to test run my program, I got the following error : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= Exception in thread Timer-0 java.lang.**UnsatisfiedLinkError: no glpk_java in java.library.path at java.lang.ClassLoader.**loadLibrary(ClassLoader.java:**1681) at java.lang.Runtime.**loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(**System.java:1047) at org.gnu.glpk.GLPK.clinit(**GLPK.java:20) ... ... ... The detailed error messages are attached in the email, Please suggest how I can take care of the dynamic link library error ? Thanks a lot Kazi ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
On 09.06.2013 15:33, Kazi Moyeen ul Huq wrote: java -Djava.library.path=/usr/lib/jni -jar st.jar Hello Kazi, the default installation path for GLPK and GLPK for Java is /usr/local If you did not configure with --prefix the command line to execute you jar file should be java -Djava.library.path=/usr/local/lib/jni \ -classpath /usr/local/share/java/glpk-java.jar -jar st.jar Best regards Heinrich Schuchardt ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hi, I tried to install the dependencies. Looks like the library libgmp-dev isn't available for the lucid suite. http://packages.ubuntu.com/search?keywords=libgmp-dev . I installed all the other build-depends: debhelper, cdbs, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool. libgmp-dev gave me the error msg -- E: Couldn't find package libgmp-dev. Is there any work-around to that ? I'll try to install it from the other suites ( precise) but I get a feeling from previous experience that the server denies to install. Thanks. Kazi On Fri, Jun 7, 2013 at 3:34 PM, Heinrich Schuchardt xypron.g...@gmx.dewrote: Hello Kazi, When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also You seem to be on an outdated version of Ubuntu (lucid). The current version is Ubuntu 12.04 LTS (Precise Pangolin). I suggest you uninstall GLPK and GLPK for Java on your Ubuntu server. sudo apt-get remove libglpk0 libglpk-dev sudo apt-get autoremove Install the build-depends: debhelper, cdbs, libgmp-dev, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool Then build GLPK and GLPK for Java from source as described on http://glpk-java.sourceforge.**net/gettingStarted.htmlhttp://glpk-java.sourceforge.net/gettingStarted.html When you want to install with iODBC use this configure line for GLPK: configure --enable-dl --enable-odbc --enable-mysql --with-gmp If you prefer UnixODBC you will need unixodbc-dev instead of libiodbc2-dev, and may use this configuration line for GLPK: configure --enable-dl --enable-odbc=unix --enable-mysql --with-gmp Best regards Heinrich Schuchardt On 07.06.2013 16:41, Andrew Makhorin wrote: Forwarded Message From: Kazi Moyeen ul Huq To: help-glpk@gnu.org Subject: Need help running GLPK code in Ubuntu server Date: Fri, 7 Jun 2013 08:41:41 -0400 Hi, I wrote a GLPK program in Windows-Java using the current vesrion of GLPK-java (1.0.28). It works well in windows. Now, I have to port it to a Ubuntu server. I'm an intermediate level Ubuntu user. When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also the test program given in the glpk examples ) it gives the the message : A. for lp = GLPK.glp_create_prob(); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**create_prob()J at org.gnu.glpk.GLPKJNI.glp_**create_prob(Native Method) B. forSystem.out.println(GLPK.glp_**version()); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**version()Ljava/lang/String; Please suggest me what I should do next to make my program run in the installed 1.0.1-1.1 version in server.( any modification required ? ) Thanks in advance, Moyeen ==**=== for further information, I also tried these: A. I tried to change the repository and install the 1.0.18-1 from http://us.archive.ubuntu.com/**ubuntu/http://us.archive.ubuntu.com/ubuntu/precise/universe amd64 Packages instead of current lucid/universe amd64 Packages but the server fails to install it. It says some dependencies can't be installed. B. similar thing happens when I tried to manually install by using ./configure then I received an error - configure: error: glpk.h not found The detail error message is attached. ==**= __**_ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/**listinfo/help-glpkhttps://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hello Kazi, GLPK can also be build without GMP. Try package libgmp3-dev. Best regards Heinrich Schuchardt http://www.xypron.de Am 08.06.13 um 19:55 schrieb Kazi Moyeen ul Huq Hi, I tried to install the dependencies. Looks like the library libgmp-dev isn't available for the lucid suite. http://packages.ubuntu.com/search?keywords=libgmp-dev . I installed all the other build-depends: debhelper, cdbs, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool. libgmp-dev gave me the error msg -- E: Couldn't find package libgmp-dev. Is there any work-around to that ? I'll try to install it from the other suites ( precise) but I get a feeling from previous experience that the server denies to install. Thanks. Kazi On Fri, Jun 7, 2013 at 3:34 PM, Heinrich Schuchardt xypron.g...@gmx.dewrote: Hello Kazi, When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also You seem to be on an outdated version of Ubuntu (lucid). The current version is Ubuntu 12.04 LTS (Precise Pangolin). I suggest you uninstall GLPK and GLPK for Java on your Ubuntu server. sudo apt-get remove libglpk0 libglpk-dev sudo apt-get autoremove Install the build-depends: debhelper, cdbs, libgmp-dev, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool Then build GLPK and GLPK for Java from source as described on http://glpk-java.sourceforge.**net/gettingStarted.htmlhttp://glpk-java.sourceforge.net/gettingStarted.html When you want to install with iODBC use this configure line for GLPK: configure --enable-dl --enable-odbc --enable-mysql --with-gmp If you prefer UnixODBC you will need unixodbc-dev instead of libiodbc2-dev, and may use this configuration line for GLPK: configure --enable-dl --enable-odbc=unix --enable-mysql --with-gmp Best regards Heinrich Schuchardt On 07.06.2013 16:41, Andrew Makhorin wrote: Forwarded Message From: Kazi Moyeen ul Huq To: help-glpk@gnu.org Subject: Need help running GLPK code in Ubuntu server Date: Fri, 7 Jun 2013 08:41:41 -0400 Hi, I wrote a GLPK program in Windows-Java using the current vesrion of GLPK-java (1.0.28). It works well in windows. Now, I have to port it to a Ubuntu server. I'm an intermediate level Ubuntu user. When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also the test program given in the glpk examples ) it gives the the message : A. for lp = GLPK.glp_create_prob(); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**create_prob()J at org.gnu.glpk.GLPKJNI.glp_**create_prob(Native Method) B. forSystem.out.println(GLPK.glp_**version()); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**version()Ljava/lang/String; Please suggest me what I should do next to make my program run in the installed 1.0.1-1.1 version in server.( any modification required ? ) Thanks in advance, Moyeen ==**=== for further information, I also tried these: A. I tried to change the repository and install the 1.0.18-1 from http://us.archive.ubuntu.com/**ubuntu/http://us.archive.ubuntu.com/ubuntu/precise/universe amd64 Packages instead of current lucid/universe amd64 Packages but the server fails to install it. It says some dependencies can't be installed. B. similar thing happens when I tried to manually install by using ./configure then I received an error - configure: error: glpk.h not found The detail error message is attached. ==**= __**_ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/**listinfo/help-glpkhttps://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hi, Looks like I made some progress ! But, I received these 2 messages, when I was installing according to the http://glpk-java.sourceforge.net/gettingStarted.html , GLPK /LPK for Java instructions : 1. In the glpk 4.50 installation, after make install (no error msg upto this point) : ~/glpk-4.50$ glpsol --version glpsol: error while loading shared libraries: libglpk.so.35: cannot open shared object file: No such file or directory 2.During make check for glpk-java-1.0.28 : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= 3. when I tried to test run my program, I got the following error : The dynamic link library for GLPK for Java could not be loaded. Consider using java -Djava.library.path= Exception in thread Timer-0 java.lang.UnsatisfiedLinkError: no glpk_java in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at org.gnu.glpk.GLPK.clinit(GLPK.java:20) ... ... ... The detailed error messages are attached in the email, Please suggest how I can take care of the dynamic link library error ? Thanks a lot Kazi On Sat, Jun 8, 2013 at 4:08 PM, xypron.g...@gmx.de wrote: Hello Kazi, GLPK can also be build without GMP. Try package libgmp3-dev. Best regards Heinrich Schuchardt http://www.xypron.de Am 08.06.13 um 19:55 schrieb Kazi Moyeen ul Huq Hi, I tried to install the dependencies. Looks like the library libgmp-dev isn't available for the lucid suite. http://packages.ubuntu.com/search?keywords=libgmp-dev . I installed all the other build-depends: debhelper, cdbs, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool. libgmp-dev gave me the error msg -- E: Couldn't find package libgmp-dev. Is there any work-around to that ? I'll try to install it from the other suites ( precise) but I get a feeling from previous experience that the server denies to install. Thanks. Kazi On Fri, Jun 7, 2013 at 3:34 PM, Heinrich Schuchardt xypron.g...@gmx.de wrote: Hello Kazi, When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also You seem to be on an outdated version of Ubuntu (lucid). The current version is Ubuntu 12.04 LTS (Precise Pangolin). I suggest you uninstall GLPK and GLPK for Java on your Ubuntu server. sudo apt-get remove libglpk0 libglpk-dev sudo apt-get autoremove Install the build-depends: debhelper, cdbs, libgmp-dev, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool Then build GLPK and GLPK for Java from source as described on http://glpk-java.sourceforge.**net/gettingStarted.html http://glpk-java.sourceforge.net/gettingStarted.html When you want to install with iODBC use this configure line for GLPK: configure --enable-dl --enable-odbc --enable-mysql --with-gmp If you prefer UnixODBC you will need unixodbc-dev instead of libiodbc2-dev, and may use this configuration line for GLPK: configure --enable-dl --enable-odbc=unix --enable-mysql --with-gmp Best regards Heinrich Schuchardt On 07.06.2013 16:41, Andrew Makhorin wrote: Forwarded Message From: Kazi Moyeen ul Huq To: help-glpk@gnu.org Subject: Need help running GLPK code in Ubuntu server Date: Fri, 7 Jun 2013 08:41:41 -0400 Hi, I wrote a GLPK program in Windows-Java using the current vesrion of GLPK-java (1.0.28). It works well in windows. Now, I have to port it to a Ubuntu server. I'm an intermediate level Ubuntu user. When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also the test program given in the glpk examples ) it gives the the message : A. for lp = GLPK.glp_create_prob(); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**create_prob()J at org.gnu.glpk.GLPKJNI.glp_**create_prob(Native Method) B. forSystem.out.println(GLPK.glp_**version()); Exception in thread main java.lang.**UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_**version()Ljava/lang/String; Please suggest me what I should do next to make my program run in the installed 1.0.1-1.1 version in server.( any modification required ? ) Thanks in advance, Moyeen ==**=== for further information, I also tried these: A. I tried to change the
[Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Forwarded Message From: Kazi Moyeen ul Huq km...@ncsu.edu To: help-glpk@gnu.org Subject: Need help running GLPK code in Ubuntu server Date: Fri, 7 Jun 2013 08:41:41 -0400 Hi, I wrote a GLPK program in Windows-Java using the current vesrion of GLPK-java (1.0.28). It works well in windows. Now, I have to port it to a Ubuntu server. I'm an intermediate level Ubuntu user. When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also the test program given in the glpk examples ) it gives the the message : A. for lp = GLPK.glp_create_prob(); Exception in thread main java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_create_prob()J at org.gnu.glpk.GLPKJNI.glp_create_prob(Native Method) B. forSystem.out.println(GLPK.glp_version()); Exception in thread main java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_version()Ljava/lang/String; Please suggest me what I should do next to make my program run in the installed 1.0.1-1.1 version in server.( any modification required ? ) Thanks in advance, Moyeen = for further information, I also tried these: A. I tried to change the repository and install the 1.0.18-1 from http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages instead of current lucid/universe amd64 Packages but the server fails to install it. It says some dependencies can't be installed. B. similar thing happens when I tried to manually install by using ./configure then I received an error - configure: error: glpk.h not found The detail error message is attached. === glpk.h not found Description: Binary data ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help running GLPK code in Ubuntu server]
Hello Kazi, When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also You seem to be on an outdated version of Ubuntu (lucid). The current version is Ubuntu 12.04 LTS (Precise Pangolin). I suggest you uninstall GLPK and GLPK for Java on your Ubuntu server. sudo apt-get remove libglpk0 libglpk-dev sudo apt-get autoremove Install the build-depends: debhelper, cdbs, libgmp-dev, libltdl-dev, zlib1g-dev, libiodbc2-dev, libmysqlclient-dev, automake, autoconf, libtool Then build GLPK and GLPK for Java from source as described on http://glpk-java.sourceforge.net/gettingStarted.html When you want to install with iODBC use this configure line for GLPK: configure --enable-dl --enable-odbc --enable-mysql --with-gmp If you prefer UnixODBC you will need unixodbc-dev instead of libiodbc2-dev, and may use this configuration line for GLPK: configure --enable-dl --enable-odbc=unix --enable-mysql --with-gmp Best regards Heinrich Schuchardt On 07.06.2013 16:41, Andrew Makhorin wrote: Forwarded Message From: Kazi Moyeen ul Huq To: help-glpk@gnu.org Subject: Need help running GLPK code in Ubuntu server Date: Fri, 7 Jun 2013 08:41:41 -0400 Hi, I wrote a GLPK program in Windows-Java using the current vesrion of GLPK-java (1.0.28). It works well in windows. Now, I have to port it to a Ubuntu server. I'm an intermediate level Ubuntu user. When I used sudo apt-get install libglpk-java , the server installs libglpk-java: 1.0.1-1.1. Then when I tried to run my program ( also the test program given in the glpk examples ) it gives the the message : A. for lp = GLPK.glp_create_prob(); Exception in thread main java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_create_prob()J at org.gnu.glpk.GLPKJNI.glp_create_prob(Native Method) B. forSystem.out.println(GLPK.glp_version()); Exception in thread main java.lang.UnsatisfiedLinkError: org.gnu.glpk.GLPKJNI.glp_version()Ljava/lang/String; Please suggest me what I should do next to make my program run in the installed 1.0.1-1.1 version in server.( any modification required ? ) Thanks in advance, Moyeen = for further information, I also tried these: A. I tried to change the repository and install the 1.0.18-1 from http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages instead of current lucid/universe amd64 Packages but the server fails to install it. It says some dependencies can't be installed. B. similar thing happens when I tried to manually install by using ./configure then I received an error - configure: error: glpk.h not found The detail error message is attached. === ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Re: Help: How to build MIP model]
Hello Matteo, you are right that the GLPK API has some complexity, which a beginner may want to avoid. The following C++ library tries to make creating the LP matrix entries easier: http://sourceforge.net/projects/iajaarh/ More elaborate wrappers for GLPK may be found here: Python: http://pymprog.sourceforge.net/tutorial.html#a-dive-in-example Java: http://javailp.sourceforge.net/ http://www.xypron.de/projects/linopt/ Best regards Heinrich Schuchardt On 04.01.2013 20:31, Andrew Makhorin wrote: Forwarded Message From: Matteo Fischetti DEIm.fische...@gmail.com Subject: Re: [Help-glpk] Help: How to build MIP model Date: Fri, 04 Jan 2013 15:43:34 +0100 Hi Andrew. to easy writing a MIP model (in Cplex) using C, I wrote the trivial functions below www.dei.unipd.it/~fisch/easy_lp.c I do not know if you have something similar in GLPK, other than MathProg of course, that could help beginners to write models with 1-index variables (for 2-index var.s similar functions can be written) Take care --Matteo-- ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: Re: Help: How to build MIP model]
Forwarded Message From: Matteo Fischetti DEI m.fische...@gmail.com Reply-to: m.fische...@gmail.com To: Andrew Makhorin m...@gnu.org Subject: Re: [Help-glpk] Help: How to build MIP model Date: Fri, 04 Jan 2013 15:43:34 +0100 Hi Andrew. to easy writing a MIP model (in Cplex) using C, I wrote the trivial functions below www.dei.unipd.it/~fisch/easy_lp.c I do not know if you have something similar in GLPK, other than MathProg of course, that could help beginners to write models with 1-index variables (for 2-index var.s similar functions can be written) Take care --Matteo-- Il 04/01/2013 15:01, lucacoopers ha scritto: First, thanks to all. Jeff you're right. I misspelled my problem. The problem is: minimize { sum[from i=1 to 96] of {c1*x1(i)+c2*x2+c3*x3(i)} } with this constraints: x1(i)+x2+x3(i)=c4(i) x1(i)+x3(i)=c5 x1(i)=5 0=x3(i)=100 0=x2=1 binary where x1, x3 and c4 are vectors of 96 elements. c1,c2,c3,c5 are numbers. Sorry for the mistake. I wish someone would write the problem in a form similar to that described above. I need to learn how to write a minimization problem with glpk with the language c. thanks again to all:-) -- Prof. Matteo Fischetti DEI, University of Padova via Gradenigo 6/A I-35131 Padova (Italy) e-mail: matteo.fische...@unipd.it web: www.dei.unipd.it/~fisch reports: www.dei.unipd.it/~fisch/papers ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] Fwd: glpk help
Ok. Thanks for your reply. May be your reply will do the trick I wanted. If it works I will let you know. Thanks again. -- Forwarded message -- From: Robbie Morrison rob...@actrix.co.nz Date: Thu, Jun 7, 2012 at 10:07 PM Subject: Re: [Help-glpk] glpk help To: GLPK help help-glpk@gnu.org Cc: Sajal Mukhopadhyay sajm...@gmail.com To: help-glpk@gnu.org Subject: [Help-glpk] glpk help From: Sajal Mukhopadhyay sajm...@gmail.com Date: Thu, 7 Jun 2012 10:04:09 +0530 Hello, Say I have file named g1.mod and I have a file named t1.py. Can I call g1.mod from t1.py? What is the procedure? -- Sajal Mukhopadhyay, Asst. Professor, NIT,Durgapur, Durgapur-9. Hello Sajal It would be better to title your posting more precisely. glpk help is hardly informative. The following GLPK wikibook page discusses scripting and GLPK in general, but also has some specific remarks about python near the end: http://en.wikibooks.org/wiki/GLPK/Scripting_plus_MathProg See this section in particular: http://en.wikibooks.org/wiki/GLPK/Scripting_plus_MathProg#Suppressing_terminal_output_under_Python HTH, Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : morri...@iet.tu-berlin.de Webmail (preferred) : rob...@actrix.co.nz [from Webmail client] -- Sajal Mukhopadhyay, Asst. Professor, NIT,Durgapur, Durgapur-9. ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] Fwd: glpk help
No answer of this message yet. Please help. -- Forwarded message -- From: Sajal Mukhopadhyay sajm...@gmail.com Date: Mon, Mar 5, 2012 at 12:20 AM Subject: Re: [Help-glpk] glpk help To: Andrew Makhorin m...@gnu.org I have seen the gmpl.pdf and the problem is solved to some extent. Thank you again. Now I am facing another problem. I am trying to solve multiobjective solid transportation problem. I am using some goal programming technique. In this case what I have to do is to find out optimal solution of the first objective and based on the x[i,j,k] found in this case we have to find out the value of the other objective function. Next we have to find out the optimal solution of the next objective and based on x[i,j,k] found we have find out the value of the other objectives and so on. Now my problem is say I have found the values of the x[i,j,k] for finding the optimal value of the first objective. Now I have to calculate the value of the other objectives based on this x[i,j,k]. How can I do that in the same program. Say my program name is glp1.mod. My question is can I do that in the same program or I have to write a separate program. May be my problem is explained properly. Please help me again. On Thu, Feb 23, 2012 at 5:37 PM, Andrew Makhorin m...@gnu.org wrote: I am new to glpk. I want to represent c[i,j,k] for some transportation problem concerning the fact that the depot i serving customer j with vehicle k. How can i represent the table in this environment. All code example, so far found by me, dealing with only c[i,j]. Please help me. Please see the MathProg language reference (doc/gmpl.pdf) and example models (examples/*.mod) included in the glpk distribution. In particular, see the example model train.mod; it includes multidemensional parameters and variables. In the future please use a more descriptive subject line for your messages. Thanks. -- Sajal Mukhopadhyay, Asst. Professor, NIT,Durgapur, Durgapur-9. -- Sajal Mukhopadhyay, Asst. Professor, NIT,Durgapur, Durgapur-9. ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] Fwd: glpk help
Hello Sajal You could certainly achieve your task using the C interface to GLPK. I program in C++ and have a class that holds five objective functions. Before calling my solver member function (aka method), I nominate one of the five to be the active objective and later calculate the value of the remaining four after the solver has returned. Now that is not exactly what you asked about, but it does share similarities. I am guessing here, but you could try some background scripting in your preferred scripting language (bash, perl, python, ruby) and write out new data files on the fly. The GLPK wikibook has some material on scripting and GLPSOL: http://en.wikibooks.org/wiki/GLPK Or, again guessing, you could take a hybrid approach and use a GLPK scripting language binding (python, R). The approach you select is probably a mater of which tools and languages you feel most comfortable with. Can I echo Andrew's comment about using a more descriptive subject line. It makes it easier for people who want to later scan thru the archives. Good luck, Robbie To: help-glpk@gnu.org Subject: [Help-glpk] Fwd: glpk help From: Sajal Mukhopadhyay sajm...@gmail.com Date: Mon, 5 Mar 2012 17:16:43 +0530 No answer of this message yet. Please help. -- Forwarded message -- From: Sajal Mukhopadhyay sajm...@gmail.com Date: Mon, Mar 5, 2012 at 12:20 AM Subject: Re: [Help-glpk] glpk help To: Andrew Makhorin m...@gnu.org I have seen the gmpl.pdf and the problem is solved to some extent. Thank you again. Now I am facing another problem. I am trying to solve multiobjective solid transportation problem. I am using some goal programming technique. In this case what I have to do is to find out optimal solution of the first objective and based on the x[i,j,k] found in this case we have to find out the value of the other objective function. Next we have to find out the optimal solution of the next objective and based on x[i,j,k] found we have find out the value of the other objectives and so on. Now my problem is say I have found the values of the x[i,j,k] for finding the optimal value of the first objective. Now I have to calculate the value of the other objectives based on this x[i,j,k]. How can I do that in the same program. Say my program name is glp1.mod. My question is can I do that in the same program or I have to write a separate program. May be my problem is explained properly. Please help me again. On Thu, Feb 23, 2012 at 5:37 PM, Andrew Makhorin m...@gnu.org wrote: I am new to glpk. I want to represent c[i,j,k] for some transportation problem concerning the fact that the depot i serving customer j with vehicle k. How can i represent the table in this environment. All code example, so far found by me, dealing with only c[i,j]. Please help me. Please see the MathProg language reference (doc/gmpl.pdf) and example models (examples/*.mod) included in the glpk distribution. In particular, see the example model train.mod; it includes multidemensional parameters and variables. In the future please use a more descriptive subject line for your messages. Thanks. -- Sajal Mukhopadhyay, Asst. Professor, NIT,Durgapur, Durgapur-9. -- next part -- An HTML attachment was scrubbed... URL: http://lists.gnu.org/archive/html/help-glpk/attachments/20120305/6f572842/attachment.html -- --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : morri...@iet.tu-berlin.de Webmail (preferred) : rob...@actrix.co.nz [from Webmail client] ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: please help me about glpk installation on matlab]
Forwarded Message From: 赵炜 zhaowe...@hotmail.com To: help-glpk@gnu.org Subject: please help me about glpk installation on matlab Date: Mon, 28 Nov 2011 19:46:52 +0800 hello, i want to use glpk at matlab,but when i copy the file of glpkmex and glpk 4.47 into matlab toolbox,and set path on matlab, the matlab can't run the glpktest. run makeglpkmex.m ??? Error using == run The function, script, or class makeglpkmex cannot be indexed using {} or . indexing. run glpktest1.m ??? Error using == run The function, script, or class glpktest1 cannot be indexed using {} or . indexing. glpktest1 LP problem ??? Undefined command/function 'glpkcc'. Error in == glpk at 501 [xopt, fmin, status, extra] = glpkcc(c, a, b, lb, ub, ctype, vartype, sense, param); Error in == glpktest1 at 21 [xmin,fmin,status,extra]=glpk(c,a,b,lb,ub,ctype,vartype,s,param) the testall of matlab show me that : test_folder = C:\MATLAB7\toolbox\cobra\testing\testSolvers\ Error in LP test Error in MILP test Error in QP test Error in MIQP test Error in NLP test 1 Warning: MIQP solver CPLEX through Tomlab not usable: tomRun.m not in Matlab path In changeCobraSolver at 239 In sampleNLP at 16 In testSolvers at 214 In testAll at 41 Error in NLP test 2 testSolvers did not pass notPassedCnt = i change the glpk4.47 to 4.35,the result is the same.i found on net,but still puzzled,i do not know how to resolve it. would you help me??i need your help. thank you evry much. Austin,a Ph.D candidate from China,Guangzhou City. ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: need help for the routine glp_intopt]
Forwarded Message From: Lounes BENTAHA mlo...@hotmail.fr To: help-glpk@gnu.org Subject: need help for the routine glp_intopt Date: Fri, 9 Sep 2011 11:04:41 +0200 Hello everybody! I'm a student at Paris Dauphine University and i'm using GLPK to solve MIP problems (as part of my master thesis : Operational Research and Decision Aiding). When i solve my MIP problem with these two basic API Routines : glp_simplex(mip, NULL); glp_intopt(mip, NULL); this message is shown on the screen: OPTIMAL SOLUTION FOUND (Optimal solution to LP rekaxation) other comments... INTEGER OPTIMAL SOLUTION FOUND The problem is the fact that this optimal integer solution is not integer Any help or idea? Thanks in advance! ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] [Fwd: Need help in callback routine for GLP_IBRANCH]
Forwarded Message From: sheetal murkute shv...@gmail.com To: help-glpk@gnu.org Subject: Need help in callback routine for GLP_IBRANCH Date: Mon, 4 Jul 2011 01:00:04 -0400 Hi, I am using GLPK callback routine to change the behavior of branch and bound method. I use glp_ios_reason to determine the reason for calling the call-back routine. In this, for the reason GLP_IBRANCH, I have to change rule to select next variable to branch on. For this, I need the values of all the variables for LP relaxation solution at down branch (when candidate variable is set to 0) and up branch (when candidate variable is set to 1). I am using following logic for getting these values, but I get the error that glp_simplex is not allowed at this step. Will you please guide me on this? [ Note: here j is the candidate variable index obtained from the routine glp_ios_can_branch(tree, j). 'numcol' is the total number of variables in sub-problem obtained from the routine glp_get_num_cols(glp_ios_get_prob(tree)). ] glp_set_col_bnds(glp_ios_get_prob(tree), j, GLP_UP, 0.0, 0.0); glp_simplex(glp_ios_get_prob(tree),NULL); for(i=1,j=1; j= numcol ; i++,j++) xlf[i] = glp_get_col_prim(glp_ios_get_prob(tree),j); glp_set_col_bnds(glp_ios_get_prob(tree), j, GLP_LO, 1.0, 0.0); glp_simplex(glp_ios_get_prob(tree),NULL); for(i=1,j=1; j= numcol ; i++,j++) xuf[i] = glp_get_col_prim(glp_ios_get_prob(tree),j); -- Thanks with Best Regards, Sheetal ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help in callback routine for GLP_IBRANCH]
I am using GLPK callback routine to change the behavior of branch and bound method. I use glp_ios_reason to determine the reason for calling the call-back routine. In this, for the reason GLP_IBRANCH, I have to change rule to select next variable to branch on. For this, I need the values of all the variables for LP relaxation solution at down branch (when candidate variable is set to 0) and up branch (when candidate variable is set to 1). I am using following logic for getting these values, but I get the error that glp_simplex is not allowed at this step. Will you please guide me on this? [ Note: here j is the candidate variable index obtained from the routine glp_ios_can_branch(tree, j). 'numcol' is the total number of variables in sub-problem obtained from the routine glp_get_num_cols(glp_ios_get_prob(tree)). ] glp_set_col_bnds(glp_ios_get_prob(tree), j, GLP_UP, 0.0, 0.0); glp_simplex(glp_ios_get_prob(tree),NULL); for(i=1,j=1; j= numcol ; i++,j++) xlf[i] = glp_get_col_prim(glp_ios_get_prob(tree),j); glp_set_col_bnds(glp_ios_get_prob(tree), j, GLP_LO, 1.0, 0.0); glp_simplex(glp_ios_get_prob(tree),NULL); for(i=1,j=1; j= numcol ; i++,j++) xuf[i] = glp_get_col_prim(glp_ios_get_prob(tree),j); Since within the callback routine the problem object is used by the mip solver, you cannot change it arbitrarily--the operations that change the problem object are limited to changing row/column bounds, adding rows, and removing rows added to the current subproblem. In partcular, glp_simplex may change the current basis and solution components, so it cannot be used for the current subproblem. For more details please see the glpk reference manual. If you need to fix some variables and then call glp_simplex (I guess you'd like to implement something like a strong branching), you may create a copy of the current subproblem with the routine glp_clone_prob, perform all necessary calculations, and then delete the copy on exit from the callback routine. ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Help-glpk] Re [Fwd: Need help in callback routine for GLP_IBRANCH]
Hello Sheetal, Pradeep, Nicolas, Andrew I started a small stub in the GLPK wikibook on this general topic a while back: http://en.wikibooks.org/wiki/GLPK/Third-party_API_wrappers#COIN-OR_Open_solver_interface_.28Osi.29 If those involved can post their thoughts and conclusions back here, then I will collect these and rework the text. It may indeed be worth migrating to a new page, something like COIN and GLPK. Andrew specifically: can I post '3party.c' on the wikibook? In which case, is it public domain? Or should it get a license notice? TIA. best wishes, Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : morri...@iet.tu-berlin.de Webmail (preferred) : rob...@actrix.co.nz [from Webmail client] ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Help-glpk] [Fwd: Need help in callback routine for GLP_IBRANCH]
Hi Robbie, I started a small stub in the GLPK wikibook on this general topic a while back: http://en.wikibooks.org/wiki/GLPK/Third-party_API_wrappers#COIN-OR_Open_solver_interface_.28Osi.29 If those involved can post their thoughts and conclusions back here, then I will collect these and rework the text. It may indeed be worth migrating to a new page, something like COIN and GLPK. Andrew specifically: can I post '3party.c' on the wikibook? In which case, is it public domain? Or should it get a license notice? TIA. Well, it is just an example, so let it be in the public domain. Please add a corresponding notice to the code and put it into the wikibook. And please also add a comment that that exmaple uses internal (i.e. non-api) data structures, though all the same things could be implemented on api level. Andrew Makhorin ___ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: Re: [Help-glpk] GLPK GUROBI wrapper]
Forwarded Message From: Harley Mackenzie h...@hardsoftware.com To: Matteo Salani matteo.sal...@idsia.ch, Robbie Morrison rob...@actrix.co.nz, GLPK-HELP help-glpk@gnu.org Subject: Re: [Help-glpk] GLPK GUROBI wrapper Date: Fri, 25 Feb 2011 11:50:49 +1100 Matteo, I know that the GPL licensing issues do seem heavy handed at times but there is a long standing approach to point out potential GPL license issues so that they may be resolved rather than discourage development or not value your contribution. The aim of the GPL is make sure that free software stays free as I am sure that you can understand that if someone takes GPL software code and makes it part of their own non-free software, then any changes or improvements to the code don't go back into the code and also someone can commercially exploit software developed by others for the benefit of everyone. I am sure that it is not your intention to exploit anyone, and there a lots of people on this list who can look at what you are doing, see if there are any potential issues, and if there are work with you to resolve them. The last thing that anyone on this list wants is for people to feel that that shouldn't contribute to the software due to licensing issues or that their existing work or contributions aren't appreciated. Harley On 24/02/11 6:55 PM, Matteo Salani wrote: Robbie, list members, I did not want to raise this flame discussion about licenses... I wrote this wrapper form myself and a couple of colleagues and found it useful. To me, it doesn't seem to violate any license. Anyway, if you think it does, please remove it from the list archives and forget about it. all the best, Matteo On 02/24/2011 12:14 AM, Robbie Morrison wrote: Hello list, hello Matteo Subject: Re: [Help-glpk] GLPK GUROBI wrapper From: Andrew Makhorin Date: Wed, 23 Feb 2011 22:58:42 +0300 On Wed, 2011-02-23 at 20:30 +0100, glpk xypron wrote: Hello Matteo, running your code would violate the license of GLPK because Gurobi is not licensed under a license compatible to the Gnu Public License. Please, observe that Andrew chose to publish GLPK under GPL and not LGPL. Best regards Xypron It depends on how Gurobi (which is highly proprietary software) is used within the wrapper assuming that the wrapper itself is distributed under the GNU GPL or a compatible license. I think that in this case Gurobi can be considered as a plug-in, so the following answers the question: http://www.gnu.org/licenses/gpl-faq.html#GPLAndPlugins I read thru 'wrapper_gurobi.c' carefully: http://lists.gnu.org/archive/html/help-glpk/2011-02/txtgH2ubVmjpc.txt It seems to me that the final paragraph in the GNU GPLAndPlugins section applies, which means this constitutes a borderline case. Moreover Matteo's program could probably be re-written in a scripting language to enforce any necessary separations. Hence my initial thought is that Matteo's code is acceptable. Although not a legal consideration, I don't see this single C file, released under the GPLv2, as undermining GLPK in any way. Or am I missing something? If 'wrapper_gurobi.c' is deemed okay, then I will put an entry for it in the GLPK wikibook. Whatever the decision, I would like to record my appreciation to Matteo for attempting to contribute back to the GLPK ecosystem. Cheers! Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : morri...@iet.tu-berlin.de Webmail (preferred) : rob...@actrix.co.nz [from Webmail client] -- -- Dr. Harley Mackenzie ABN: 36 348 783 012 HARD SoftwareWeb: www.hardsoftware.com PO BOX 8004 Tel: +61 3 5222 3435 Newtown 3220, Australia Email: h...@hardsoftware.com -- ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: RE: [Help-glpk] execute concorde through cygwin command
Hello Aniket As Xypron has already pointed out, this list is for traffic about GLPK and not concorde. We would appreciate it if you could respect that mandate. In any case, your question about the exactness of concorde can be easily answered by reading the first few lines of the concorde homepage. That would, I suggest, be a very much better use of everyone's time, including your own. with regards Robbie To: help-glpk@gnu.org Subject: [Fwd: RE: [Help-glpk] execute concorde through cygwin command Message-ID: 1296691084.24130.2.camel@none From:Andrew Makhorin m...@gnu.org Date:Thu, 03 Feb 2011 02:58:04 +0300 Forwarded Message From: Aniket Karmarkar karmarkarani...@gmail.com To: Andrew Makhorin m...@gnu.org Cc: help-glpk@gnu.org, glpk xypron xypron.g...@gmx.de Subject: Re: [Fwd: RE: [Help-glpk] execute concorde through cygwin command line] Date: Wed, 2 Feb 2011 15:00:07 -0600 On the neos server, Does concorde(CPLEX) give exact shortest tour for TSP? Thanks, Aniket On Tue, Feb 1, 2011 at 4:43 PM, Andrew Makhorin m...@gnu.org wrote: Forwarded Message From: Robert Fourer 4...@northwestern.edu Reply-To: 4...@northwestern.edu To: 'glpk xypron' xypron.g...@gmx.de, 'Aniket Karmarkar' karmarkarani...@gmail.com, help-glpk@gnu.org Subject: RE: [Help-glpk] execute concorde through cygwin command line Date: Tue, 1 Feb 2011 15:17:27 -0600 Also you can run Concorde over the Internet by taking advantage of the NEOS Server: [snip] -Original Message- From: help-glpk-bounces+4er=iems.northwestern@gnu.org [mailto:help-glpk- bounces+4er=iems.northwestern@gnu.org] On Behalf Of glpk xypron Sent: Tuesday, February 01, 2011 2:49 PM To: Aniket Karmarkar; help-glpk@gnu.org Subject: Re: [Help-glpk] execute concorde through cygwin command line Hello Aniket, this list is not on Concorde but on GLPK. --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : morri...@iet.tu-berlin.de Webmail (preferred) : rob...@actrix.co.nz [from Webmail client] ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: RE: [Help-glpk] execute concorde through cygwin command line]
Forwarded Message From: Aniket Karmarkar karmarkarani...@gmail.com To: Andrew Makhorin m...@gnu.org Cc: help-glpk@gnu.org, glpk xypron xypron.g...@gmx.de Subject: Re: [Fwd: RE: [Help-glpk] execute concorde through cygwin command line] Date: Wed, 2 Feb 2011 15:00:07 -0600 On the neos server, Does concorde(CPLEX) give exact shortest tour for TSP? Thanks, Aniket On Tue, Feb 1, 2011 at 4:43 PM, Andrew Makhorin m...@gnu.org wrote: Forwarded Message From: Robert Fourer 4...@northwestern.edu Reply-To: 4...@northwestern.edu To: 'glpk xypron' xypron.g...@gmx.de, 'Aniket Karmarkar' karmarkarani...@gmail.com, help-glpk@gnu.org Subject: RE: [Help-glpk] execute concorde through cygwin command line Date: Tue, 1 Feb 2011 15:17:27 -0600 Also you can run Concorde over the Internet by taking advantage of the NEOS Server: www.neos-server.org Click on NEOS Solvers and look under Combinatorial Optimization and Integer Programming. You specify an appropriate Concorde input file to be uploaded from your computer, and the optimal tour is displayed in your browser. (There is also an API for making submissions from your own program.) I mention this here because one can also run GLPK through NEOS, saving the time of installing it locally. It is hosted for NEOS at the Univ of Wisconsin currently only with GAMS input, but if there's interest I think they could be persuaded to put up versions with input in MathProg and some low-level formats like MPS and LP. Bob Fourer 4...@northwestern.edu -Original Message- From: help-glpk-bounces+4er=iems.northwestern@gnu.org [mailto:help-glpk- bounces+4er=iems.northwestern@gnu.org] On Behalf Of glpk xypron Sent: Tuesday, February 01, 2011 2:49 PM To: Aniket Karmarkar; help-glpk@gnu.org Subject: Re: [Help-glpk] execute concorde through cygwin command line Hello Aniket, this list is not on Concorde but on GLPK. http://www.tsp.gatech.edu/concorde/DOC/concorde_prog.html teaches: A short user's guide for most of the programs can be obtained by running the selected program without specifying any arguments (so, for example, entering concorde). For help on Concorde refer to the address given at http://www.tsp.gatech.edu/concorde/contact/contact.htm Best regards Xypron Original-Nachricht Datum: Tue, 1 Feb 2011 17:20:05 + (UTC) Von: Aniket Karmarkar karmarkarani...@gmail.com An: help-glpk@gnu.org Betreff: [Help-glpk] execute concorde through cygwin command line I am trying to use concorde to find the shortest distance in the traveling salesman problem. I have got the command line interface cygwin but when i execute concorde.exe I do not which options to specify so that I get the graph, the shortest tour and the distance. Any suggestions? I want to do the testing for a maximum of 400 nodes. ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk -- Aniket Karmarkar ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: RE: [Help-glpk] execute concorde through cygwin command line]
Forwarded Message From: Robert Fourer 4...@northwestern.edu Reply-To: 4...@northwestern.edu To: 'glpk xypron' xypron.g...@gmx.de, 'Aniket Karmarkar' karmarkarani...@gmail.com, help-glpk@gnu.org Subject: RE: [Help-glpk] execute concorde through cygwin command line Date: Tue, 1 Feb 2011 15:17:27 -0600 Also you can run Concorde over the Internet by taking advantage of the NEOS Server: www.neos-server.org Click on NEOS Solvers and look under Combinatorial Optimization and Integer Programming. You specify an appropriate Concorde input file to be uploaded from your computer, and the optimal tour is displayed in your browser. (There is also an API for making submissions from your own program.) I mention this here because one can also run GLPK through NEOS, saving the time of installing it locally. It is hosted for NEOS at the Univ of Wisconsin currently only with GAMS input, but if there's interest I think they could be persuaded to put up versions with input in MathProg and some low-level formats like MPS and LP. Bob Fourer 4...@northwestern.edu -Original Message- From: help-glpk-bounces+4er=iems.northwestern@gnu.org [mailto:help-glpk- bounces+4er=iems.northwestern@gnu.org] On Behalf Of glpk xypron Sent: Tuesday, February 01, 2011 2:49 PM To: Aniket Karmarkar; help-glpk@gnu.org Subject: Re: [Help-glpk] execute concorde through cygwin command line Hello Aniket, this list is not on Concorde but on GLPK. http://www.tsp.gatech.edu/concorde/DOC/concorde_prog.html teaches: A short user's guide for most of the programs can be obtained by running the selected program without specifying any arguments (so, for example, entering concorde). For help on Concorde refer to the address given at http://www.tsp.gatech.edu/concorde/contact/contact.htm Best regards Xypron Original-Nachricht Datum: Tue, 1 Feb 2011 17:20:05 + (UTC) Von: Aniket Karmarkar karmarkarani...@gmail.com An: help-glpk@gnu.org Betreff: [Help-glpk] execute concorde through cygwin command line I am trying to use concorde to find the shortest distance in the traveling salesman problem. I have got the command line interface cygwin but when i execute concorde.exe I do not which options to specify so that I get the graph, the shortest tour and the distance. Any suggestions? I want to do the testing for a maximum of 400 nodes. ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Fwd: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java]
OptimJ does not link to glpk. To use glpk you download an examples set which includes a directory 'OptimJ samples - GLPK Binaries' which contains a compiled glpk 4.36 dll and a java jar file. The source to produce the java jar file is included in 'OptimJ 1.3.10 samples - GLPK\OptimJ samples - GLPK Binaries\src\com\ateji\optimj\glpkliba\LibraryLoader.java'. All the code and information to upgrade to glpk 4.45 is openly available. A better implementation would be if OptimJ provided an 'abstract java interface' which worked with any complient implementation, which could include glpk-java (using swig) or iajaar (not using swig) or their example (not using swig). - Original Message - From: Xypron xypron.g...@gmx.de To: chtimax maxcach...@gmail.com Cc: help-glpk@gnu.org Subject: Re: [Fwd: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java] Date: Wed, 19 Jan 2011 19:56:05 +0100 Hello Max, what is the license status of the generated code? Can it be published under GPL or does it contain nonfree code or link to some nonfree library? Dynamically binding non-free code to GPL code is not allowable under the GPL license. It would only be possible if the copyright holder chose to change the GLPK license. E.g. by adding the classpath extension (http://www.gnu.org/software/classpath/license.html) or by changing the license to LGPL. Best regards Xypron Andrew Makhorin wrote: Forwarded Message From: chtimaxmaxcach...@gmail.com To:Help-glpk@gnu.org Subject: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Wed, 19 Jan 2011 05:48:23 -0800 (PST) Hello Robie and All, Accept my apologies for the confusion in my previous message as I am not familiar with the terminology of free software. OptimJ is free in the monetary sense (no money changes hands) but not free in the sense of the FSF. Allow me to precise that OptimJ is a source-to-source generator (it takes high-level modeling code and generates Java source code) that does not link to any optimization library including glpk. Max ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk -- ___ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Fwd: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java]
On Wed, 19 Jan 2011, Andrew Makhorin wrote: Forwarded Message From: chtimax maxcach...@gmail.com To: Help-glpk@gnu.org Subject: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Wed, 19 Jan 2011 05:48:23 -0800 (PST) Hello Robie and All, Accept my apologies for the confusion in my previous message as I am not familiar with the terminology of free software. OptimJ is free in the monetary sense (no money changes hands) but not free in the sense of the FSF. Allow me to precise that OptimJ is a source-to-source generator (it takes high-level modeling code and generates Java source code) that does not link In this case, IIRC, the source code as defined by the GPL would not be the java, it would be the input to OptimJ. to any optimization library including glpk. Max -- Michael henne...@web.cs.ndsu.nodak.edu Pessimist: The glass is half empty. Optimist: The glass is half full. Engineer: The glass is twice as big as it needs to be. ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java]
Forwarded Message From: chtimax maxcach...@gmail.com To: Help-glpk@gnu.org Subject: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Wed, 19 Jan 2011 05:48:23 -0800 (PST) Hello Robie and All, Accept my apologies for the confusion in my previous message as I am not familiar with the terminology of free software. OptimJ is free in the monetary sense (no money changes hands) but not free in the sense of the FSF. Allow me to precise that OptimJ is a source-to-source generator (it takes high-level modeling code and generates Java source code) that does not link to any optimization library including glpk. Max Robbie Morrison wrote: Hello GLPK list I just applied to Ateji, via their website, for a copy of their free 'OptimJ' version. They kindly send me what is probably a Microsoft Windows security key, judging by the file extension, its binary contents, and their description, plus instructions for downloading the main archive. I think the Ateji team is being a little disingenuous on this one -- see the forwarded message immediately below. As far as I can tell, the free 'OptimJ' version is only free in the sense that no money changes hands -- it is not free in the Free Software Foundation sense: http://en.wikipedia.org/wiki/Free_Software_Definition I am not suggesting that Ateji is breaking the GNU GPLv3 through this process -- although I have no special knowledge in this regard. But it would help if Atieji could word their communications with a little more precision -- in particular, their response to Larry D'Agostino's inquiry, in my view, could be interpreted as misleading. best wishes Robbie To: help-glpk@gnu.org Subject: [Fwd: RE: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for Message-ID: 1295349022.3392.0.camel@none From:Andrew Makhorin m...@gnu.org Date:Tue, 18 Jan 2011 14:10:22 +0300 Forwarded Message From: chtimax maxcach...@gmail.com To: Help-glpk@gnu.org Subject: RE: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Tue, 18 Jan 2011 01:30:21 -0800 (PST) Coming back to Larry's question below, we have recently taken the decision to contribute OptimJ to the free software community. We are now offering a free OptimJ edition that includes our fully featured Java based modeling language for optimization along with lp_solve and GLPK solver links. More details on www.ateji.com/optimj Best Regards The Ateji team D'Agostino, Larry - TX wrote: Curious. Why is OptimJ released under a commercial license? It is based on Java, can be use as an Eclipse plug-in, and uses a number of free software or open source solvers. Is Optimj contributing back to the free software community? I don't mean to call you out on this just wondering why. Larry http://industrialengineertools.blogspot.com -Original Message- From: help-glpk-bounces+larry.d'agostino=gmacrescap@gnu.org [mailto:help-glpk-bounces+larry.d'agostino=gmacrescap@gnu.org] On Behalf Of Patrick Viry Sent: Thursday, April 02, 2009 8:52 AM To: help-glpk@gnu.org Subject: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Dear all, It is our pleasure to announce the availability of an OptimJ solver link for GLPK. OptimJ is a new Java-based algebraic modeling language with powerful constructs for data modeling and bulk data processing. Models are expressed in a high-level mathematical notation and benefit from all Java libraries and development tools. They can be deployed directly within any Java-based IT environment. You'll find more information at http://www.ateji.com/optimj.html, including whitepapers and code samples. You can also browse the newsletter archive at http://www.ateji.com/newsletter.html for specific topics. Questions and comments are welcome in the user forums at http://forums.ateji.com/. The software can be downloaded for evaluation at http://www.ateji.com/downloads.html. Free licences are available for teachers and students. Regards, The Ateji team. ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Re: [Fwd: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java]
Hello Max, what is the license status of the generated code? Can it be published under GPL or does it contain nonfree code or link to some nonfree library? Dynamically binding non-free code to GPL code is not allowable under the GPL license. It would only be possible if the copyright holder chose to change the GLPK license. E.g. by adding the classpath extension (http://www.gnu.org/software/classpath/license.html) or by changing the license to LGPL. Best regards Xypron Andrew Makhorin wrote: Forwarded Message From: chtimaxmaxcach...@gmail.com To:Help-glpk@gnu.org Subject: Re: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Wed, 19 Jan 2011 05:48:23 -0800 (PST) Hello Robie and All, Accept my apologies for the confusion in my previous message as I am not familiar with the terminology of free software. OptimJ is free in the monetary sense (no money changes hands) but not free in the sense of the FSF. Allow me to precise that OptimJ is a source-to-source generator (it takes high-level modeling code and generates Java source code) that does not link to any optimization library including glpk. Max ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: RE: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java]
Forwarded Message From: chtimax maxcach...@gmail.com To: Help-glpk@gnu.org Subject: RE: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Date: Tue, 18 Jan 2011 01:30:21 -0800 (PST) Coming back to Larry's question below, we have recently taken the decision to contribute OptimJ to the free software community. We are now offering a free OptimJ edition that includes our fully featured Java based modeling language for optimization along with lp_solve and GLPK solver links. More details on www.ateji.com/optimj Best Regards The Ateji team D'Agostino, Larry - TX wrote: Curious. Why is OptimJ released under a commercial license? It is based on Java, can be use as an Eclipse plug-in, and uses a number of free software or open source solvers. Is Optimj contributing back to the free software community? I don't mean to call you out on this just wondering why. Larry http://industrialengineertools.blogspot.com -Original Message- From: help-glpk-bounces+larry.d'agostino=gmacrescap@gnu.org [mailto:help-glpk-bounces+larry.d'agostino=gmacrescap@gnu.org] On Behalf Of Patrick Viry Sent: Thursday, April 02, 2009 8:52 AM To: help-glpk@gnu.org Subject: [Help-glpk] ANNOUNCEMENT: OptimJ solver link for GLPK/Java Dear all, It is our pleasure to announce the availability of an OptimJ solver link for GLPK. OptimJ is a new Java-based algebraic modeling language with powerful constructs for data modeling and bulk data processing. Models are expressed in a high-level mathematical notation and benefit from all Java libraries and development tools. They can be deployed directly within any Java-based IT environment. You'll find more information at http://www.ateji.com/optimj.html, including whitepapers and code samples. You can also browse the newsletter archive at http://www.ateji.com/newsletter.html for specific topics. Questions and comments are welcome in the user forums at http://forums.ateji.com/. The software can be downloaded for evaluation at http://www.ateji.com/downloads.html. Free licences are available for teachers and students. Regards, The Ateji team. ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: Re: [Help-glpk] reading Excel table into GLPK]
Forwarded Message From: Christina Cignarale christinamcignar...@gmail.com To: Noli Sicad nsi...@gmail.com Cc: CHRISTINA CIGNARALE (RIT Student) cmc4...@rit.edu, help-glpk@gnu.org Subject: Re: [Help-glpk] reading Excel table into GLPK Date: Thu, 9 Dec 2010 22:03:22 -0500 Hi, Thank everyone for your input. I put the table statement into the model file but, I am still getting an error. I was unsure how to define part of the statement for my problem. I referenced the soduku example that is posted. This is the model I am using set NUTR; set FOOD; param cost {FOOD} 0; param f_min {FOOD} = 0; param f_max {j in FOOD} = f_min[j]; param n_min {NUTR} = 0; param n_max {i in NUTR} = n_min[i]; param amt {NUTR,FOOD} = 0; table f IN 'ODBC' 'Driver={Microsoft Excel Driver (*.xls)};dbq=newdiet.xls' 'SELECT * FROM [Nutr$]' NUTR - [NUTR],n_min,n_max; var Buy {j in FOOD} = f_min[j], = f_max[j]; minimize Total_Cost: sum {j in FOOD} cost[j] * Buy[j]; subject to Diet {i in NUTR}: n_min[i] = sum {j in FOOD} amt[i,j] * Buy[j] = n_max[i]; The highlited line is where I am getting the error. I know I do not have a WHERE statement but I was unsure how to include that. Thank you for your help, Christina On Mon, Dec 6, 2010 at 5:18 PM, Noli Sicad nsi...@gmail.com wrote: Browse glpk-help archive [[1] about Excel and GLPK. It has 10 pages about Excel and MathProg. [1] http://www.mail-archive.com/search?q=Excell=help-g...@gnu.orgo=relevancestart=0 Noli On 12/7/10, glpk xypron xypron.g...@gmx.de wrote: Hello Christina, please, have a look at http://sourceforge.net/projects/winglpk/ The distribution includes example files glpk-4.44/examples/sql/sudoku_excel.mod and glpk-4.44/examples/sql/sudoku_xls Please, read http://en.wikibooks.org/wiki/GLPK/ODBC#Microsoft_Excel Best regards Xypron -- Christina Cignarale ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: Re: [Help-glpk] reading Excel table into GLPK]
Forwarded Message From: Christina Cignarale christinamcignar...@gmail.com To: Noli Sicad nsi...@gmail.com Cc: CHRISTINA CIGNARALE (RIT Student) cmc4...@rit.edu, help-glpk@gnu.org Subject: Re: [Help-glpk] reading Excel table into GLPK Date: Fri, 10 Dec 2010 00:27:28 -0500 Hi Noli, I am using Windows XP. The Sodoku example did not work for me. The error I got when I ran that was Reading ti ... unable to open libiodbc.so can't open the module I'm using version 4.34 of GLPK. And the other parameters should be contained on the other sheets in that workbook.Thank you so much for your help. I am used to solving in AMPL and I do not have that much computer knowledge so it makes it hard sometimes to understand the instructions for GLPK. Also, how would I post the complete log? The only way I know to copy a command prompt is to use print screen. Is there an easier way? -Christina On Fri, Dec 10, 2010 at 12:07 AM, Noli Sicad nsi...@gmail.com wrote: I think the error is pointing on ODBC Context: {NUTR, FOOD} = 0; table f IN '...'...'...' NUTR - in param amt {NUTR,FOOD} = 0; table f IN 'ODBC' Have you run the Soduku excel example and got the right result? Are you using Windows XP or 7? BTW, where are the other parameters amt[i,j] and cost[1] tables in the model? Please post the complete log start with GLPSOL: GLPK LP/MIP Solver, v4.44 to the error Example: GLPSOL: GLPK LP/MIP Solver, v4.44 Parameter(s) specified in the command line: --cover --clique --gomory --mir -m EstateModel_sqlite3_1_Otago2_25.mod Reading model section from EstateModel_sqlite3_1_Otago2_25.mod... EstateModel_sqlite3_1_Otago2_25.mod:803: warning: unexpected end of file; missing end statement inserted 803 lines were read Reading tab... Connected to SQLite 3.6.22 - Otago_p.sqlite SELECT * FROM tblSpecies Display statement at line 203 SPECIES: '???' FIR OTH RAD ... Noli On 12/10/10, Christina Cignarale christinamcignar...@gmail.com wrote: The error I am receiving is: diettable.mod 16:argument expression has invalid type Context: {NUTR, FOOD} = 0; table f IN '...'...'...' NUTR - I also attached the excel file I am trying to read from. On Thu, Dec 9, 2010 at 10:03 PM, Christina Cignarale christinamcignar...@gmail.com wrote: Hi, Thank everyone for your input. I put the table statement into the model file but, I am still getting an error. I was unsure how to define part of the statement for my problem. I referenced the soduku example that is posted. This is the model I am using set NUTR; set FOOD; param cost {FOOD} 0; param f_min {FOOD} = 0; param f_max {j in FOOD} = f_min[j]; param n_min {NUTR} = 0; param n_max {i in NUTR} = n_min[i]; param amt {NUTR,FOOD} = 0; table f IN 'ODBC' 'Driver={Microsoft Excel Driver (*.xls)};dbq=newdiet.xls' 'SELECT * FROM [Nutr$]' NUTR - [NUTR],n_min,n_max; var Buy {j in FOOD} = f_min[j], = f_max[j]; minimize Total_Cost: sum {j in FOOD} cost[j] * Buy[j]; subject to Diet {i in NUTR}: n_min[i] = sum {j in FOOD} amt[i,j] * Buy[j] = n_max[i]; The highlited line is where I am getting the error. I know I do not have a WHERE statement but I was unsure how to include that. Thank you for your help, Christina On Mon, Dec 6, 2010 at 5:18 PM, Noli Sicad nsi...@gmail.com wrote: Browse glpk-help archive [[1] about Excel and GLPK. It has 10 pages about Excel and MathProg. [1] http://www.mail-archive.com/search?q=Excell=help-g...@gnu.orgo=relevancestart=0 Noli On 12/7/10, glpk xypron xypron.g...@gmx.de wrote: Hello Christina, please, have a look at http://sourceforge.net/projects/winglpk/ The distribution includes example files glpk-4.44/examples/sql/sudoku_excel.mod and glpk-4.44/examples/sql/sudoku_xls Please, read http://en.wikibooks.org/wiki/GLPK/ODBC#Microsoft_Excel Best regards Xypron
Re: [Fwd: Re: [Help-glpk] reading Excel table into GLPK]
Hello Christina, I am using Windows XP. unable to open libiodbc.so looks like you are using a version of GLPK that was compiled with Cytrix or MinGW (e.g. from gnuwin32.sourceforge.net/packages/glpk.htm). Consider downloading GLPK for Windows from http://sourceforge.net/projects/winglpk/ Best regards Xypron Forwarded Message From: Christina Cignarale christinamcignar...@gmail.com Subject: Re: [Help-glpk] reading Excel table into GLPK Date: Fri, 10 Dec 2010 00:27:28 -0500 Hi Noli, I am using Windows XP. The Sodoku example did not work for me. The error I got when I ran that was Reading ti ... unable to open libiodbc.so can't open the module I'm using version 4.34 of GLPK. And the other parameters should be contained on the other sheets in that workbook.Thank you so much for your help. I am used to solving in AMPL and I do not have that much computer knowledge so it makes it hard sometimes to understand the instructions for GLPK. Also, how would I post the complete log? The only way I know to copy a command prompt is to use print screen. Is there an easier way? -Christina On Fri, Dec 10, 2010 at 12:07 AM, Noli Sicad nsi...@gmail.com wrote: I think the error is pointing on ODBC Context: {NUTR, FOOD} = 0; table f IN '...'...'...' NUTR - in param amt {NUTR,FOOD} = 0; table f IN 'ODBC' Have you run the Soduku excel example and got the right result? Are you using Windows XP or 7? BTW, where are the other parameters amt[i,j] and cost[1] tables in the model? Please post the complete log start with GLPSOL: GLPK LP/MIP Solver, v4.44 to the error Example: GLPSOL: GLPK LP/MIP Solver, v4.44 Parameter(s) specified in the command line: --cover --clique --gomory --mir -m EstateModel_sqlite3_1_Otago2_25.mod Reading model section from EstateModel_sqlite3_1_Otago2_25.mod... EstateModel_sqlite3_1_Otago2_25.mod:803: warning: unexpected end of file; missing end statement inserted 803 lines were read Reading tab... Connected to SQLite 3.6.22 - Otago_p.sqlite SELECT * FROM tblSpecies Display statement at line 203 SPECIES: '???' FIR OTH RAD ... Noli On 12/10/10, Christina Cignarale christinamcignar...@gmail.com wrote: The error I am receiving is: diettable.mod 16:argument expression has invalid type Context: {NUTR, FOOD} = 0; table f IN '...'...'...' NUTR - I also attached the excel file I am trying to read from. On Thu, Dec 9, 2010 at 10:03 PM, Christina Cignarale christinamcignar...@gmail.com wrote: Hi, Thank everyone for your input. I put the table statement into the model file but, I am still getting an error. I was unsure how to define part of the statement for my problem. I referenced the soduku example that is posted. This is the model I am using set NUTR; set FOOD; param cost {FOOD} 0; param f_min {FOOD} = 0; param f_max {j in FOOD} = f_min[j]; param n_min {NUTR} = 0; param n_max {i in NUTR} = n_min[i]; param amt {NUTR,FOOD} = 0; table f IN 'ODBC' 'Driver={Microsoft Excel Driver (*.xls)};dbq=newdiet.xls' 'SELECT * FROM [Nutr$]' NUTR - [NUTR],n_min,n_max; var Buy {j in FOOD} = f_min[j], = f_max[j]; minimize Total_Cost: sum {j in FOOD} cost[j] * Buy[j]; subject to Diet {i in NUTR}: n_min[i] = sum {j in FOOD} amt[i,j] * Buy[j] = n_max[i]; The highlited line is where I am getting the error. I know I do not have a WHERE statement but I was unsure how to include that. Thank you for your help, Christina On Mon, Dec 6, 2010 at 5:18 PM, Noli Sicad nsi...@gmail.com wrote: Browse glpk-help archive [[1] about Excel and GLPK. It has 10 pages about Excel and MathProg. [1] http://www.mail-archive.com/search?q=Excell=help-g...@gnu.orgo=relevancestart=0 Noli On 12/7/10, glpk xypron xypron.g...@gmx.de wrote: Hello Christina, please, have a look at http://sourceforge.net/projects/winglpk/
Fwd: Re: [Help-glpk] Compiling for 64bit Windows with Visual Studio Express 2010
I am using Visual Studio Professional, not the Express edition but I believe they both require the following changes to the batch files. After those changes, I was able to compile without any problems. rem NOTE: Make sure that HOME variable specifies correct path where Visual Studio is installed, so following line has to be adapted to your computer set HOME=C:\Program Files (x86)\Microsoft\Visual Studio 10.0\VC rem this is the new batch file to set all paths to include files and libraries, it requires identification of the target machine call c:vcvarsall.bat x64 rem remainder has not been changed copy config_VC config.h c:nmake.exe /f Makefile_VC_DLL c:nmake.exe /f Makefile_VC_DLL check Marc On 24-Sep-10 8:32 AM, Nigel Galloway wrote: Any Visual Studio edition will have a Terminal (Command Line) application. If you run the compile script from this application (or run this application with the script as a parameter) it will set the environment variables suitable for the sysytem, without the script calling vcvars or anything else. Would it not be more usual to use NMAKE for these things? - Original Message - From: glpk xypronxypron.g...@gmx.de To: Help Glpkhelp-glpk@gnu.org Subject: [Help-glpk] Compiling for 64bit Windows with Visual Studio Express 2010 Date: Thu, 23 Sep 2010 21:19:03 +0200 Using Visual Studio 2010 beta I was able to compile with the provided batch file Build_Glpk_with_VC10_DLL.bat. With Visual Studio Express 2010 and Windows SDK 7.1 installed the script fails due to missing batch file C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat Replacing call %HOME%\vcvarsall.bat x64 by CALL C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd /x64 solved the problem for me. I would be happy if other GLPK users could verify that this will work for them too. Best regards Xypron -- GRATIS: Spider-Man 1-3 sowie 300 weitere Videos! Jetzt freischalten! http://portal.gmx.net/de/go/maxdome ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk -- Marc Goetschalckx Industrial and Systems Engineering Georgia Institute of Technology, Atlanta, GA, USA -- Marc Goetschalckx Industrial and Systems Engineering Georgia Institute of Technology, Atlanta, GA, USA ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Fwd: Re: [Help-glpk] Mathprog question
Hello Andrew, currently in GMPL there is no way to retrieve an element of a symbolic set by a logical condition. In the example below I am able to sort the values x{I}, but I am unable to output the indices sorted by the values. One way to add such a functionality would be functions Max{ domain } tuple Min{ domain } tuple Then I could write param a, symbolic := Max{ i in I : x[i] = 3 } i; to retrieve a special element of a set. Or the following restricition could be removed: implementation restriction; in/within setof{} not allowed. Best regards Xypron Original-Nachricht Datum: Sat, 12 Dec 2009 12:57:22 -0800 (PST) Von: xypron An: Help-glpk@gnu.org Betreff: Re: [Help-glpk] Mathprog question Hello Jeffrey, see example below. Unfortunately sorted output requires O(n^3) time. Best regards Xypron set I; param a{I} := Uniform01(); var x{I}; s.t. c{i in I}: a[i] = x[i]; solve; printf unsorted\n; for{i in I} printf %10s: %f\n, i, x[i]; printf decreasing order\n; for{i in (0..(card(I)-1))} { printf %d: %f\n, i+1, sum{j in I : i == sum{ k in I : x[j]x[k] || ( x[j]==x[k] j k )} 1 } x[j]; } printf increasing order\n; for{i in (0..(card(I)-1))} { printf %d: %f\n, i+1, sum{j in I : i == sum{ k in I : x[k]x[j] || ( x[k]==x[j] k j )} 1 } x[j]; } data; set I := ape bear crocodile elefant lion snake tiger zebra; end; Jeffrey Kantor wrote: Hi all -- I'm struggling to come up with a way to print a list ordered by the value of a solved variable. I have var start{TASKS}; solve; and now I'd like to print the tasks ordered by the value of the start variables. Perhaps I'm just not thinking clearly, but is there a simple way to do this? Jeff -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Re: Fwd: Re: [Help-glpk] Mathprog question
Hi Xypron, currently in GMPL there is no way to retrieve an element of a symbolic set by a logical condition. In the example below I am able to sort the values x{I}, but I am unable to output the indices sorted by the values. One way to add such a functionality would be functions Max{ domain } tuple Min{ domain } tuple Then I could write param a, symbolic := Max{ i in I : x[i] = 3 } i; to retrieve a special element of a set. Probably you mean something like argmax{(i,j,k) in IJK} x[i,j,k] which should return some tuple (i,j,k), don't you? The problem is that the glpk mathprog implementation is quite naive. The translator performs evaluation of model objects exactly in the same way as written. For example, the statement: s.t. y{i in I} := sum{(i,j) in S: a[i,j] = 0} a[i,j] * x[j]; is evaluated as follows: for i in I do { y[i] := 0; for (i,j) in S do { if a[i,j] = 0 then y[i] := y[i] + a[i,j] * x[j]; } } that needs to scan entire S in the innermost loop. If S is large and sparse, it'd be much more efficient to evaluate as follows: for i in I do y[i] := 0; for (i,j) in S do { if a[i,j] = 0 then y[i] := y[i] + a[i,j] * x[j]; } However, in the current implementation it is impossible to optimize the bytecode by changing the order of operations, creating some additional indices for indexed objects, etc. Or the following restricition could be removed: implementation restriction; in/within setof{} not allowed. This would require evaluation of setof{} every time the condition is checked. It is impossible to implement this efficiently. Andrew Makhorin ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
[Fwd: Re: [Help-glpk] Gusek : a GLPK IDE for Windows]
Hello again, Andrew. Hi All. I need some opinions. Actually Gusek use the following associations with common language actions: - Compile = Check GMPL sintax (--check) - Build = Generate Cplex LP from GMPL (--wcpxlp) - (build expanded equations, like a CTRL+G on lingo) - Go = Run GMPL Model And MPS Build is another option, a not associated command. What associations you (and maybe someone) point to make clear the use of GMPL, MPS and CPLEX LP format? I think in disable the build command and use Build Cplex LP not associated, like Build MPS (or toggle build and compile and disable compile command). This associations are useful to preserve SciTE format (and SciTE users can reuse only the Gusek configuration files to run GLPK models). Other question: what MPS format should Gusek associate to MPS files by default (open and generate MPS files)? Free o Fixed MPS? Thanks!!! Luiz Bettoni 3. I think that gusek should also support files in mps and, especially, in cplex lp formats, not only mathprog files. Ok, i'll do this. Actually you can run the mps and lp files, but the syntax lexer has some problems. Build a mps from a lp may be useful too, right? ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk
Fwd: Re: [Help-glpk] MySQL Support for GLPK 4.23
Hi Heinrich, Thank you for your efforts. I think the table feature is too sophisticated. Probably it is reasonable to have it in AMPL, which is a more or less full-featured programming language (unlike its earlier versions). However, I would like to keep MathProg being a declarative, not procedural language. So it seems to me that it would be sufficient to implement the following two statements: read and write. The read statement is the following: read s, p1, p2, ..., pn from data definition ; where s is a set (may be omitted), p1, p2, ..., pn are parameters, data definition defines a text file, select query, etc. It is assumed that data for this statement is coded as a table: i11 i12 ... i1m v11 v12 ... v1n i21 i22 ... i2m v21 v22 ... v2n . . . where (ik1, ik2, ..., ikm) is m-tuple, which being read is added to set s and used as index for corresponding parameters, vk1, ..., vkn are values of parameter members. The write statement is similar to the printf statement: write {...} e1, e2, ..., en to data definition ; where e1, e2, ..., en are expressions. What do you think about this? Best regards, Andrew Makhorin ___ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk