Skip to content

Commit

Permalink
Merge pull request #1 from A1-04/development
Browse files Browse the repository at this point in the history
Cost added in the output file
  • Loading branch information
JuanMena1 authored Nov 9, 2018
2 parents 157305b + 8973fc2 commit b884091
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
Binary file modified bin/presentation/P3.class
Binary file not shown.
86 changes: 85 additions & 1 deletion output.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,88 @@
-- Solution of the algorithm:

Go from node 3096311483 to node 3107942087
Go from node 3107942087 to node 3107942086
Go from node 3107942086 to node 3096311479
Go from node 3096311479 to node 3107942099
Go from node 3107942099 to node 3107942100
Go from node 3107942100 to node 3107942101
Go from node 3107942101 to node 3096311483
Go from node 3096311483 to node 3107942087
Go from node 3107942087 to node 3107942086
Go from node 3107942086 to node 3096311479
Go from node 3096311479 to node 3107942099
Go from node 3107942099 to node 3107942100
Go from node 3107942100 to node 3107942101
Go from node 3107942101 to node 3096311494
Go from node 3096311494 to node 3096311509
Go from node 3096311509 to node 3096311513
Go from node 3096311513 to node 3107942106
Go from node 3107942106 to node 3107942112
Go from node 3107942112 to node 3107942108
Go from node 3107942108 to node 3107976772
Go from node 3107976772 to node 3096311502
Go from node 3096311502 to node 30948790
Go from node 30948790 to node 2320161782
Go from node 2320161782 to node 2320161776
Go from node 2320161776 to node 2320161781
Go from node 2320161781 to node 2318782986
Go from node 2318782986 to node 2322798790
Go from node 2322798790 to node 2318782999
Go from node 2318782999 to node 2318783016
Go from node 2318783016 to node 3096311516
Go from node 3096311516 to node 3250028311
Go from node 3250028311 to node 2322798808
Go from node 2322798808 to node 3250028303
Go from node 3250028303 to node 3250028310
Go from node 3250028310 to node 3096311506
Go from node 3096311506 to node 3107942105
Go from node 3107942105 to node 3107942122
Go from node 3107942122 to node 3096311520
Go from node 3096311520 to node 3096311519
Go from node 3096311519 to node 2322798835
Go from node 2322798835 to node 2322798827
Go from node 2322798827 to node 2318783018
Go from node 2318783018 to node 2140262679
Go from node 2140262679 to node 2140262677
Go from node 2140262677 to node 2320161773
Go from node 2320161773 to node 2322798758
Go from node 2322798758 to node 2322798771
Go from node 2322798771 to node 2322798748
Go from node 2322798748 to node 2320161769
Go from node 2320161769 to node 2318782974
Go from node 2318782974 to node 2320161724
Go from node 2320161724 to node 2320161692
Go from node 2320161692 to node 2322798736
Go from node 2322798736 to node 5059911042
Go from node 5059911042 to node 5059911040
Go from node 5059911040 to node 5059911033
Go from node 5059911033 to node 5059911034
Go from node 5059911034 to node 3107976737
Go from node 3107976737 to node 2140262670
Go from node 2140262670 to node 3250028295
Go from node 3250028295 to node 3250028294
Go from node 3250028294 to node 2320161688
Go from node 2320161688 to node 2318782947
Go from node 2318782947 to node 2320161693
Go from node 2320161693 to node 2320161695
Go from node 2320161695 to node 2320161715
Go from node 2320161715 to node 2320161764
Go from node 2320161764 to node 2320161765
Go from node 2320161765 to node 2320161771
Go from node 2320161771 to node 2320161766
Go from node 2320161766 to node 2318740677
Go from node 2318740677 to node 3241430668
Go from node 3241430668 to node 3096311493
Go from node 3096311493 to node 3096311486
Go from node 3096311486 to node 3096311485
Go from node 3096311485 to node 3096311484
Go from node 3096311484 to node 3096311483
Go from node 3096311483 to node 3107942087
Go from node 3107942087 to node 3107942086
Go from node 3107942086 to node 3096311479
Go from node 3096311479 to node 3107942099
Go from node 3107942099 to node 3107976761
Go from node 3107976761 to node 3107976760

Cost of the solution: 0.0
Cost of the solution: 548639.6
Depth of the solution: 83
4 changes: 3 additions & 1 deletion src/presentation/P3.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public static void toFile(LinkedList<TreeNode> solution, Problem p) {
solution_cost += solution.get(i).getPathcost() + solution.get(i + 1).getPathcost();
}
fw.write(System.lineSeparator());
fw.write("Cost of the solution: " + solution_cost);
fw.write("Cost of the solution: " + solution_cost );
fw.write(System.lineSeparator());
fw.write("Depth of the solution: " + solution.get(solution.size()-1).getD());
}

fw.close();
Expand Down

0 comments on commit b884091

Please sign in to comment.