GiveAGap 1.0.2
See the version list below for details.
dotnet add package GiveAGap --version 1.0.2
NuGet\Install-Package GiveAGap -Version 1.0.2
<PackageReference Include="GiveAGap" Version="1.0.2" />
paket add GiveAGap --version 1.0.2
#r "nuget: GiveAGap, 1.0.2"
// Install GiveAGap as a Cake Addin #addin nuget:?package=GiveAGap&version=1.0.2 // Install GiveAGap as a Cake Tool #tool nuget:?package=GiveAGap&version=1.0.2
Headings
Install the package and then add at least this line of code below to run once the algorithm
Code Block
var mutationProb = 0.1f; var crossOverProb = 0.8f; var dimVincoli = 1000; var dimVars = 15; var trPerc = 0.5; var vdPerc = 0.25; var myTest = new SynthTest(dimVincoli, dimVars, trPerc, vdPerc, 1, 1); // or Create another test expanding SynthTest.cs GeneticAlgorithmSETUP setup = new GeneticAlgorithmSETUP(myTest, dimVincoli, dimVars, trPerc, vdPerc, 1, crossOverProb, mutationProb); setup.minFit = 0.45; setup.forcedINOUT = Vector<double>.Build.Dense(setup.dimVars); // modify your ForcedInOutClass var forcedINOUT = setup.forcedINOUT; var result = setup.Start(0.8,30,true); // Termination Conditions (minFit,minGen,and) Console.WriteLine("SELECTED: " + result.Item1); Console.WriteLine("In " + result.Item2 + " generations"); Console.WriteLine("In " + result.Item3 + " seconds"); Console.WriteLine("Fitness on TS " + result.Item4); Console.WriteLine("Fitness on TR VD " + result.Item5); Console.WriteLine("*****************");
Explaination
Basically you need to choose mutation and crossover probability, then setup the algorithm giving him the size of the input Matrix, and then calling setup.Start() the algorithm starts and when execution finishes you get a tuple with all element you need for the analysis
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.