Browse Source

v1.1

master
parent
commit
81c1eb5ec1
  1. BIN
      .vs/comivoyar/v15/.suo
  2. BIN
      .vs/comivoyar/v15/Server/sqlite3/storage.ide-shm
  3. BIN
      .vs/comivoyar/v15/Server/sqlite3/storage.ide-wal
  4. 24
      comivoyar/Program.cs
  5. BIN
      comivoyar/bin/Debug/comivoyar.exe
  6. BIN
      comivoyar/bin/Debug/comivoyar.pdb
  7. 4
      comivoyar/bin/Debug/coord.txt
  8. BIN
      comivoyar/obj/Debug/comivoyar.exe
  9. BIN
      comivoyar/obj/Debug/comivoyar.pdb

BIN
.vs/comivoyar/v15/.suo

Binary file not shown.

BIN
.vs/comivoyar/v15/Server/sqlite3/storage.ide-shm

Binary file not shown.

BIN
.vs/comivoyar/v15/Server/sqlite3/storage.ide-wal

Binary file not shown.

24
comivoyar/Program.cs

@ -45,16 +45,16 @@ namespace komvo
WriteLine();
}
int[] toSwap = new int[Points.Count];
for (int i = 0; i < toSwap.Length; i++) toSwap[i] = i + 2;
int[] toSwap = new int[Points.Count - 1];
for (int i = 0; i <= toSwap.Length - 1; i++) toSwap[i] = i + 2;
for (int i = 0; i < toSwap.Length; i++) WriteLine(toSwap[i]);
int fct = Fact(Points.Count - 1);
int[] routes = new int[Fact(Points.Count)];
double[] leng = new double[Fact(Points.Count)];
int[] routes = new int[fct];
double[] leng = new double[fct];
double optim = leng[0];
int oIndex = 0;
@ -68,6 +68,12 @@ namespace komvo
routes[index++] = int.Parse(res);
}
for (int i = 0; i < routes.Length; i++) WriteLine(routes[i]);
CountLen(ref leng, Matrix, routes);
SearchBest(ref optim, ref oIndex, routes, leng);
Debug(routes);
@ -88,17 +94,17 @@ namespace komvo
char[] ch = rts[i].ToString().ToCharArray();
for (int j = 0; j < ch.Length; j++)
{
int db = int.Parse(ch[j].ToString()) - 2; //debug
int db = int.Parse(ch[j].ToString()) - 1; //debug
string db1 = rts[i].ToString(); //debug
if (j == 0) res += mtr[0, int.Parse(ch[j].ToString()) - 2];
if (j == 0) res += mtr[0, int.Parse(ch[j].ToString()) - 1];
else if (j == ch.Length - 1)
{
res += mtr[int.Parse(ch[j - 1].ToString()) - 2, int.Parse(ch[j].ToString()) - 2];
res += mtr[0, int.Parse(ch[j].ToString()) - 2];
res += mtr[int.Parse(ch[j - 1].ToString()) - 1, int.Parse(ch[j].ToString()) - 1];
res += mtr[0, int.Parse(ch[j].ToString()) - 1];
}
else
{
res += mtr[int.Parse(ch[j - 1].ToString()) - 2, int.Parse(ch[j].ToString()) - 2];
res += mtr[int.Parse(ch[j - 1].ToString()) - 1, int.Parse(ch[j].ToString()) - 1];
}
}
result[i] = res;

BIN
comivoyar/bin/Debug/comivoyar.exe

Binary file not shown.

BIN
comivoyar/bin/Debug/comivoyar.pdb

Binary file not shown.

4
comivoyar/bin/Debug/coord.txt

@ -1,4 +1,6 @@
0 0
10 10
20 20
30 30
30 30
40 40
50 50

BIN
comivoyar/obj/Debug/comivoyar.exe

Binary file not shown.

BIN
comivoyar/obj/Debug/comivoyar.pdb

Binary file not shown.
Loading…
Cancel
Save