I'm interested in something similar, I'm not quite sure if it is possible to do in GMPL, but it would certainly be nice:
Consider that you have a problem to solve, which is too hard considering MIP capabilities. I would like to do, in GMPL, some (heuristic) like: Split problem P into P1, P2 ... Pn Solve P1 Solve P2 .... Solve Pn merge solution of P1 ... Pn to provide a solution to P Is there any way to do it ? Thanks, Haroldo On Fri, Jul 9, 2010 at 4:48 PM, Jeffrey Kantor <[email protected]> wrote: > Hi Marc, > Exactly. I appreciate Xypron's suggestion, but would much prefer to embed > the logic directly in GMPL. Seems to me even an elementary ability to loop > and introduce conditionals in the solution process would open a wide range > of applications to GMPL/GLPK. > Jeff > > On Fri, Jul 9, 2010 at 3:43 PM, Meketon, Marc <[email protected]> > wrote: >> >> This reminds me that at the very top of my "wish" list for GLPK is a >> control language for GMPL. Something to experiment with various >> decomposition methods, column generation, and so on. >> >> -Marc >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of >> glpk xypron >> Sent: Friday, July 09, 2010 3:37 PM >> To: Jeffrey Kantor; [email protected] >> Subject: Re: [Help-glpk] Parametric studies in GMPL? >> >> Hello Jeffy, >> >> you can use a shell script. >> >> Here is a minimalistic example. Save the following as file test.awk >> >> BEGIN { >> modfile = "test.mod"; >> datfile = "test.dat"; >> system("rm " modfile); >> printf ("Writing model file\n"); >> printf ("#model file\n") > modfile; >> printf ("param iter;\n") > modfile; >> printf ("solve;\n") > modfile; >> printf ("display iter;\n") > modfile; >> printf ("end;\n") > modfile; >> close(modfile); >> for (i = 1; i <= 10; i++) { >> system("rm " datfile); >> printf("\n\nIteration %i\n",i); >> printf ("Writing data file\n"); >> printf("#data file %i\n", i) > datfile; >> printf("data;\n") > datfile; >> printf("param iter := %i;\n", i) > datfile; >> printf("end;\n") > datfile; >> close(datfile); >> system("glpsol -m " modfile " -d " datfile); >> } >> exit; >> } >> >> >> Run the script with >> >> awk -f test.awk >> >> Windows users can find a binary for awk at >> http://gnuwin32.sourceforge.net/packages/gawk.htm >> For Windows replace "rm " by "del ". >> >> Please, observe that glpsol allows multiple data files, >> so you could have one with the changing parameter and another >> with the rest of your model data. >> >> Best regards >> >> Xypron >> >> -------- Original-Nachricht -------- >> > Datum: Fri, 9 Jul 2010 09:15:19 -0400 >> > Betreff: [Help-glpk] Parametric studies in GMPL? >> >> > Hi -- >> > >> > I'd like to be able to parametric studies in GMPL. In other words, do a >> > simple loop over a range of parameter values with the solve statement >> > inside >> > the loop. To the best of my knowledge this is not currently possible, >> > or >> > is >> > it? If not, could this be a feature that could be incorporated into >> > GMPL >> > at >> > some point? >> > >> > 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 >> [email protected] >> http://lists.gnu.org/mailman/listinfo/help-glpk >> >> ---------------------------------------------------------------------------- >> This e-mail and any attachments may be confidential or legally privileged. >> If you received this message in error or are not the intended recipient, >> you should destroy the e-mail message and any attachments or copies, and you >> are prohibited from retaining, distributing, disclosing or using any >> information contained herein. Please inform us of the erroneous delivery by >> return e-mail. >> >> Thank you for your cooperation. >> >> ---------------------------------------------------------------------------- >> > > > _______________________________________________ > Help-glpk mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-glpk > > -- ============================================================= Haroldo Gambini Santos Computing Department - Universidade Federal de Ouro Preto - UFOP email: haroldo [at ] iceb.ufop.br home/research page: http://www.iceb.ufop.br/decom/prof/haroldo/ "Computer science is no more about computers than astronomy is about telescopes." Edsger Dijkstra _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
