help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: [Help-glpk] A suggestion concerning a new option


From: Pietro Scionti
Subject: R: [Help-glpk] A suggestion concerning a new option
Date: Mon, 15 Feb 2010 15:34:17 +0100

________________________________________
Da: Andrew Makhorin address@hidden
Inviato: lunedì 15 febbraio 2010 14.05
A: Pietro Scionti
Cc: address@hidden
Oggetto: Re: [Help-glpk] A suggestion concerning a new option

>> I'm working with the code in these days to add a new option, that I
>> tentatively called "outlp": it allows the user to write the solution
>> of the LP relaxation to file, before entering the MIP solver.
>> It is a feature I would really like to see implemented: I mostly
>> work with hard instances (unfortunately), and so sometimes when I see
>> that the solver is not giving me an answer in a reasonable amount of
>> time it is useful to at least work on the non-integer optimal solution.
>> The only way I know to do that now is use the --nomip option, save
>> the solution to file and then solve everything back again without
>> --nomip, which almost doubles the time spent.
>
>> The way I thought of it, I edited the routine glp_main, added a new
>> member, "const char out_lp" to the csa struct and then triggered the
>> lpx_print_sol in two different regions: for the no presolve case, in
>> the problem solution region (the one which now starts at line 1032),
>> after the glp_simplex call of glp_main (file glpapi20.c) and, for the
>> presolve case, before the resolution of the transformed mip in the
>> preprocess_and_solve_mip routine (around line 390), file glpapi09.c.
>> However, everything is not smooth yet, so before I waste any more
>> time, do you think there is a cleverer way to do it? Or a workaround
>> that doesn't involve cutting the code?
>
>I could suggest the following. At first you solve lp relaxation and
>save the optimal basic solution found in a file using --nomip and -w
>options; you also can write the solution in a printable format using
>-o option. Then you run glpsol with options --nointopt and --ini, in
>which case it starts from the optimal basis previously saved. This
>would allow you not to solve lp relaxation twice.


I did think of something like that, but I erroneously tried the -r option and 
got stuck immediately.
This kind of solution is not what I hope for (because, say, if I let my 
computer work during the night, in the morning I would find out it stayed idle 
for hours because the lp solution was found in relatively little time, while 
the mip part is always the busiest), but at least it saves me the time to 
re-solve the lp, so thank you very much, Andrew.

Pietro


Archimede S.r.l.
Sede Legale:
Via Manzoni, 82
Ponte S. Giovanni

Sede Operativa e Amministrativa:
Via Settevalli, 133/v
06128 Perugia

P.IVA: 01992020543

Tel.  075 515 22 11
Fax. 075 515 22 99
www.archinet.it

**********************************************************************************************************************************************************************************************************************
La presente comunicazione, con le informazioni in essa contenute e ogni 
documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' 
indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i 
destinatari/autorizzati siete avvisati che qualsiasi azione, copia, 
comunicazione, divulgazione o simili basate sul contenuto di tali informazioni 
e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 
Codice in materia di protezione dei dati personali). Se avete ricevuto questa 
comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e 
di distruggere il messaggio originale e ogni file allegato senza farne copia 
alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are 
confidential and/or may contain legally privileged information. If you have 
received this message by mistake or are not one of the addressees above, you 
may take no action based on it, and you may not copy or show it to anyone; 
please reply to this e-mail and point out the error which has occurred.
**********************************************************************************************************************************************************************************************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]