[Top][All Lists]

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

[Help-glpk] How can I use functions in glptsp.c to solve TSPs using glpk

From: ikarus
Subject: [Help-glpk] How can I use functions in glptsp.c to solve TSPs using glpk?
Date: Tue, 29 Sep 2009 23:22:47 +0400

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

reply via email to

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