Skip to content

Commit 8021a2a

Browse files
committed
log code changes
1 parent 17738e4 commit 8021a2a

File tree

1 file changed

+53
-13
lines changed

1 file changed

+53
-13
lines changed

scripts/PowerShell.txt

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PowerShell 7.6.0-preview.4
22
PS C:\Users\kushal> C:\code\TSP\scripts\cat.ps1
33
On branch master
4-
Your branch is ahead of 'origin/master' by 4 commits.
4+
Your branch is ahead of 'origin/master' by 7 commits.
55
(use "git push" to publish your local commits)
66

77
nothing to commit, working tree clean
@@ -651,7 +651,7 @@ namespace TravelingSalesman.ConsoleApp
651651
solver = new SimulatedAnnealingSolver();
652652
break;
653653
case "4":
654-
solver = new GeneticAlgorithmSolver();
654+
solver = GeneticAlgorithmSolver.CreateScaledGeneticSolver(cityCount);
655655
break;
656656
default:
657657
solver = new NearestNeighborSolver();
@@ -1536,7 +1536,7 @@ namespace TravelingSalesman.Core
15361536
GeneticAlgorithm
15371537
}
15381538

1539-
public static ITspSolver `olver(SolverType type)
1539+
public static ITspSolver CreateSolver(SolverType type)
15401540
{
15411541
return type switch
15421542
{
@@ -1548,7 +1548,7 @@ namespace TravelingSalesman.Core
15481548
};
15491549
}
15501550

1551-
public static IEnumerable<ITspSolver> `AllSolvers()
1551+
public static IEnumerable<ITspSolver> CreateAllSolvers()
15521552
{
15531553
yield return new NearestNeighborSolver();
15541554
yield return new TwoOptSolver();
@@ -1690,7 +1690,7 @@ namespace TravelingSalesman.Core
16901690
}
16911691
PS C:\code\TSP> Set-Location "C:\code\tsp"; git status; git remote show origin; git clean -dfx; tree /F; Set-Location "C:\code\TSP\TravelingSalesman.ConsoleApp\"; dotnet run
16921692
On branch master
1693-
Your branch is ahead of 'origin/master' by 5 commits.
1693+
Your branch is ahead of 'origin/master' by 7 commits.
16941694
(use "git push" to publish your local commits)
16951695

16961696
nothing to commit, working tree clean
@@ -1739,13 +1739,53 @@ C:.
17391739
Using launch settings from C:\code\TSP\TravelingSalesman.ConsoleApp\Properties\launchSettings.json...
17401740
Restore complete (1.6s)
17411741
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
1742-
TravelingSalesman.Core failed with 4 error(s) (0.9s)
1743-
C:\code\TSP\TravelingSalesman.Core\TravelingSalesmanLibrary.cs(516,34): error CS1519: Invalid token '`' in a member declaration
1744-
C:\code\TSP\TravelingSalesman.Core\TravelingSalesmanLibrary.cs(516,34): error CS1056: Unexpected character '`'
1745-
C:\code\TSP\TravelingSalesman.Core\TravelingSalesmanLibrary.cs(528,47): error CS1519: Invalid token '`' in a member declaration
1746-
C:\code\TSP\TravelingSalesman.Core\TravelingSalesmanLibrary.cs(528,47): error CS1056: Unexpected character '`'
1742+
TravelingSalesman.Core succeeded (1.1s) → C:\code\TSP\TravelingSalesman.Core\bin\Debug\net9.0\TravelingSalesman.Core.dll
1743+
TravelingSalesman.ConsoleApp succeeded (1.4s) → bin\Debug\net9.0\TravelingSalesman.ConsoleApp.dll
17471744

1748-
Build failed with 4 error(s) in 4.1s
1745+
Build succeeded in 5.5s
17491746

1750-
The build failed. Fix the build errors and run again.
1751-
PS C:\code\TSP\TravelingSalesman.ConsoleApp>
1747+
╔═══════════════════════════════════════════════════════════════╗
1748+
║ TRAVELING SALESMAN PROBLEM SOLVER v1.0 ║
1749+
║ .NET 9 Implementation ║
1750+
╚═══════════════════════════════════════════════════════════════╝
1751+
1752+
📍 Main Menu:
1753+
1754+
1. Interactive Solver - Solve custom TSP instances
1755+
2. Algorithm Benchmark - Compare all algorithms
1756+
3. Visual Demonstration - See algorithms in action
1757+
4. Algorithm Information - Learn about each algorithm
1758+
5. Exit
1759+
1760+
➤ Select an option (1-5): 1
1761+
1762+
════════════════════════════════════════════════════════════
1763+
Interactive TSP Solver
1764+
════════════════════════════════════════════════════════════
1765+
1766+
How many cities? (minimum 2): 200
1767+
1768+
⚠️ Note: 200 cities may take significant time with some algorithms.
1769+
Nearest Neighbor will be fast, but Genetic Algorithm may take minutes.
1770+
Continue? (y/n): y
1771+
1772+
Select city distribution pattern:
1773+
1. Random
1774+
2. Circular
1775+
3. Grid
1776+
1777+
➤ Select pattern (1-3): 1
1778+
1779+
✓ Generated 200 random cities
1780+
1781+
Select algorithm:
1782+
1. Nearest Neighbor (Fast, Good)
1783+
2. 2-Opt (Medium, Better)
1784+
3. Simulated Annealing (Slow, Very Good)
1785+
4. Genetic Algorithm (Slowest, Best)
1786+
1787+
➤ Select algorithm (1-4): 4
1788+
1789+
🔄 Running Genetic Algorithm algorithm...
1790+
1791+
..

0 commit comments

Comments
 (0)