Skip to content

Commit 64b1a8b

Browse files
committed
ACOTSP b.0.1.0
FUNCIONÓOOOOOOOOO. No tengo ni ánimos de estar documentando esto...
1 parent 25b5352 commit 64b1a8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

algorithm.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ void ACOTSP::Simulate()
1919
for (i = 1; i <= antsAmount; i++)
2020
{
2121
// Coloca la hormiga en una ciudad aleatoria:
22-
firstCity = rand() % (cities) + 1;
22+
firstCity = rand() % (cities);
2323
vector<int> path = {};
2424
path.push_back(firstCity);
25-
for (int x = 1; x < cities; x++)
25+
for (int x = 0; x < cities; x++)
2626
path.push_back(-1);
2727
paths.push_back(path);
2828
}
@@ -95,8 +95,8 @@ void ACOTSP::Simulate()
9595
pathsProbability.push_back(probability);
9696
}
9797
}
98-
cout<<"Actual:"<<actualCity<<"; Incial: "<<firstCity<<"; ";
99-
cout<<probability<<"Con "<<disponibles.size()<<endl;
98+
// cout<<"Actual:"<<actualCity<<"; Incial: "<<firstCity<<"; ";
99+
// cout<<probability<<"Con "<<disponibles.size()<<endl;
100100
double suma = 0;
101101
for (int ix = 0; ix < pathsProbability.size(); ix++)
102102
{

main.exe

-792 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)