[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] How can I use functions in glptsp.c to solve TSPs using
Re: [Help-glpk] How can I use functions in glptsp.c to solve TSPs using glpk?
Tue, 29 Sep 2009 13:32:22 -0700 (PDT)
tsp_read_data() is not part of the documented API (see doc/glpk.pdf).
For teaching purposes a good idea would be to provide the example as a CSV
and read it with command "table IN" inside a gmpl model (see
Only a few changes to examples/tsp.mod are needed:
How to output a SVG graphic from glpsol is shown in
> I saw that glpk's distribution includes glptsp.c and glptsp.h (that look
> undocumented, by the way). These files seem to provide only routines to
> read data from a TSPLIB file and to compute the distance between two
> cities. How can I use these in combination with the other functions
> included in glpk to actually solve a tsp instance?
> I would like to do something like:
> TSP *tsp = tsp_read_data("berlin52.tsp");
> glp_intopt(tsp, some_params);
> but clearly glp_intopt needs another type of data as problem descriptor
> Is there any way to do something similar?
> ... or a script to convert the TSPLIB format in GMLP?
> (by the way, I know that glpk is not a good option to solve large TSP
> instances, but I need it for teaching purposes)
View this message in context:
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
- Re: [Help-glpk] How can I use functions in glptsp.c to solve TSPs using glpk?,