small code modifications and pdf of the lessons added

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@546 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jboisson 2007-07-05 12:43:05 +00:00
commit d6fdf10ca5
6 changed files with 25 additions and 24 deletions

View file

@ -21,10 +21,9 @@
#include <two_opt_next.h>
#include <two_opt_incr_eval.h>
int main (int __argc, char * __argv []) {
int
main (int __argc, char * __argv [])
{
if (__argc != 2) {
std :: cerr << "Usage : ./hill_climbing [instance]" << std :: endl ;

Binary file not shown.

Binary file not shown.

View file

@ -22,21 +22,22 @@
#include <two_opt_incr_eval.h>
#include <two_opt_tabu_list.h>
int main (int __argc, char * __argv []) {
if (__argc != 2) {
std :: cerr << "Usage : ./tabu_search [instance]" << std :: endl ;
return 1 ;
}
int
main (int __argc, char * __argv [])
{
if (__argc != 2)
{
std :: cerr << "Usage : ./tabu_search [instance]" << std :: endl ;
return 1 ;
}
Graph :: load (__argv [1]) ; // Instance
Route route ; // Solution
RouteInit init ; // Sol. Random Init.
init (route) ;
RouteEval full_eval ; // Full. Eval.
full_eval (route) ;
@ -61,9 +62,9 @@ int main (int __argc, char * __argv []) {
moTS <TwoOpt> tabu_search (two_opt_init, two_opt_next, two_opt_incr_eval, tabu_list, aspir_crit, cont, full_eval) ;
tabu_search (route) ;
std :: cout << "[To] " << route << std :: endl ;
return 0 ;
}

Binary file not shown.

View file

@ -20,14 +20,15 @@
#include <two_opt_rand.h>
#include <two_opt_incr_eval.h>
int main (int __argc, char * __argv []) {
if (__argc != 2) {
std :: cerr << "Usage : ./simulated_annealing [instance]" << std :: endl ;
return 1 ;
}
int
main (int __argc, char * __argv [])
{
if (__argc != 2)
{
std :: cerr << "Usage : ./simulated_annealing [instance]" << std :: endl ;
return 1 ;
}
Graph :: load (__argv [1]) ; // Instance
Route route ; // Solution