23#include <gsl/gsl_rng.h>
29int main(
int argc,
char **argv) {
36 fprintf(stderr,
"Usage: %s <file name> <max iter>\n", argv[0]);
41 rng = gsl_rng_alloc(gsl_rng_mt19937);
42 gsl_rng_set(rng, time(0));
45 max_iter = atoi(argv[2]);
48 p = newProblem(argv[1]);
53 mincost = getObjectiveValue(getSolverSolution(ss));
54 printf(
"iter = 0, obj = %.0f\n", mincost);
55 for (i = 0; i < max_iter; i++) {
57 cost = getObjectiveValue(getSolverSolution(ss));
60 printf(
"iter = %d, obj = %.0f\n", i+1, mincost);
65 printSolution(getSolverSolution(ss));