Skip to content

Commit

Permalink
alteracoes
Browse files Browse the repository at this point in the history
  • Loading branch information
manoelstilpen committed Nov 21, 2017
1 parent 0f1b941 commit d7b7b1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Constructives/ConstructiveGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Solution ConstructiveGraph::apply(){

initialSolution = dispatch_rule->refinement(initialSolution);

cout << eval.evaluate_by_graph(initialSolution) << endl;
//cout << eval.evaluate_by_graph(initialSolution) << endl;

return initialSolution;
}
Expand Down
15 changes: 8 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,17 @@ int main(int argc, char** argv){

clock_t begin = clock();

Evaluator eval(instance);

ConstructiveGraph constructive(instance, alpha_grasp);
Solution s = constructive.apply();
SimulatedAnnealing vns(s);
cout << "Constructive: " << eval.evaluate_by_graph(s) << endl;

VariableNeighborhoodSearch vns(s);
s = vns.apply();
cout << endl << "VNS: " << eval.evaluate_by_graph(s) << endl;
// s.print_solution();

Evaluator eval(instance);
cout << eval.evaluate_by_graph(s) << endl;
/* s.print_solution();
s.getGraph().printGraph();
s.getGraph().bellmanFord(); */

/* if(movement.compare("sprt") == 0){
GraspSPRT grasp(instance, alpha_grasp);
Expand Down Expand Up @@ -163,7 +164,7 @@ clock_t begin = clock();
clock_t end = clock();
double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;

//cout << elapsed_secs << endl;
cout << elapsed_secs << endl;

return 0;
}

0 comments on commit d7b7b1a

Please sign in to comment.