Sylvain R před 10 roky
rodič
revize
7ca8b3dad3
100 změnil soubory, kde provedl 5763 přidání a 0 odebrání
  1. 400 0
      ExpertSystemPolygones/AssemblyDependencies1.dgml
  2. 28 0
      ExpertSystemPolygones/ExpertSystemPolygones.sln
  3. 58 0
      ExpertSystemPolygones/ExpertSystemPolygones/ExpertSystemPCL.csproj
  4. 54 0
      ExpertSystemPolygones/ExpertSystemPolygones/Fact/BoolFact.cs
  5. 68 0
      ExpertSystemPolygones/ExpertSystemPolygones/Fact/FactFactory.cs
  6. 52 0
      ExpertSystemPolygones/ExpertSystemPolygones/Fact/FactsBase.cs
  7. 14 0
      ExpertSystemPolygones/ExpertSystemPolygones/Fact/IFact.cs
  8. 48 0
      ExpertSystemPolygones/ExpertSystemPolygones/Fact/IntFact.cs
  9. 13 0
      ExpertSystemPolygones/ExpertSystemPolygones/HumanInterface.cs
  10. 143 0
      ExpertSystemPolygones/ExpertSystemPolygones/Motor.cs
  11. 30 0
      ExpertSystemPolygones/ExpertSystemPolygones/Properties/AssemblyInfo.cs
  12. 24 0
      ExpertSystemPolygones/ExpertSystemPolygones/Rule.cs
  13. 39 0
      ExpertSystemPolygones/ExpertSystemPolygones/RulesBase.cs
  14. 6 0
      ExpertSystemPolygones/Polygones/App.config
  15. 67 0
      ExpertSystemPolygones/Polygones/Polygones.csproj
  16. 90 0
      ExpertSystemPolygones/Polygones/Program.cs
  17. 36 0
      ExpertSystemPolygones/Polygones/Properties/AssemblyInfo.cs
  18. 28 0
      FuzzyLogic/FuzzyLogic.sln
  19. 6 0
      FuzzyLogic/FuzzyLogicApp/App.config
  20. 69 0
      FuzzyLogic/FuzzyLogicApp/FuzzyLogicApp.csproj
  21. 133 0
      FuzzyLogic/FuzzyLogicApp/Program.cs
  22. 36 0
      FuzzyLogic/FuzzyLogicApp/Properties/AssemblyInfo.cs
  23. 87 0
      FuzzyLogic/FuzzyLogicApp/Store.cs
  24. 147 0
      FuzzyLogic/FuzzyLogicApp/Test.cs
  25. 495 0
      FuzzyLogic/FuzzyLogicPCL/CodeMap.dgml
  26. 16 0
      FuzzyLogic/FuzzyLogicPCL/FuzzyExpression.cs
  27. 61 0
      FuzzyLogic/FuzzyLogicPCL/FuzzyLogicPCL.csproj
  28. 84 0
      FuzzyLogic/FuzzyLogicPCL/FuzzyRule.cs
  29. 335 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/FuzzySet.cs
  30. 15 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/LeftFuzzySet.cs
  31. 50 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/Point2D.cs
  32. 15 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/RightFuzzySet.cs
  33. 17 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/TrapezoidalFuzzySet.cs
  34. 15 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySets/TriangularFuzzySet.cs
  35. 87 0
      FuzzyLogic/FuzzyLogicPCL/FuzzySystem.cs
  36. 15 0
      FuzzyLogic/FuzzyLogicPCL/FuzzyValue.cs
  37. 22 0
      FuzzyLogic/FuzzyLogicPCL/LinguisticValue.cs
  38. 48 0
      FuzzyLogic/FuzzyLogicPCL/LinguisticVariable.cs
  39. 30 0
      FuzzyLogic/FuzzyLogicPCL/Properties/AssemblyInfo.cs
  40. 28 0
      GeneticAlgorithm/GeneticAlgorithm.sln
  41. 100 0
      GeneticAlgorithm/GeneticAlgorithm/EvolutionaryProcess.cs
  42. 62 0
      GeneticAlgorithm/GeneticAlgorithm/GeneticAlgorithm.csproj
  43. 9 0
      GeneticAlgorithm/GeneticAlgorithm/IGene.cs
  44. 7 0
      GeneticAlgorithm/GeneticAlgorithm/IIHM.cs
  45. 30 0
      GeneticAlgorithm/GeneticAlgorithm/Individual.cs
  46. 77 0
      GeneticAlgorithm/GeneticAlgorithm/IndividualFactory.cs
  47. 177 0
      GeneticAlgorithm/GeneticAlgorithm/MazeProblem/Maze.cs
  48. 29 0
      GeneticAlgorithm/GeneticAlgorithm/MazeProblem/MazeGene.cs
  49. 78 0
      GeneticAlgorithm/GeneticAlgorithm/MazeProblem/MazeIndividual.cs
  50. 19 0
      GeneticAlgorithm/GeneticAlgorithm/Parameters.cs
  51. 30 0
      GeneticAlgorithm/GeneticAlgorithm/Properties/AssemblyInfo.cs
  52. 60 0
      GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSP.cs
  53. 36 0
      GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSPGene.cs
  54. 83 0
      GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSPIndividual.cs
  55. 6 0
      GeneticAlgorithm/MazeProgram/App.config
  56. 46 0
      GeneticAlgorithm/MazeProgram/Program.cs
  57. 64 0
      GeneticAlgorithm/MazeProgram/Program.csproj
  58. 36 0
      GeneticAlgorithm/MazeProgram/Properties/AssemblyInfo.cs
  59. 28 0
      Metaheuristics/Metaheuristics.sln
  60. 6 0
      Metaheuristics/MetaheuristicsMainProgram/App.config
  61. 64 0
      Metaheuristics/MetaheuristicsMainProgram/MetaheuristicsMainProgram.csproj
  62. 65 0
      Metaheuristics/MetaheuristicsMainProgram/Program.cs
  63. 36 0
      Metaheuristics/MetaheuristicsMainProgram/Properties/AssemblyInfo.cs
  64. 33 0
      Metaheuristics/MetaheuristicsPCL/Algorithms/GradientDescentAlgorithm.cs
  65. 15 0
      Metaheuristics/MetaheuristicsPCL/Algorithms/GreedyAlgorithm.cs
  66. 45 0
      Metaheuristics/MetaheuristicsPCL/Algorithms/ParticleSwarmOptimizationAlgorithm.cs
  67. 43 0
      Metaheuristics/MetaheuristicsPCL/Algorithms/SimulatedAnnealingAlgorithm.cs
  68. 46 0
      Metaheuristics/MetaheuristicsPCL/Algorithms/TabuSearchAlgorithm.cs
  69. 16 0
      Metaheuristics/MetaheuristicsPCL/Base/Algorithm.cs
  70. 9 0
      Metaheuristics/MetaheuristicsPCL/Base/IHM.cs
  71. 13 0
      Metaheuristics/MetaheuristicsPCL/Base/IProblem.cs
  72. 8 0
      Metaheuristics/MetaheuristicsPCL/Base/ISolution.cs
  73. 33 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/GradientDescentForKnapsack.cs
  74. 32 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/GreedyAlgorithmForKnapsack.cs
  75. 79 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/ParticleSwarmOptimizationForKnapsack.cs
  76. 58 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/SimulatedAnnealingForKnapsack.cs
  77. 60 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/TabuSearchForKnapsack.cs
  78. 24 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/Box.cs
  79. 110 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/KnapsackProblem.cs
  80. 82 0
      Metaheuristics/MetaheuristicsPCL/KnapsackProblem/KnapsackSolution.cs
  81. 67 0
      Metaheuristics/MetaheuristicsPCL/MetaheuristicsPCL.csproj
  82. 30 0
      Metaheuristics/MetaheuristicsPCL/Properties/AssemblyInfo.cs
  83. 6 0
      MultiAgentSystems/Fish/App.config
  84. 8 0
      MultiAgentSystems/Fish/App.xaml
  85. 17 0
      MultiAgentSystems/Fish/App.xaml.cs
  86. 110 0
      MultiAgentSystems/Fish/Fish.csproj
  87. 6 0
      MultiAgentSystems/Fish/MainWindow.xaml
  88. 82 0
      MultiAgentSystems/Fish/MainWindow.xaml.cs
  89. 55 0
      MultiAgentSystems/Fish/Properties/AssemblyInfo.cs
  90. 71 0
      MultiAgentSystems/Fish/Properties/Resources.Designer.cs
  91. 117 0
      MultiAgentSystems/Fish/Properties/Resources.resx
  92. 30 0
      MultiAgentSystems/Fish/Properties/Settings.Designer.cs
  93. 7 0
      MultiAgentSystems/Fish/Properties/Settings.settings
  94. 6 0
      MultiAgentSystems/GameOfLife/App.config
  95. 8 0
      MultiAgentSystems/GameOfLife/App.xaml
  96. 17 0
      MultiAgentSystems/GameOfLife/App.xaml.cs
  97. 110 0
      MultiAgentSystems/GameOfLife/GameOfLife.csproj
  98. 6 0
      MultiAgentSystems/GameOfLife/MainWindow.xaml
  99. 92 0
      MultiAgentSystems/GameOfLife/MainWindow.xaml.cs
  100. 55 0
      MultiAgentSystems/GameOfLife/Properties/AssemblyInfo.cs

+ 400 - 0
ExpertSystemPolygones/AssemblyDependencies1.dgml

@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="utf-8"?>
+<DirectedGraph DataVirtualized="True" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
+  <Nodes>
+    <Node Id="@10" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETPortable\v4.0\Profile\Profile136\System.Core.dll" Group="Collapsed" Label="System.Core.dll">
+      <Category Ref="FileSystem.Category.FileOfType.dll" />
+    </Node>
+    <Node Id="@12" Category="CodeSchema_Assembly" AssemblyTimestamp="06/13/2014 22:30:33" Bounds="77.8177466316556,-245.927074132263,702.715361437107,354.274526436015" CodeSchemaProperty_StrongName="ExpertSystemPCL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="1" FilePath="$(ebbaf104-9bf9-4988-8e43-f352a5cdeeb9.OutputPath)" Group="Expanded" Label="ExpertSystemPCL.dll" UseManualLocation="True">
+      <Category Ref="FileSystem.Category.FileOfType.dll" />
+    </Node>
+    <Node Id="@14" Category="CodeSchema_Namespace" Bounds="97.8177466316557,-205.926974132263,662.715361437107,294.274326436015" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="9" Group="Expanded" Label="ExpertSystemPCL" UseManualLocation="True" />
+    <Node Id="@15" Category="CodeSchema_Namespace" Bounds="269.349425426179,-380.927474132263,146.607321173333,85.0002000000001" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="1" Group="Expanded" Label="Polygones" UseManualLocation="True" />
+    <Node Id="@16" Category="CodeSchema_Class" Bounds="247.958551684512,-36.7697656713964,106.423333333333,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="BoolFact" UseManualLocation="True" />
+    <Node Id="@17" Category="CodeSchema_Class" Bounds="125.108732917785,-94.1308376375136,121.163333333333,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FactFactory" UseManualLocation="True" />
+    <Node Id="@18" Category="CodeSchema_Class" Bounds="285.289367463422,-110.926774132263,112.026666666667,25.0000000000001" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FactsBase" UseManualLocation="True" />
+    <Node Id="@19" Category="CodeSchema_Interface" Bounds="594.803005566041,-78.5775064086698,145.730102502721,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="HumanInterface" UseManualLocation="True" />
+    <Node Id="@2" Category="CodeSchema_Assembly" AssemblyTimestamp="06/13/2014 22:30:34" Bounds="249.349425426179,-420.927574132263,186.607321173333,145.0004" CodeSchemaProperty_StrongName="Polygones, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="1" FilePath="$(a6c9de6d-7c7e-4afa-a317-f3aea38e2e46.OutputPath)" Group="Expanded" Label="Polygones.exe" UseManualLocation="True">
+      <Category Ref="FileSystem.Category.FileOfType.exe" />
+    </Node>
+    <Node Id="@21" Category="CodeSchema_Interface" Bounds="272.82744755227,43.3472523037526,85.77,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="5" Group="Collapsed" Label="IFact" UseManualLocation="True" />
+    <Node Id="@22" Category="CodeSchema_Class" Bounds="117.817746631656,-29.902650503761,96.6266666666667,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="IntFact" />
+    <Node Id="@23" Category="CodeSchema_Class" Bounds="318.005090506565,-165.926874132263,94.0766666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Motor" />
+    <Node Id="@24" Category="CodeSchema_Class" Bounds="289.349425426179,-340.927374132263,106.607321173333,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Program" />
+    <Node Id="@25" Category="CodeSchema_Class" Bounds="423.551838012279,-34.7538778713667,84.1500000000001,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Rule" UseManualLocation="True" />
+    <Node Id="@26" Category="CodeSchema_Class" Bounds="427.316034130089,-92.1149498374841,113.6,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="RulesBase" UseManualLocation="True" />
+    <Node Id="@27" Category="CodeSchema_Method" Bounds="319.89022539938,61.6848052873099,79.5733333333333,25.96" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="SetLevel" UseManualLocation="True" />
+    <Node Id="@28" Category="CodeSchema_Method" Bounds="222.193558732713,5.7248052873099,62.8566666666667,25.96" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="Level" UseManualLocation="True" />
+    <Node Id="@29" Category="CodeSchema_Method" Bounds="222.193558732713,61.6848052873099,67.6966666666667,25.96" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="Name" UseManualLocation="True" />
+    <Node Id="@30" Category="CodeSchema_Method" Bounds="222.189133732713,117.64720528731,84.00885,25.9552" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="Question" UseManualLocation="True" />
+    <Node Id="@31" Category="CodeSchema_Method" Bounds="315.05022539938,5.7248052873099,65.5333333333333,25.96" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="Value" UseManualLocation="True" />
+    <Node Id="@4" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5\mscorlib.dll" Group="Collapsed" Label="mscorlib.dll">
+      <Category Ref="FileSystem.Category.FileOfType.dll" />
+    </Node>
+    <Node Id="@6" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETPortable\v4.0\Profile\Profile136\mscorlib.dll" Group="Collapsed" Label="mscorlib.dll">
+      <Category Ref="FileSystem.Category.FileOfType.dll" />
+    </Node>
+    <Node Id="@8" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5\System.Core.dll" Group="Collapsed" Label="System.Core.dll">
+      <Category Ref="FileSystem.Category.FileOfType.dll" />
+    </Node>
+    <Node Id="_standardGraphExternalsGroup" Category="Externals" Bounds="300.52863596401,138.347552303752,84.2533333333333,25" Group="Collapsed" Label="Externes" UseManualLocation="True" />
+  </Nodes>
+  <Links>
+    <Link Source="@12" Target="@14" Category="Contains" FetchingParent="@12" />
+    <Link Source="@12" Target="@6" Category="CodeSchema_AttributeUse" IsTargetVirtualized="True" Weight="13" />
+    <Link Source="@14" Target="@16" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@17" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@18" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@19" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@21" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@22" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@23" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@25" Category="Contains" FetchingParent="@14" />
+    <Link Source="@14" Target="@26" Category="Contains" FetchingParent="@14" />
+    <Link Source="@15" Target="@24" Category="Contains" FetchingParent="@15" />
+    <Link Source="@16" Target="@21" Category="Implements" Bounds="303.439122881175,-11.7697656713964,8.30777565395903,45.7697511294738" Weight="1" />
+    <Link Source="@16" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18">
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@17" Target="@16" Category="CodeSchema_Calls" Bounds="210.85551043588,-69.1308376375136,57.0892031271778,28.3573175299255" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@17" Target="@21" Category="References" IsSourceVirtualized="True" Weight="3">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@17" Target="@22" Category="CodeSchema_Calls" Bounds="172.559566332569,-69.1308376375136,9.32422580811107,30.6185558461256" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@17" Target="@23" Category="References" Bounds="204.956008911133,-140.861541748047,106.048446655273,46.7307052612305" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@17" Target="@29" Category="CodeSchema_Calls" Bounds="227.081529100113,-174.275566502389,26.4106005641947,227.020961565691" IsSourceVirtualized="True" Weight="2" />
+    <Link Source="@17" Target="@30" Category="CodeSchema_Calls" Bounds="227.146165241428,-174.275566502389,34.3849499017491,282.988780936016" IsSourceVirtualized="True" Weight="2" />
+    <Link Source="@17" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18">
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@18" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@18" Target="@21" Category="References" IsSourceVirtualized="True" Weight="13">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@18" Target="@29" Category="CodeSchema_Calls" Bounds="198.980440753735,-119.27529642036,50.7027613788882,172.326361946803" IsSourceVirtualized="True" Weight="2" />
+    <Link Source="@18" Target="@31" Category="CodeSchema_Calls" Bounds="207.971587500963,-119.27529642036,120.283315820981,118.679134986295" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@18" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="26">
+      <Category Ref="CodeSchema_AttributeUse" />
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@19" Target="@21" Category="References" Bounds="362.193725585938,-53.577507019043,272.317260742188,94.1083068847656" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@19" Target="@25" Category="References" Bounds="516.243995845402,-53.5775064086698,93.7949846184911,20.3445444889515" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@19" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@2" Target="@15" Category="Contains" FetchingParent="@2" />
+    <Link Source="@2" Target="@4" Category="CodeSchema_AttributeUse" IsTargetVirtualized="True" Weight="14" />
+    <Link Source="@21" Target="@27" Category="Contains" FetchingParent="@21" />
+    <Link Source="@21" Target="@28" Category="Contains" FetchingParent="@21" />
+    <Link Source="@21" Target="@29" Category="Contains" FetchingParent="@21" />
+    <Link Source="@21" Target="@30" Category="Contains" FetchingParent="@21" />
+    <Link Source="@21" Target="@31" Category="Contains" FetchingParent="@21" />
+    <Link Source="@22" Target="@21" Category="Implements" Bounds="191.656944480528,-4.90265050376087,89.9977174842711,44.071826357479" Weight="1" />
+    <Link Source="@22" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="17">
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@23" Target="@17" Category="CodeSchema_Calls" Bounds="227.033279418945,-140.926879882813,147.188217163086,42.9256286621094" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3" />
+    <Link Source="@23" Target="@18" Category="References" Bounds="350.265053799888,-140.926874132263,9.38276097676675,21.7370292834164" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@23" Target="@19" Category="References" Bounds="408.033410012183,-141.018273835425,207.681000657812,59.9449024264048" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@23" Target="@21" Category="References" IsSourceVirtualized="True" Weight="5" />
+    <Link Source="@23" Target="@25" Category="References" Bounds="381.421295166016,-140.926879882813,59.48095703125,100.890617370605" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="13">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@23" Target="@26" Category="References" Bounds="385.208290734347,-140.926874132263,71.0933755732405,44.0700749138158" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@23" Target="@27" Category="CodeSchema_Calls" Bounds="360.032609702895,-174.27546479472,3.04700996107346,226.961310957131" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@23" Target="@28" Category="CodeSchema_Calls" Bounds="264.783206265155,-174.27546479472,91.7953746727821,172.059868990113" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@23" Target="@29" Category="CodeSchema_Calls" Bounds="264.778109009773,-174.27546479472,93.3435661655013,227.633478940119" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@23" Target="@30" Category="CodeSchema_Calls" Bounds="270.924755164885,-174.27546479472,88.4216990725205,283.331618615535" IsSourceVirtualized="True" Weight="1" />
+    <Link Source="@23" Target="@31" Category="CodeSchema_Calls" Bounds="349.465581723117,-174.27546479472,12.8431663938869,171.025669813713" IsSourceVirtualized="True" Weight="2" />
+    <Link Source="@23" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="35">
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@24" Target="@19" Category="Implements" Bounds="357.695713547429,-291.007551100198,248.696459385184,206.677741577163" Weight="1" />
+    <Link Source="@24" Target="@21" Category="References" IsSourceVirtualized="True" Weight="11" />
+    <Link Source="@24" Target="@23" Category="CodeSchema_Calls" Bounds="300.612194546126,-321.533239554796,42.3640096804438,141.379179006943" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="13" />
+    <Link Source="@24" Target="@25" Category="References" Bounds="348.047597079941,-297.115549837484,108.620126679459,251.737129101508" IsSourceVirtualized="True" Weight="4" />
+    <Link Source="@24" Target="@28" Category="CodeSchema_Calls" Bounds="258.638280093561,-354.745521420965,81.1166144518996,351.700757913015" IsSourceVirtualized="True" Weight="2" />
+    <Link Source="@24" Target="@4" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="57">
+      <Category Ref="CodeSchema_AttributeUse" />
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@24" Target="@8" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@25" Target="@21" Category="References" Bounds="347.687855666315,-9.75387787136668,93.9453490073894,48.9428527151996" IsSourceVirtualized="True" Weight="11">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@25" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="28">
+      <Category Ref="CodeSchema_AttributeUse" />
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@26" Target="@25" Category="References" Bounds="472.417043924192,-67.1149498374841,7.66986481561253,23.7950673926254" IsSourceVirtualized="True" Weight="9" />
+    <Link Source="@26" Target="@6" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="9">
+      <Category Ref="CodeSchema_Calls" />
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+      <Category Ref="InheritsFrom" />
+    </Link>
+    <Link Source="@27" Target="@6" Category="References" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@28" Target="@6" Category="CodeSchema_ReturnTypeLink" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@29" Target="@6" Category="CodeSchema_ReturnTypeLink" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@30" Target="@6" Category="CodeSchema_ReturnTypeLink" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@31" Target="@6" Category="CodeSchema_ReturnTypeLink" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="_standardGraphExternalsGroup" Target="@10" Category="Contains" />
+    <Link Source="_standardGraphExternalsGroup" Target="@4" Category="Contains" />
+    <Link Source="_standardGraphExternalsGroup" Target="@6" Category="Contains" />
+    <Link Source="_standardGraphExternalsGroup" Target="@8" Category="Contains" />
+  </Links>
+  <Categories>
+    <Category Id="CodeSchema_Assembly" Label="Assembly" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="Assemblys" />
+    <Category Id="CodeSchema_AttributeUse" Label="Utilise un attribut" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Utilisé par" OutgoingActionLabel="Utilise un attribut" />
+    <Category Id="CodeSchema_Calls" Label="Appels" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Appelé par" OutgoingActionLabel="Appels" />
+    <Category Id="CodeSchema_Class" Label="Classe" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Classes" />
+    <Category Id="CodeSchema_Interface" Label="Interface" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Interface" NavigationActionLabel="Interfaces" />
+    <Category Id="CodeSchema_Member" Label="Membre" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Field" NavigationActionLabel="Membres" />
+    <Category Id="CodeSchema_Method" Label="Méthode" BasedOn="CodeSchema_Member" CanBeDataDriven="True" DefaultAction="Link:Forward:CodeSchema_Calls" Icon="CodeSchema_Method" NavigationActionLabel="Méthodes" />
+    <Category Id="CodeSchema_Namespace" Label="Espace de noms" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Type" Icon="CodeSchema_Namespace" NavigationActionLabel="Espaces de noms" />
+    <Category Id="CodeSchema_ReturnTypeLink" Label="Retour" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Types de retour" OutgoingActionLabel="Types de retour" />
+    <Category Id="CodeSchema_Type" Label="Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Types" />
+    <Category Id="Contains" Label="Contient" Description="Si la source de la liaison contient ou non l'objet cible" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Contenu par" IsContainment="True" OutgoingActionLabel="Contient" />
+    <Category Id="Externals" Label="Externes" CanBeDataDriven="True" IsProviderRoot="False" NavigationActionLabel="Externes" />
+    <Category Id="File" Label="Fichier" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="Fichiers" />
+    <Category Id="FileSystem.Category.FileOfType.dll" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" />
+    <Category Id="FileSystem.Category.FileOfType.exe" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" />
+    <Category Id="Implements" Label="Implémente" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Implémenté par" OutgoingActionLabel="Implémente" />
+    <Category Id="InheritsFrom" Label="Hérite de" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Hérité par" OutgoingActionLabel="Hérite de" />
+    <Category Id="References" Label="Références" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Référencé par" OutgoingActionLabel="Références" />
+  </Categories>
+  <Properties>
+    <Property Id="AssemblyTimestamp" DataType="System.DateTime" />
+    <Property Id="Bounds" DataType="System.Windows.Rect" />
+    <Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
+    <Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsAbstract" Label="Est abstrait" Description="Indicateur qui spécifie que le membre est 'Abstract' et ne permet pas une implémentation complète" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsExternal" Label="Est externe" Description="Indicateur qui spécifie si le nœud est considéré comme externe" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsFinal" Label="Est final" Description="Indicateur qui spécifie que le membre est 'Final' et qu'aucune dérivation n'est possible à partir de celui-ci" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsInternal" Label="Est interne" Description="Indicateur qui spécifie que la méthode est 'Internal'" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsPublic" Label="Est public" Description="Indicateur qui spécifie que la portée est publique" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsVirtual" Label="Est virtuel" Description="Indicateur qui spécifie que la méthode peut être substituée" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" />
+    <Property Id="DataVirtualized" Label="Données virtualisées" Description="Si la valeur est True, le graphique peut contenir des nœuds et des liens qui représentent des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
+    <Property Id="DelayedChildNodesState" Label="État des nœuds enfants retardés" Description="Non spécifié si l'état des nœuds enfants retardés n'est pas spécifié. NotFetched si le groupe contient des nœuds enfants qui ne sont pas encore recherchés dans le graphique. Fetched si tous les nœuds enfants retardés du groupe ont déjà été extraits." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
+    <Property Id="DelayedCrossGroupLinksState" Label="État des liens retardés entre les groupes" Description="Non spécifié si l'état des liens retardés entre les groupes n'est pas spécifié. NotFetched si les liens retardés entre les groupes sur ce nœud ne sont pas encore recherchés dans le graphique. Fetched si tous les liens retardés entre les groupes ont déjà été extraits." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
+    <Property Id="Expression" DataType="System.String" />
+    <Property Id="FetchedChildrenCount" DataType="System.Int32" />
+    <Property Id="FetchingParent" DataType="Microsoft.VisualStudio.GraphModel.GraphNodeId" />
+    <Property Id="FilePath" Label="Chemin d'accès au fichier" Description="Chemin d'accès au fichier" DataType="System.String" />
+    <Property Id="Group" Label="Groupe" Description="Affiche le nœud en tant que groupe" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
+    <Property Id="GroupLabel" DataType="System.String" />
+    <Property Id="Icon" Label="Icône" Description="Icône" DataType="System.String" />
+    <Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
+    <Property Id="IsContainment" DataType="System.Boolean" />
+    <Property Id="IsEnabled" DataType="System.Boolean" />
+    <Property Id="IsProviderRoot" Label="IsProviderRoot" Description="IsProviderRoot" DataType="System.Boolean" />
+    <Property Id="IsSourceVirtualized" Label="Source de liaison virtualisée" Description="Si la valeur est True, l'extrémité source de liaison contient des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="IsTargetVirtualized" Label="Cible du lien virtualisée" Description="Si la valeur est True, l'extrémité cible du lien contient des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="Label" Label="Étiquette" Description="Étiquette affichable d'un objet pouvant être annoté" DataType="System.String" />
+    <Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
+    <Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
+    <Property Id="TargetType" DataType="System.Type" />
+    <Property Id="UseManualLocation" DataType="System.Boolean" />
+    <Property Id="Value" DataType="System.String" />
+    <Property Id="ValueLabel" DataType="System.String" />
+    <Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
+    <Property Id="Weight" Label="Épaisseur" Description="Épaisseur" DataType="System.Double" />
+  </Properties>
+  <QualifiedNames>
+    <Name Id="Assembly" Label="Assembly" ValueType="Uri" />
+    <Name Id="Member" Label="Membre" ValueType="System.Object" />
+    <Name Id="Name" Label="Nom" ValueType="System.String" />
+    <Name Id="Namespace" Label="Espace de noms" ValueType="System.String" />
+    <Name Id="OverloadingParameters" Label="Paramètre" ValueType="Microsoft.VisualStudio.GraphModel.GraphNodeIdCollection" Formatter="NameValueNoEscape" />
+    <Name Id="Type" Label="Type" ValueType="System.Object" />
+  </QualifiedNames>
+  <IdentifierAliases>
+    <Alias n="1" Uri="Assembly=$(a6c9de6d-7c7e-4afa-a317-f3aea38e2e46.OutputPathUri)" />
+    <Alias n="2" Id="(@1)" />
+    <Alias n="3" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/mscorlib.dll" />
+    <Alias n="4" Id="(@3)" />
+    <Alias n="5" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETPortable/v4.0/Profile/Profile136/mscorlib.dll" />
+    <Alias n="6" Id="(@5)" />
+    <Alias n="7" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/System.Core.dll" />
+    <Alias n="8" Id="(@7)" />
+    <Alias n="9" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETPortable/v4.0/Profile/Profile136/System.Core.dll" />
+    <Alias n="10" Id="(@9)" />
+    <Alias n="11" Uri="Assembly=$(ebbaf104-9bf9-4988-8e43-f352a5cdeeb9.OutputPathUri)" />
+    <Alias n="12" Id="(@11)" />
+    <Alias n="13" Id="Namespace=ExpertSystemPCL" />
+    <Alias n="14" Id="(@11 @13)" />
+    <Alias n="15" Id="(@1 Namespace=Polygones)" />
+    <Alias n="16" Id="(@11 @13 Type=BoolFact)" />
+    <Alias n="17" Id="(@11 @13 Type=FactFactory)" />
+    <Alias n="18" Id="(@11 @13 Type=FactsBase)" />
+    <Alias n="19" Id="(@11 @13 Type=HumanInterface)" />
+    <Alias n="20" Id="Type=IFact" />
+    <Alias n="21" Id="(@11 @13 @20)" />
+    <Alias n="22" Id="(@11 @13 Type=IntFact)" />
+    <Alias n="23" Id="(@11 @13 Type=Motor)" />
+    <Alias n="24" Id="(@1 Namespace=Polygones Type=Program)" />
+    <Alias n="25" Id="(@11 @13 Type=Rule)" />
+    <Alias n="26" Id="(@11 @13 Type=RulesBase)" />
+    <Alias n="27" Id="(@11 @13 @20 Member=(Name=SetLevel OverloadingParameters=[(@5 Namespace=System Type=Int32)]))" />
+    <Alias n="28" Id="(@11 @13 @20 Member=Level)" />
+    <Alias n="29" Id="(@11 @13 @20 Member=Name)" />
+    <Alias n="30" Id="(@11 @13 @20 Member=Question)" />
+    <Alias n="31" Id="(@11 @13 @20 Member=Value)" />
+  </IdentifierAliases>
+  <Styles>
+    <Style TargetType="Node" GroupLabel="Résultats" ValueLabel="Vrai">
+      <Condition Expression="HasCategory('QueryResult')" />
+      <Setter Property="Background" Value="#FFBCFFBE" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Assembly" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Assembly')" />
+      <Setter Property="Background" Value="#FF094167" />
+      <Setter Property="Stroke" Value="#FF094167" />
+      <Setter Property="Icon" Value="CodeSchema_Assembly" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Espace de noms" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Namespace')" />
+      <Setter Property="Background" Value="#FF0E619A" />
+      <Setter Property="Stroke" Value="#FF0E619A" />
+      <Setter Property="Icon" Value="CodeSchema_Namespace" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Interface" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Interface')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Interface" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Structure" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Struct')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Struct" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Énumération" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Enum')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Enum" />
+      <Setter Property="LayoutSettings" Value="List" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Délégué" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Delegate')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Delegate" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Classe" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Type')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Class" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Propriété" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Property')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Property" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Méthode" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Method" />
+      <Setter Property="LayoutSettings" Value="List" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Événement" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Event')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Event" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Champ" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Field')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Field" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="True">
+      <Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
+      <Setter Property="Icon" Value="CodeSchema_OutParameter" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Parameter" ValueLabel="True">
+      <Condition Expression="HasCategory('CodeSchema_Parameter')" />
+      <Setter Property="Icon" Value="CodeSchema_Parameter" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="True">
+      <Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
+      <Setter Property="Icon" Value="CodeSchema_LocalExpression" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Externes" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('Externals')" />
+      <Setter Property="Background" Value="#FF424242" />
+      <Setter Property="Stroke" Value="#FF424242" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
+      <Setter Property="TargetDecorator" Value="OpenArrow" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
+      <Setter Property="TargetDecorator" Value="OpenArrow" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Field Read" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="Target.HasCategory('CodeSchema_Field') And HasCategory('CodeSchema_FieldRead')" />
+      <Setter Property="StrokeDashArray" Value="2 2" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="Source.HasCategory('Comment')" />
+      <Setter Property="Stroke" Value="#FFE5C365" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsCursorLocation" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="DisabledBreakpointCount" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="EnabledBreakpointCount" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsInstructionPointerLocation" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsCurrentCallstackFrame" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+  </Styles>
+  <Paths>
+    <Path Id="a6c9de6d-7c7e-4afa-a317-f3aea38e2e46.OutputPath" Value="C:\Users\vm_42_000\SkyDrive\Documents\ExpertSystemPolygones\Polygones\bin\Debug\Polygones.exe" />
+    <Path Id="a6c9de6d-7c7e-4afa-a317-f3aea38e2e46.OutputPathUri" Value="file:///C:/Users/vm_42_000/SkyDrive/Documents/ExpertSystemPolygones/Polygones/bin/Debug/Polygones.exe" />
+    <Path Id="ebbaf104-9bf9-4988-8e43-f352a5cdeeb9.OutputPath" Value="C:\Users\vm_42_000\SkyDrive\Documents\ExpertSystemPolygones\ExpertSystemPolygones\bin\Debug\ExpertSystemPCL.dll" />
+    <Path Id="ebbaf104-9bf9-4988-8e43-f352a5cdeeb9.OutputPathUri" Value="file:///C:/Users/vm_42_000/SkyDrive/Documents/ExpertSystemPolygones/ExpertSystemPolygones/bin/Debug/ExpertSystemPCL.dll" />
+    <Path Id="FxReferenceAssemblies" Value="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework" />
+    <Path Id="FxReferenceAssembliesUri" Value="file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework" />
+  </Paths>
+</DirectedGraph>

+ 28 - 0
ExpertSystemPolygones/ExpertSystemPolygones.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30110.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpertSystemPCL", "ExpertSystemPolygones\ExpertSystemPCL.csproj", "{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polygones", "Polygones\Polygones.csproj", "{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 58 - 0
ExpertSystemPolygones/ExpertSystemPolygones/ExpertSystemPCL.csproj

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{EBBAF104-9BF9-4988-8E43-F352A5CDEEB9}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>ExpertSystemPCL</RootNamespace>
+    <AssemblyName>ExpertSystemPCL</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile136</TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .NET Framework is automatically included -->
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Fact\BoolFact.cs" />
+    <Compile Include="Fact\FactFactory.cs" />
+    <Compile Include="Fact\FactsBase.cs" />
+    <Compile Include="HumanInterface.cs" />
+    <Compile Include="Fact\IntFact.cs" />
+    <Compile Include="Fact\IFact.cs" />
+    <Compile Include="Motor.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Rule.cs" />
+    <Compile Include="RulesBase.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 54 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Fact/BoolFact.cs

@@ -0,0 +1,54 @@
+using System;
+
+namespace ExpertSystemPCL
+{
+    internal class BoolFact : IFact
+    {
+        protected String name;
+        public String Name()
+        {
+            return name;
+        }
+
+        protected bool value;
+        public object Value()
+        {
+            return value;
+        }
+
+        protected int level;
+        public int Level()
+        {
+            return level;
+        }
+        public void SetLevel(int l)
+        {
+            level = l;
+        }
+
+        protected String question = null;
+        public String Question()
+        {
+            return question;
+        }
+
+        public BoolFact(String _name, bool _value, String _question = null, int _level = 0)
+        {
+            name = _name;
+            value = _value;
+            question = _question;
+            level = _level;
+        }
+
+        public override String ToString()
+        {
+            String res = "";
+            if (!value)
+            {
+                res += "!";
+            }
+            res += name + " (" + level + ")";
+            return res;
+        }
+    }
+}

+ 68 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Fact/FactFactory.cs

@@ -0,0 +1,68 @@
+using System;
+
+namespace ExpertSystemPCL
+{
+    internal static class FactFactory
+    {
+        internal static IFact Fact(IFact f, Motor m)
+        {
+            IFact newFact;
+            if (f.GetType().Equals(typeof(IntFact)))
+            {
+                // C'est un fait à valeur entière
+                int value = m.AskIntValue(f.Question());
+                newFact = new IntFact(f.Name(), value, null, 0);
+            }
+            else
+            {
+                // C'est un fait à valeur booléenne
+                bool value = m.AskBoolValue(f.Question());
+                newFact = new BoolFact(f.Name(), value, null, 0);
+            }
+            return newFact;
+        }
+
+        internal static IFact Fact(string factStr)
+        {
+            factStr = factStr.Trim();
+            if (factStr.Contains("="))
+            {
+                // Il y a un symbole '=' donc c'est un IntFact, on sépare le nom de la valeur
+                String[] nameValue = factStr.Split(new String[] { "=", "(", ")" }, StringSplitOptions.RemoveEmptyEntries);
+                if (nameValue.Length >= 2)
+                {
+                    String question = null;
+                    if (nameValue.Length == 3)
+                    {
+                        // On peut le demander, donc on récupère la question liée
+                        question = nameValue[2].Trim();
+                    }
+                    return new IntFact(nameValue[0].Trim(), int.Parse(nameValue[1].Trim()), question);
+                }
+                else
+                {
+                    // Syntaxe incorrecte
+                    return null;
+                }
+            }
+            else
+            {
+                // Pas d'égalité, c'est un fait de classe BoolFact
+                bool value = true;
+                if (factStr.StartsWith("!"))
+                {
+                    value = false;
+                    factStr = factStr.Substring(1).Trim(); // On enlève le ! du nom
+                }
+                String[] nameQuestion = factStr.Split(new String[] { "(", ")" }, StringSplitOptions.RemoveEmptyEntries);
+                String question = null;
+                if (nameQuestion.Length == 2)
+                {
+                    // On récupère la question si on peut
+                    question = nameQuestion[1].Trim();
+                }
+                return new BoolFact(nameQuestion[0].Trim(), value, question);
+            }
+        }
+    }
+}

+ 52 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Fact/FactsBase.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ExpertSystemPCL
+{
+    internal class FactsBase
+    {
+        protected List<IFact> facts;
+        public List<IFact> Facts
+        {
+            get
+            {
+                return facts;
+            }
+        }
+
+        public FactsBase()
+        {
+            facts = new List<IFact>();
+        }
+
+        public void Clear()
+        {
+            facts.Clear();
+        }
+
+        public void AddFact(IFact f)
+        {
+            facts.Add(f);
+        }
+
+        public IFact Search(String _name)
+        {
+            return facts.FirstOrDefault(x => x.Name().Equals(_name));
+        }
+
+        public Object Value(String _name)
+        {
+            IFact f = facts.FirstOrDefault(x => x.Name().Equals(_name));
+            if (f != null)
+            {
+                return f.Value();
+            }
+            else
+            {
+                return null;
+            }
+        }
+    }
+}

+ 14 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Fact/IFact.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace ExpertSystemPCL
+{
+    public interface IFact
+    {
+        String Name();
+        Object Value();
+        int Level();
+        String Question();
+
+        void SetLevel(int p);
+    }
+}

+ 48 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Fact/IntFact.cs

@@ -0,0 +1,48 @@
+using System;
+
+namespace ExpertSystemPCL
+{
+    internal class IntFact : IFact
+    {
+        protected String name;
+        public String Name()
+        {
+            return name;
+        }
+
+        protected int value;
+        public object Value()
+        {
+            return value;
+        }
+
+        protected int level;
+        public int Level()
+        {
+            return level;
+        }
+        public void SetLevel(int l)
+        {
+            level = l;
+        }
+
+        protected String question = null;
+        public String Question()
+        {
+            return question;
+        }
+
+        public IntFact(String _name, int _value, String _question = null, int _level = 0)
+        {
+            name = _name;
+            value = _value;
+            question = _question;
+            level = _level;
+        }
+
+        public override String ToString()
+        {
+            return name + "=" + value +" (" + level + ")";
+        }
+    }
+}

+ 13 - 0
ExpertSystemPolygones/ExpertSystemPolygones/HumanInterface.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace ExpertSystemPCL
+{
+    public interface HumanInterface
+    {
+        int AskIntValue(String question);
+        bool AskBoolValue(String question);
+        void PrintFacts(List<IFact> facts);
+        void PrintRules(List<Rule> rules);
+    }
+}

+ 143 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Motor.cs

@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+
+namespace ExpertSystemPCL
+{
+    public class Motor
+    {
+        private FactsBase fDB;
+        private RulesBase rDB;
+        private HumanInterface ihm;
+
+        public Motor(HumanInterface _ihm)
+        {
+            ihm = _ihm;
+            fDB = new FactsBase();
+            rDB = new RulesBase();
+        }
+
+        public void Solve()
+        {
+            // On fait une copie des règles existantes + création d'une base de faits vierge
+            bool moreRules = true;
+            RulesBase usableRules = new RulesBase();
+            usableRules.Rules = new List<Rule>(rDB.Rules);
+            fDB.Clear();
+
+            // Tant qu'il existe des règles à appliquer
+            while (moreRules)
+            {
+                // Cherche une règle à appeler
+                Tuple<Rule, int> t = FindUsableRule(usableRules);
+
+                if (t!= null)
+                {
+                    // Applique la règle et ajoute le nouveau fait à la base
+                    IFact newFact = t.Item1.Conclusion;
+                    newFact.SetLevel(t.Item2 + 1); 
+                    fDB.AddFact(newFact);
+                    
+                    // Enlève la règle des règles applicables
+                    usableRules.Remove(t.Item1);
+                }
+                else
+                {
+                    // Plus de règles possibles : on s'arrête
+                    moreRules = false;
+                }
+            }
+
+            // Ecriture du résultat
+            ihm.PrintFacts(fDB.Facts);
+            //ihm.PrintRules(rDB.Rules);
+        }
+
+        private int CanApply(Rule r)
+        {
+            int maxlevel = -1;
+            // On vérifie si chaque prémisse est vrai
+            foreach (IFact f in r.Premises)
+            {
+                IFact foundFact = fDB.Search(f.Name());
+                if (foundFact == null) {
+                    // Ce fait n'existe pas dans la base actuellement
+                    if (f.Question() != null) {
+                        // On le demande à l'utilisateur et on l'ajoute en base
+                        foundFact = FactFactory.Fact(f, this);
+                        fDB.AddFact(foundFact);
+                        maxlevel = Math.Max(maxlevel, 0);
+                    }
+                    else {
+                        // On sait que la règle ne s'applique pas
+                        return -1;
+                    }
+                }
+                
+                // On a un fait en base, on vérifie sa valeur
+                if (!foundFact.Value().Equals(f.Value()))
+                {
+                    // Elle ne correspond pas
+                    return -1;
+                }
+                else
+                {
+                    // Elle correspond
+                    maxlevel = Math.Max(maxlevel, foundFact.Level());
+                }
+            }
+
+            return maxlevel;
+        }
+        private Tuple<Rule, int> FindUsableRule(RulesBase rBase) {
+            // On teste toutes les règles jusqu'à en trouve une applicable
+            foreach(Rule r in rBase.Rules) {
+                int level = CanApply(r);
+                if (level != -1) {
+                    // On renvoie la règle à appliquer + le niveau des prémisses
+                    return Tuple.Create(r, level);
+                }
+            }
+            return null;
+        }
+
+        internal int AskIntValue(string p)
+        {
+            return ihm.AskIntValue(p);
+        }
+
+        internal bool AskBoolValue(string p)
+        {
+            return ihm.AskBoolValue(p);
+        }
+
+        public void AddRule(string ruleStr)
+        {
+            // Séparation nom : règle
+            String[] splitName = ruleStr.Split(new String[] {" : "}, StringSplitOptions.RemoveEmptyEntries);
+            if (splitName.Length == 2)
+            {
+                String name = splitName[0];
+                // Séparation premises THEN conclusion
+                String[] splitPremConcl = splitName[1].Split(new String[] {"IF ", " THEN " }, StringSplitOptions.RemoveEmptyEntries);
+                if (splitPremConcl.Length == 2)
+                {
+                    // Lecture des premises
+                    List<IFact> premises = new List<IFact>();
+                    String[] premisesStr = splitPremConcl[0].Split(new String[] {" AND "}, StringSplitOptions.RemoveEmptyEntries);
+                    foreach (String prem in premisesStr)
+                    {
+                        IFact premise = FactFactory.Fact(prem);
+                        premises.Add(premise);
+                    }
+
+                    // Lecture de la conclusion
+                    String conclusionStr = splitPremConcl[1].Trim();
+                    IFact conclusion = FactFactory.Fact(conclusionStr);
+
+                    // Création de la règle et ajout
+                    rDB.AddRule(new Rule(name, premises, conclusion));
+                }
+            }
+        }
+    }
+}

+ 30 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Properties/AssemblyInfo.cs

@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("ExpertSystemPolygones")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ExpertSystemPolygones")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("fr")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou utiliser par défaut les numéros de build et de version 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 24 - 0
ExpertSystemPolygones/ExpertSystemPolygones/Rule.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace ExpertSystemPCL
+{
+    public class Rule
+    {
+        public List<IFact> Premises { get; set; }
+        public IFact Conclusion { get; set; }
+        public String Name { get; set; }
+
+        public Rule(String _name, List<IFact> _premises, IFact _conclusion)
+        {
+            Name = _name;
+            Premises = _premises;
+            Conclusion = _conclusion;
+        }
+
+        public override string ToString()
+        {
+            return Name + " : IF (" + String.Join(" AND ", Premises)+ ") THEN " + Conclusion.ToString();
+        }
+    }
+}

+ 39 - 0
ExpertSystemPolygones/ExpertSystemPolygones/RulesBase.cs

@@ -0,0 +1,39 @@
+using System.Collections.Generic;
+
+namespace ExpertSystemPCL
+{
+    internal class RulesBase
+    {
+        protected List<Rule> rules;
+        public List<Rule> Rules
+        {
+            get
+            {
+                return rules;
+            }
+            set
+            {
+                rules = value;
+            }
+        }
+
+        public RulesBase() {
+            rules = new List<Rule>();
+        }
+
+        public void ClearBase()
+        {
+            rules.Clear();
+        }
+
+        public void AddRule(Rule r)
+        {
+            rules.Add(r);
+        }
+
+        public void Remove(Rule r)
+        {
+            rules.Remove(r);
+        }
+    }
+}

+ 6 - 0
ExpertSystemPolygones/Polygones/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 67 - 0
ExpertSystemPolygones/Polygones/Polygones.csproj

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{A6C9DE6D-7C7E-4AFA-A317-F3AEA38E2E46}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Polygones</RootNamespace>
+    <AssemblyName>Polygones</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>Polygones.Program</StartupObject>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ExpertSystemPolygones\ExpertSystemPCL.csproj">
+      <Project>{ebbaf104-9bf9-4988-8e43-f352a5cdeeb9}</Project>
+      <Name>ExpertSystemPCL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 90 - 0
ExpertSystemPolygones/Polygones/Program.cs

@@ -0,0 +1,90 @@
+using System;
+using ExpertSystemPCL;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Polygones
+{
+    class Program : HumanInterface
+    {
+        static void Main(string[] args)
+        {
+            Program p = new Program();
+            p.Run();
+        }
+
+        public void Run()
+        {
+            // Moteur
+            Console.Out.WriteLine("** Création du moteur **");
+            Motor m = new Motor(this);
+
+            // Règles
+            Console.Out.WriteLine("** Ajout des règles **");
+            m.AddRule("R1 : IF (Ordre=3(Quel est l'ordre ?)) THEN Triangle");
+            m.AddRule("R2 : IF (Triangle AND Angle Droit(La figure a-t-elle au moins un angle droit ?)) THEN Triangle Rectangle");
+            m.AddRule("R3 : IF (Triangle AND Cotes Egaux=2(Combien la figure a-t-elle de côtés égaux ?)) THEN Triangle Isocèle");
+            m.AddRule("R4 : IF (Triangle Rectangle AND Triangle Isocèle) THEN Triangle Rectangle Isocèle");
+            m.AddRule("R5 : IF (Triangle AND Cotes Egaux=3(Combien la figure a-t-elle de côtés égaux ?)) THEN Triangle Equilateral");
+            m.AddRule("R6 : IF (Ordre=4(Quel est l'ordre ?)) THEN Quadrilatère");
+            m.AddRule("R7 : IF (Quadrilatère AND Cotes Paralleles=2(Combien y'a-t-il de côtés parallèles entre eux - 0, 2 ou 4)) THEN Trapeze");
+            m.AddRule("R8 : IF (Quadrilatère AND Cotes Paralleles=4(Combien y'a-t-il de côtés parallèles entre eux - 0, 2 ou 4)) THEN Parallélogramme");
+            m.AddRule("R9 : IF (Parallélogramme AND Angle Droit(La figure a-t-elle au moins un angle droit ?)) THEN Rectangle");
+            m.AddRule("R10 : IF (Parallélogramme AND Cotes Egaux=4(Combien la figure a-t-elle de côtés égaux ?)) THEN Losange");
+            m.AddRule("R11 : IF (Rectangle AND Losange THEN Carré");
+            
+            // Résolution
+            while (true)
+            {
+                Console.Out.WriteLine("\n** Résolution **");
+                m.Solve();
+            }
+        }
+
+        public int AskIntValue(String p)
+        {
+            Console.Out.WriteLine(p);
+            try {
+                return int.Parse(Console.In.ReadLine());
+            }
+            catch (Exception)
+            {
+                return 0;
+            }
+        }
+
+        public bool AskBoolValue(String p)
+        {
+            Console.Out.WriteLine(p + " (yes, no)");
+            String res = Console.In.ReadLine();
+            if (res.Equals("yes"))
+            {
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+        public void PrintFacts(List<IFact> facts)
+        {
+            String res = "Solution(s) trouvée(s) : \n";
+            foreach (IFact f in facts.Where(x => x.Level() > 0).OrderByDescending(x => x.Level()))
+            {
+                res += f.ToString() + "\n";
+            }
+            Console.Out.Write(res);
+        }
+        public void PrintRules(List<Rule> rules)
+        {
+            String res = "";
+            foreach (Rule r in rules)
+            {
+                res += r.ToString() + "\n";
+            }
+            Console.Out.Write(res);
+        }
+    
+    }
+}

+ 36 - 0
ExpertSystemPolygones/Polygones/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("Polygones")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Polygones")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("1fcf4589-001d-456f-af1f-802f34374cf9")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 28 - 0
FuzzyLogic/FuzzyLogic.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuzzyLogicPCL", "FuzzyLogicPCL\FuzzyLogicPCL.csproj", "{A32ADEBD-8739-4A32-9947-C0230BA7E774}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuzzyLogicApp", "FuzzyLogicApp\FuzzyLogicApp.csproj", "{D21CBD5B-7102-4BA0-8A43-448313E40145}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{A32ADEBD-8739-4A32-9947-C0230BA7E774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A32ADEBD-8739-4A32-9947-C0230BA7E774}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A32ADEBD-8739-4A32-9947-C0230BA7E774}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A32ADEBD-8739-4A32-9947-C0230BA7E774}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D21CBD5B-7102-4BA0-8A43-448313E40145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D21CBD5B-7102-4BA0-8A43-448313E40145}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D21CBD5B-7102-4BA0-8A43-448313E40145}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D21CBD5B-7102-4BA0-8A43-448313E40145}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 6 - 0
FuzzyLogic/FuzzyLogicApp/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 69 - 0
FuzzyLogic/FuzzyLogicApp/FuzzyLogicApp.csproj

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D21CBD5B-7102-4BA0-8A43-448313E40145}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>FuzzyLogicApp</RootNamespace>
+    <AssemblyName>FuzzyLogicApp</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>FuzzyLogicApp.Program</StartupObject>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Store.cs" />
+    <Compile Include="Test.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\FuzzyLogicPCL\FuzzyLogicPCL.csproj">
+      <Project>{a32adebd-8739-4a32-9947-c0230ba7e774}</Project>
+      <Name>FuzzyLogicPCL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 133 - 0
FuzzyLogic/FuzzyLogicApp/Program.cs

@@ -0,0 +1,133 @@
+using FuzzyLogicPCL;
+using FuzzyLogicPCL.FuzzySets;
+using System;
+
+namespace FuzzyLogicApp
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            // Création du système
+            WriteLine("Gestion du zoom GPS", true);
+            FuzzySystem system = new FuzzySystem("Gestion du zoom GPS");
+
+            WriteLine("1) Ajout des variables", true);
+
+            // Ajout de la variable linguistique "Distance" (de 0 à 500 000 m)
+            WriteLine("Ajout de la variable Distance");
+            LinguisticVariable distance = new LinguisticVariable("Distance", 0, 500000);
+            distance.AddValue(new LinguisticValue("Faible", new LeftFuzzySet(0, 500000, 30, 50)));
+            distance.AddValue(new LinguisticValue("Moyenne", new TrapezoidalFuzzySet(0, 500000, 40, 50, 100, 150)));
+            distance.AddValue(new LinguisticValue("Grande", new RightFuzzySet(0, 500000, 100, 150)));
+            system.addInputVariable(distance);
+
+            // Ajout de la variable linguistique "Vitesse" (de 0 à 200)
+            WriteLine("Ajout de la variable Vitesse");
+            LinguisticVariable vitesse = new LinguisticVariable("Vitesse", 0, 200);
+            vitesse.AddValue(new LinguisticValue("Lente", new LeftFuzzySet(0, 200, 20, 30)));
+            vitesse.AddValue(new LinguisticValue("PeuRapide", new TrapezoidalFuzzySet(0, 200, 20, 30, 70, 80)));
+            vitesse.AddValue(new LinguisticValue("Rapide", new TrapezoidalFuzzySet(0, 200, 70, 80, 90, 110)));
+            vitesse.AddValue(new LinguisticValue("TresRapide", new RightFuzzySet(0, 200, 90, 110)));
+            system.addInputVariable(vitesse);
+
+            // Ajout de la variable linguistique "Zoom" (de 1 à 5)
+            WriteLine("Ajout de la variable Zoom");
+            LinguisticVariable zoom = new LinguisticVariable("Zoom", 0, 5);
+            zoom.AddValue(new LinguisticValue("Petit", new LeftFuzzySet(0, 5, 1, 2)));
+            zoom.AddValue(new LinguisticValue("Normal", new TrapezoidalFuzzySet(0, 5, 1, 2, 3, 4)));
+            zoom.AddValue(new LinguisticValue("Gros", new RightFuzzySet(0, 5, 3, 4)));
+            system.addOutputVariable(zoom);
+         
+            WriteLine("2) Ajout des règles", true);
+
+            // Création des règles selon la matrice suivante :
+            // Plus le zoom est petit, plus on voit loin (mais moins détaillé)
+            // V \ D  || F | M | G |
+            // Lent   || N | P | P |
+            // Peu Ra || N | N | P |
+            // Rapide || G | N | P |
+            // Très R || G | G | P |
+            system.addFuzzyRule("IF Distance IS Grande THEN Zoom IS Petit");
+            system.addFuzzyRule("IF Distance IS Faible AND Vitesse IS Lente THEN Zoom IS Normal");
+            system.addFuzzyRule("IF Distance IS Faible AND Vitesse IS PeuRapide THEN Zoom IS Normal");
+            system.addFuzzyRule("IF Distance IS Faible AND Vitesse IS Rapide THEN Zoom IS Gros");
+            system.addFuzzyRule("IF Distance IS Faible AND Vitesse IS TresRapide THEN Zoom IS Gros");
+            system.addFuzzyRule("IF Distance IS Moyenne AND Vitesse IS Lente THEN Zoom IS Petit");
+            system.addFuzzyRule("IF Distance IS Moyenne AND Vitesse IS PeuRapide THEN Zoom IS Normal");
+            system.addFuzzyRule("IF Distance IS Moyenne AND Vitesse IS Rapide THEN Zoom IS Normal");
+            system.addFuzzyRule("IF Distance IS Moyenne AND Vitesse IS TresRapide THEN Zoom IS Gros");
+            WriteLine("9 règles ajoutées \n");
+
+            WriteLine("3) Résolution de cas pratiques", true);
+            // Cas pratique 1 : vitesse de 35 kms/h, et prochain changement de direction à 70m
+            WriteLine("Cas 1 :", true);
+            WriteLine("V = 35 (peu rapide)");
+            WriteLine("D = 70 (moyenne)");
+            system.SetInputVariable(vitesse, 35);
+            system.SetInputVariable(distance, 70);
+            WriteLine("Attendu : zoom normal, centroïde à 2.5");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+
+            // Cas pratique 2 : vitesse de 25 kms/h, et prochain changement de direction à 70m
+            system.ResetCase();
+            WriteLine("Cas 2 :", true);
+            WriteLine("V = 25 (50% lente, 50% peu rapide)");
+            WriteLine("D = 70 (moyenne)");
+            system.SetInputVariable(vitesse, 25);
+            system.SetInputVariable(distance, 70);
+            WriteLine("Attendu : zoom normal à 50% + zoom petit à 50%");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+
+            // Cas pratique 3 : vitesse de 72.5 kms/h, et prochain changement de direction à 40m
+            system.ResetCase(); 
+            WriteLine("Cas 3 :", true);
+            WriteLine("V = 72.5 (75% peu rapide + 25% rapide)");
+            WriteLine("D = 40 (50% faible)");
+            system.SetInputVariable(vitesse, 72.5);
+            system.SetInputVariable(distance, 40);
+            WriteLine("Attendu : zoom normal à 50% + zoom gros à 25%");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+            
+            // Cas pratique 4 : vitesse de 100 kms/h, et prochain changement de direction à 110m
+            system.ResetCase();
+            WriteLine("Cas 4 :", true);
+            WriteLine("V = 100 (50% rapide + 50% très rapide)");
+            WriteLine("D = 110 (80% moyenne, 20% grande)");
+            system.SetInputVariable(vitesse, 100);
+            system.SetInputVariable(distance, 110);
+            WriteLine("Attendu : zoom petit à 20% + zoom normal à 50% + zoom gros à 50%");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+            
+            // Cas pratique 5 : vitesse de 45 kms/h, et prochain changement de direction à 160m
+            system.ResetCase();
+            WriteLine("Cas 5 :", true);
+            WriteLine("V = 45 (100% peu rapide)");
+            WriteLine("D = 160 (100% grande)");
+            system.SetInputVariable(vitesse, 45);
+            system.SetInputVariable(distance, 160);
+            WriteLine("Attendu : zoom petit à 100%");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+            
+            while (true) ;
+        }
+
+        /// <summary>
+        /// Aide pour l'écriture de messages en console (et ajouts d'*)
+        /// </summary>
+        /// <param name="msg">Message à afficher</param>
+        /// <param name="stars">Besoin d'astérisques ?</param>
+        private static void WriteLine(string msg, bool stars = false)
+        {
+            if (stars)
+            {
+                msg = "*** " + msg + " ";
+                while (msg.Length < 45)
+                {
+                    msg += "*";
+                }
+            }
+            Console.WriteLine(msg);
+        }
+    }
+}

+ 36 - 0
FuzzyLogic/FuzzyLogicApp/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("FuzzyLogicApp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FuzzyLogicApp")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("6e7c871e-4ebb-40f0-8936-1c16f444dda6")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 87 - 0
FuzzyLogic/FuzzyLogicApp/Store.cs

@@ -0,0 +1,87 @@
+using FuzzyLogicPCL;
+using FuzzyLogicPCL.FuzzySets;
+using System;
+
+namespace FuzzyLogicApp
+{
+    class Store
+    {
+        static void Main(string[] args)
+        {
+            // Création du système
+            WriteLine("Gestion du store", true);
+            FuzzySystem system = new FuzzySystem("Gestion du store");
+
+            WriteLine("1) Ajout des variables", true);
+
+            // Ajout de la variable linguistique "Température"
+            WriteLine("Ajout de la variable Température");
+            LinguisticVariable temp = new LinguisticVariable("Temperature", 0, 35);
+            temp.AddValue(new LinguisticValue("Froid", new LeftFuzzySet(0, 35, 10, 12)));
+            temp.AddValue(new LinguisticValue("Frais", new TrapezoidalFuzzySet(0, 35, 10, 12, 15, 17)));
+            temp.AddValue(new LinguisticValue("Bon", new TrapezoidalFuzzySet(0, 35, 15, 17, 20, 25)));
+            temp.AddValue(new LinguisticValue("Chaud", new RightFuzzySet(0, 35, 20, 25)));
+            system.addInputVariable(temp);
+
+            // Ajout de la variable linguistique "Eclairage" 
+            WriteLine("Ajout de la variable Eclairage");
+            LinguisticVariable eclair = new LinguisticVariable("Eclairage", 0, 125000);
+            eclair.AddValue(new LinguisticValue("Sombre", new LeftFuzzySet(0, 125000, 20000, 30000)));
+            eclair.AddValue(new LinguisticValue("Moyen", new TrapezoidalFuzzySet(0, 125000, 20000, 30000, 65000, 85000)));
+            eclair.AddValue(new LinguisticValue("Fort", new RightFuzzySet(0, 125000, 65000, 85000)));
+            system.addInputVariable(eclair);
+
+            // Ajout de la variable linguistique "Store"
+            WriteLine("Ajout de la variable Hauteur de Store");
+            LinguisticVariable store = new LinguisticVariable("Store", 0, 115);
+            store.AddValue(new LinguisticValue("Ferme", new LeftFuzzySet(0, 115, 25, 40)));
+            store.AddValue(new LinguisticValue("MiHauteur", new TrapezoidalFuzzySet(0, 115, 25, 40, 85, 100)));
+            store.AddValue(new LinguisticValue("Remonte", new RightFuzzySet(0, 115, 85, 100)));
+            system.addOutputVariable(store);
+
+            WriteLine("2) Ajout des règles", true);
+
+            // Création des règles 
+            system.addFuzzyRule("IF Eclairage IS Sombre THEN Store IS Remonte");
+            system.addFuzzyRule("IF Eclairage IS Moyen AND Temperature IS Froid THEN Store IS Remonte");
+            system.addFuzzyRule("IF Eclairage IS Moyen AND Temperature IS Frais THEN Store IS Remonte");
+            system.addFuzzyRule("IF Eclairage IS Moyen AND Temperature IS Bon THEN Store IS MiHauteur");
+            system.addFuzzyRule("IF Eclairage IS Moyen AND Temperature IS Chaud THEN Store IS MiHauteur");
+            system.addFuzzyRule("IF Eclairage IS Fort AND Temperature IS Froid THEN Store IS Remonte");
+            system.addFuzzyRule("IF Eclairage IS Fort AND Temperature IS Frais THEN Store IS MiHauteur");
+            system.addFuzzyRule("IF Eclairage IS Fort AND Temperature IS Bon THEN Store IS Ferme");
+            system.addFuzzyRule("IF Eclairage IS Fort AND Temperature IS Chaud THEN Store IS Ferme");
+            WriteLine("9 règles ajoutées \n");
+
+            WriteLine("3) Résolution de cas pratiques", true);
+            // Cas pratique 1 : température de 21°, éclairage de 80000 lux
+            WriteLine("Cas 1 :", true);
+            WriteLine("T = 21 (80% bon, 20% chaud)");
+            WriteLine("E = 80 000 (25% moyen, 75% fort)");
+            system.SetInputVariable(temp, 21);
+            system.SetInputVariable(eclair, 80000);
+            WriteLine("Attendu : store plutôt fermé");
+            WriteLine("Résultat : " + system.Solve() + "\n");
+
+            while (true) ;
+        }
+
+        /// <summary>
+        /// Aide pour l'écriture de messages en console (et ajouts d'*)
+        /// </summary>
+        /// <param name="msg">Message à afficher</param>
+        /// <param name="stars">Besoin d'astérisques ?</param>
+        private static void WriteLine(string msg, bool stars = false)
+        {
+            if (stars)
+            {
+                msg = "*** " + msg + " ";
+                while (msg.Length < 45)
+                {
+                    msg += "*";
+                }
+            }
+            Console.WriteLine(msg);
+        }
+    }
+}

+ 147 - 0
FuzzyLogic/FuzzyLogicApp/Test.cs

@@ -0,0 +1,147 @@
+using FuzzyLogicPCL;
+using FuzzyLogicPCL.FuzzySets;
+using System;
+
+namespace FuzzyLogicApp
+{
+    class Test
+    {
+
+        static void Main(string[] args)
+        {
+            // Création des Fuzzy Sets
+            FuzzySet fz = new FuzzySet(0, 100);
+            Point2D pt1 = new Point2D(0, 1);
+            Point2D pt2 = new Point2D(50, 0);
+            Point2D pt3 = new Point2D(100, 0);
+            fz.Add(pt3);
+            fz.Add(pt2);
+            fz.Add(pt1);
+
+            TriangularFuzzySet tifz = new TriangularFuzzySet(0, 100, 30, 50, 70);
+            FuzzySet itifz = !tifz;
+            TrapezoidalFuzzySet trfz = new TrapezoidalFuzzySet(0, 100, 30, 50, 70, 80);
+            TrapezoidalFuzzySet trfz2 = new TrapezoidalFuzzySet(0, 100, 30, 50, 70, 80);
+            LeftFuzzySet lfz = new LeftFuzzySet(0, 100, 30, 50);
+            RightFuzzySet rfz = new RightFuzzySet(0, 100, 70, 80);
+
+            // Calcul des degrés
+            /*Console.WriteLine("**** Degree Fuzzy Set quelconque ****");
+            PrintDegrees(fz);
+            Console.WriteLine("\n**** Test Triangular Fuzzy Set ****");
+            PrintDegrees(tifz);
+            Console.WriteLine("\n**** Test Inversed Triangular Fuzzy Set ****");
+            PrintDegrees(itifz);
+            Console.WriteLine("\n**** Test Trapezoidal Fuzzy Set ****");
+            PrintDegrees(trfz);
+            Console.WriteLine("\n**** Test Left Fuzzy Set ****");
+            PrintDegrees(lfz);
+            Console.WriteLine("\n**** Test Right Fuzzy Set ****");
+            PrintDegrees(rfz);*/
+
+            // Affichage
+            /*Console.WriteLine("\n**** Print ****");
+            Console.WriteLine("Trap Fuzzy Set :");
+            Console.WriteLine(trfz.ToString());
+            Console.WriteLine("Left Fuzzy Set :");
+            Console.WriteLine(lfz.ToString());
+            Console.WriteLine("Triang Fuzzy Set :");
+            Console.WriteLine(tifz.ToString());
+            Console.WriteLine("Inverse triang Fuzzy Set :");
+            Console.WriteLine(itifz.ToString());*/
+
+            // Test des opérateurs
+            /*Console.WriteLine("\n**** Test operators ****");
+            Console.WriteLine("1/2 Trap Fuzzy Set :");
+            Console.WriteLine((trfz * 0.5).ToString());
+            Console.WriteLine("1/4 Left Fuzzy Set :");
+            Console.WriteLine((lfz * 0.25).ToString());*/
+
+            // Test égalité
+            /*Console.WriteLine("\n**** Test equality ****");
+            Console.WriteLine("Trap Fuzzy Set 1 :");
+            Console.WriteLine(trfz.ToString());
+            Console.WriteLine("Trap Fuzzy Set 2 :");
+            Console.WriteLine(trfz2.ToString());
+            Console.WriteLine("TRFZ == TRFZ2 (true) : " + (trfz == trfz2));
+            Console.WriteLine("TRFZ != TRFZ2 (false) : " + (trfz != trfz2));
+            Console.WriteLine("TRFZ == LFZ (false) : " + (trfz == lfz));*/
+
+            // Test intersection
+            /*Console.WriteLine("\n**** Test intersection");
+            Console.WriteLine("FS1 : " + trfz.ToString());
+            Console.WriteLine("FS2 : " + lfz.ToString());
+            Console.WriteLine("TIFS : " + tifz.ToString());
+            Console.WriteLine("FS : " + fz.ToString());
+            Console.WriteLine("****");
+            Console.WriteLine("FS1 & FS2 : " + (trfz & lfz).ToString());
+            Console.WriteLine("FS2 & FS1 : " + (lfz & trfz).ToString());
+            Console.WriteLine("FS1 & FS1 : " + (trfz & trfz).ToString());
+            Console.WriteLine("FS1 & 0.5 * FS2 : " + (trfz & (lfz * 0.5)).ToString());
+            Console.WriteLine("0.5 * FS1 & FS2 : " + ((trfz * 0.5) & lfz).ToString());
+            Console.WriteLine("FS1 & TIFS : " + (trfz & tifz).ToString());
+            Console.WriteLine("FS1 & FS : " + (trfz & fz).ToString());
+            Console.WriteLine("FS2 & TIFS : " + (lfz & tifz).ToString());
+            Console.WriteLine("FS2 & FS : " + (lfz & fz).ToString());
+            Console.WriteLine("tri1 & tri2 : " + (new TriangularFuzzySet(20, 100, 40, 50, 60) & new TriangularFuzzySet(0, 80, 30, 40, 50)).ToString());
+            Console.WriteLine("tri2 & tri1 : " + (new TriangularFuzzySet(0, 80, 30, 40, 50) & new TriangularFuzzySet(20, 100, 40, 50, 60)).ToString());*/
+
+            // Test union 
+            /*Console.WriteLine("\n**** Test union");
+            Console.WriteLine("FS1 : " + trfz.ToString());
+            Console.WriteLine("FS2 : " + lfz.ToString());
+            Console.WriteLine("TIFS : " + tifz.ToString());
+            Console.WriteLine("FS : " + fz.ToString());
+            Console.WriteLine("****");
+            Console.WriteLine("FS1 | FS2 : " + (trfz | lfz).ToString());
+            Console.WriteLine("FS2 | FS1 : " + (lfz | trfz).ToString());
+            Console.WriteLine("FS1 | FS1 : " + (trfz | trfz).ToString());
+            Console.WriteLine("FS1 | 0.5 * FS2 : " + (trfz | (lfz * 0.5)).ToString());
+            Console.WriteLine("0.5 * FS1 | FS2 : " + ((trfz * 0.5) | lfz).ToString());
+            Console.WriteLine("FS1 | TIFS : " + (trfz | tifz).ToString());
+            Console.WriteLine("FS1 | FS : " + (trfz | fz).ToString());
+            Console.WriteLine("FS2 | TIFS : " + (lfz | tifz).ToString());
+            Console.WriteLine("FS2 | FS : " + (lfz | fz).ToString());
+            Console.WriteLine("tri1 | tri2 : " + (new TriangularFuzzySet(20, 100, 40, 50, 60) | new TriangularFuzzySet(0, 80, 30, 40, 50)).ToString());
+            Console.WriteLine("tri2 | tri1 : " + (new TriangularFuzzySet(0, 80, 30, 40, 50) | new TriangularFuzzySet(20, 100, 40, 50, 60)).ToString());*/
+
+            // Test centre de gravité
+            /*Console.WriteLine("\n**** Test centre de gravité");
+            Console.WriteLine("TRFS : " + trfz.ToString());
+            Console.WriteLine("TRFS CoG : " + trfz.Centroid());
+            Console.WriteLine("1/2 TRFS : " + (trfz*0.5).ToString());
+            Console.WriteLine("1/2 TRFS CoG : " + (trfz*0.5).Centroid());
+            Console.WriteLine("TIFS : " + tifz.ToString());
+            Console.WriteLine("TIFS CoG : " + tifz.Centroid());
+            Console.WriteLine("LFS : " + lfz.ToString());
+            Console.WriteLine("LFS CoG : " + lfz.Centroid());
+            Console.WriteLine("FS : " + fz.ToString());
+            Console.WriteLine("FS CoG : " + fz.Centroid());
+            Console.WriteLine("TRFS & LFZ : " + (trfz & lfz).ToString());
+            Console.WriteLine("TRFS & LFZ CoG : " + (trfz & lfz).Centroid());
+            Console.WriteLine("TRFS | LFZ : " + (trfz | lfz).ToString());
+            Console.WriteLine("TRFS | LFZ CoG : " + (trfz | lfz).Centroid());*/
+
+            while (true) ;
+        }
+
+        static void PrintDegree(double x, FuzzySet fs)
+        {
+            Console.WriteLine("Degree at value " + x + " : " + fs.DegreeAtValue(x));
+        }
+
+        static void PrintDegrees(FuzzySet fs)
+        {
+            PrintDegree(-2, fs);
+            PrintDegree(0, fs);
+            PrintDegree(25, fs);
+            PrintDegree(30, fs);
+            PrintDegree(48, fs);
+            PrintDegree(50, fs);
+            PrintDegree(60, fs);
+            PrintDegree(75, fs);
+            PrintDegree(100, fs);
+            PrintDegree(120, fs);
+        }
+    }
+}

+ 495 - 0
FuzzyLogic/FuzzyLogicPCL/CodeMap.dgml

@@ -0,0 +1,495 @@
+<?xml version="1.0" encoding="utf-8"?>
+<DirectedGraph DataVirtualized="True" Layout="Sugiyama" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
+  <Nodes>
+    <Node Id="(@1 @3 @7 Member=.ctor)" Category="CodeSchema_Method" Bounds="-100.552345073983,-492.250072688516,121.303333333333,25.96" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="FuzzyExpression" UseManualLocation="True" />
+    <Node Id="(@1 @3 @7 Member=value)" Category="CodeSchema_Property" Bounds="-3.45000910252743,-436.289963121809,86.2757281207149,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="value" UseManualLocation="True" />
+    <Node Id="@10" Category="CodeSchema_Class" Bounds="40.9333760583803,-642.031946549589,113.46,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="3" Group="Collapsed" Label="FuzzyRule" UseManualLocation="True" />
+    <Node Id="@11" Category="CodeSchema_Class" Bounds="117.171164325551,-1.24554562133608,107.026666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FuzzySet" UseManualLocation="True" />
+    <Node Id="@13" Category="CodeSchema_Class" Bounds="169.262677589958,-697.032046549589,128.263333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="11" Group="Collapsed" Label="FuzzySystem" UseManualLocation="True" />
+    <Node Id="@15" Category="CodeSchema_Class" Bounds="75.7188871224462,-565.693697682417,119.843333333333,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="3" Group="Collapsed" Label="FuzzyValue" UseManualLocation="True" />
+    <Node Id="@16" Category="CodeSchema_Class" Bounds="0.418091177486374,-127.519246312611,126.776666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="LeftFuzzySet" UseManualLocation="True" />
+    <Node Id="@18" Category="CodeSchema_Class" Bounds="136.4599346014,-413.778372111822,140.253333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="3" Group="Collapsed" Label="LinguisticValue" UseManualLocation="True" />
+    <Node Id="@2" Category="CodeSchema_Assembly" Bounds="-229.915242155846,-777.032246549589,739.454069222665,840.786900928253" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="2" Group="Expanded" Label="FuzzyLogicPCL.dll" UseManualLocation="True" />
+    <Node Id="@20" Category="CodeSchema_Class" Bounds="132.538706342754,-484.144362838647,153.703333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="9" Group="Collapsed" Label="LinguisticVariable" UseManualLocation="True" />
+    <Node Id="@22" Category="CodeSchema_Class" Bounds="89.7741351866618,-217.789597479988,103.396666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="5" Group="Collapsed" Label="Point2D" UseManualLocation="True" />
+    <Node Id="@23" Category="CodeSchema_Class" Bounds="334.505493733486,-138.678162675264,135.033333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="RightFuzzySet" UseManualLocation="True" />
+    <Node Id="@24" Category="CodeSchema_Class" Bounds="172.70264510288,-83.6780626752641,168.379404702509,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="TrapezoidalFuzzySet" UseManualLocation="True" />
+    <Node Id="@25" Category="CodeSchema_Class" Bounds="-189.915242155845,-156.433499661035,160.333333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="TriangularFuzzySet" UseManualLocation="True" />
+    <Node Id="@27" Category="CodeSchema_Method" Bounds="148.502414722006,-607.556440330426,66.5600000000001,25.96" CodeSchemaProperty_IsInternal="True" DelayedCrossGroupLinksState="Fetched" Label="Apply" UseManualLocation="True" />
+    <Node Id="@28" Category="CodeSchema_Method" Bounds="229.995096072267,-725.846819719743,108.797817633813,25.9551999999999" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="addFuzzyRule" UseManualLocation="True" />
+    <Node Id="@29" Category="CodeSchema_Method" Bounds="196.890214033304,-429.870424668596,87.449626504485,25.95937792" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="AddValue" UseManualLocation="True" />
+    <Node Id="@30" Category="CodeSchema_Method" Bounds="-214.088479110368,-725.844214297634,127.194322857481,25.8949964799999" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="addInputVariable" UseManualLocation="True" />
+    <Node Id="@31" Category="CodeSchema_Method" Bounds="463.028860509115,-725.846819719743,136.992800967146,25.9551999999999" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="addOutputVariable" UseManualLocation="True" />
+    <Node Id="@32" Category="CodeSchema_Method" Bounds="273.433385340229,256.523491240618,97.7923784894635,25.94831872" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="CompareTo" UseManualLocation="True" />
+    <Node Id="@34" Category="CodeSchema_Method" Bounds="245.553833182609,-607.556795402213,88.5178015424182,25.9577804799999" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="FuzzyRule" UseManualLocation="True" />
+    <Node Id="@35" Category="CodeSchema_Method" Bounds="-56.8618854866001,-725.846900383806,103.263333333333,25.96" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="FuzzySystem" UseManualLocation="True" />
+    <Node Id="@36" Category="CodeSchema_Method" Bounds="-80.8143736175903,-429.890200059221,128.719532931152,25.95937792" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="LinguisticVariable" UseManualLocation="True" />
+    <Node Id="@38" Category="CodeSchema_Method" Bounds="53.112579985549,256.523503213569,78.3984667378864,25.95993088" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="Point2D" UseManualLocation="True" />
+    <Node Id="@39" Category="CodeSchema_Method" Bounds="204.3622463978,-498.459179882411,94.8633337036287,25.9592319999999" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="FuzzyValue" UseManualLocation="True" />
+    <Node Id="@4" Category="CodeSchema_Namespace" Bounds="20.9333760583803,-737.03214654959,395.679514657574,368.253874437767" DelayedChildNodesState="Incomplete" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="7" Group="Expanded" Label="FuzzyLogicPCL" UseManualLocation="True" />
+    <Node Id="@40" Category="CodeSchema_Method" Bounds="76.4015425607106,-725.846819719743,123.61668430048,25.9552000000001" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="SetInputVariable" UseManualLocation="True" />
+    <Node Id="@41" Category="CodeSchema_Method" Bounds="125.882932883719,-298.736836683706,115.255133319635,25.95993088" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="LinguisticValue" UseManualLocation="True" />
+    <Node Id="@42" Category="CodeSchema_Method" Bounds="78.8902502729281,-429.870424668596,87.449626504485,25.95937792" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="AddValue" UseManualLocation="True" />
+    <Node Id="@43" Category="CodeSchema_Method" Bounds="-239.711360578955,-429.890200059221,128.719532931152,25.95937792" CodeSchemaProperty_IsConstructor="True" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsSpecialName="True" DelayedCrossGroupLinksState="Fetched" Label="LinguisticVariable" UseManualLocation="True" />
+    <Node Id="@44" Category="CodeSchema_Method" Bounds="314.836114552946,-429.870455186174,97.5564063978184,25.95937792" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="ClearValues" UseManualLocation="True" />
+    <Node Id="@45" Category="CodeSchema_Property" Bounds="148.758280015888,-242.77681058501,69.4074960412588,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Fs" UseManualLocation="True" />
+    <Node Id="@46" Category="CodeSchema_Field" Bounds="-121.673455641426,-669.886969963884,69.9866666666667,25.96" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Inputs" UseManualLocation="True" />
+    <Node Id="@47" Category="CodeSchema_Property" Bounds="-100.552403889909,-436.289926526994,67.1023947873816,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="lv" UseManualLocation="True" />
+    <Node Id="@48" Category="CodeSchema_Field" Bounds="226.765952838006,-442.49989033163,50.055875036962,25.9592319999999" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Lv" UseManualLocation="True" />
+    <Node Id="@49" Category="CodeSchema_Property" Bounds="-202.571900749806,-373.930709233418,110.372394787382,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MaxValue" UseManualLocation="True" />
+    <Node Id="@50" Category="CodeSchema_Property" Bounds="-341.636156465319,-373.91040006347,108.455728120715,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MinValue" UseManualLocation="True" />
+    <Node Id="@51" Category="CodeSchema_Property" Bounds="-14.5688832794217,-648.170310365462,90.1457281207149,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Name" UseManualLocation="True" />
+    <Node Id="@52" Category="CodeSchema_Property" Bounds="28.4094673278067,-242.776810585009,90.1493358545922,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Name" UseManualLocation="True" />
+    <Node Id="@53" Category="CodeSchema_Property" Bounds="-61.5500023527991,-373.930709233418,90.1457281207149,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Name" UseManualLocation="True" />
+    <Node Id="@54" Category="CodeSchema_Field" Bounds="430.615573085788,-669.886969963884,74.8133333333334,25.96" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Output" UseManualLocation="True" />
+    <Node Id="@55" Category="CodeSchema_Field" Bounds="225.945247361504,-669.886969963884,81.4966666666666,25.96" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Problem" UseManualLocation="True" />
+    <Node Id="@56" Category="CodeSchema_Field" Bounds="259.707368957602,-551.59669300401,60.15,25.96" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Rule" UseManualLocation="True" />
+    <Node Id="@57" Category="CodeSchema_Field" Bounds="130.70183880234,-669.886969963884,65.2433333333333,25.96" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Rules" UseManualLocation="True" />
+    <Node Id="@58" Category="CodeSchema_Method" Bounds="368.695477870944,-725.846900383806,64.3333333333334,25.96" CodeSchemaProperty_IsPublic="True" DelayedCrossGroupLinksState="Fetched" Label="Solve" UseManualLocation="True" />
+    <Node Id="@59" Category="CodeSchema_Method" Bounds="161.956364244325,256.523503213569,80.6949680445531,25.95993088" CodeSchemaProperty_IsPublic="True" CodeSchemaProperty_IsVirtual="True" DelayedCrossGroupLinksState="Fetched" Label="ToString" UseManualLocation="True" />
+    <Node Id="@6" Category="CodeSchema_Namespace" Bounds="-209.915242155845,-257.789697479988,699.454069222665,301.544251858652" DelayedChildNodesState="Incomplete" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="5" Group="Expanded" Label="FuzzyLogicPCL‎.FuzzySets" UseManualLocation="True" />
+    <Node Id="@60" Category="CodeSchema_Field" Bounds="129.5771504202,-442.499890304123,66.5759817036287,25.9592319999999" CodeSchemaProperty_IsPrivate="True" DelayedCrossGroupLinksState="Fetched" Label="Value" UseManualLocation="True" />
+    <Node Id="@61" Category="CodeSchema_Property" Bounds="76.0538435346808,-373.910400065248,93.075728120715,25" CodeSchemaProperty_IsPrivate="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Values" UseManualLocation="True" />
+    <Node Id="@62" Category="CodeSchema_Property" Bounds="169.534201683389,312.48353409357,65.5284548995099,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="X" UseManualLocation="True" />
+    <Node Id="@63" Category="CodeSchema_Property" Bounds="73.7627005500561,312.48353409357,65.0851534861765,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Y" UseManualLocation="True" />
+    <Node Id="@8" Category="CodeSchema_Class" Bounds="250.309557382621,-553.477664002138,146.303333333333,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="3" Group="Collapsed" Label="FuzzyExpression" UseManualLocation="True" />
+  </Nodes>
+  <Links>
+    <Link Source="@10" Target="@27" Category="Contains" FetchingParent="@10" />
+    <Link Source="@10" Target="@34" Category="Contains" FetchingParent="@10" />
+    <Link Source="@10" Target="@56" Category="Contains" FetchingParent="@10" />
+    <Link Source="@11" Target="@22" Category="References" Bounds="-191.73205008608,19.3545260576812,158.837062737966,161.176906219693" IsSourceVirtualized="True" Weight="26" />
+    <Link Source="@11" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" Weight="3" />
+    <Link Source="@11" Target="@62" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="31" />
+    <Link Source="@11" Target="@63" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="26" />
+    <Link Source="@13" Target="@28" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@30" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@31" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@35" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@40" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@46" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@51" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@54" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@55" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@57" Category="Contains" FetchingParent="@13" />
+    <Link Source="@13" Target="@58" Category="Contains" FetchingParent="@13" />
+    <Link Source="@15" Target="@39" Category="Contains" FetchingParent="@15" />
+    <Link Source="@15" Target="@48" Category="Contains" FetchingParent="@15" />
+    <Link Source="@15" Target="@60" Category="Contains" FetchingParent="@15" />
+    <Link Source="@16" Target="@11" Category="InheritsFrom" Bounds="74.3864257861219,-102.519246312611,79.5805787506544,94.0224115762003" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@16" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" Weight="4" />
+    <Link Source="@18" Target="@41" Category="Contains" FetchingParent="@18" />
+    <Link Source="@18" Target="@45" Category="Contains" FetchingParent="@18" />
+    <Link Source="@18" Target="@52" Category="Contains" FetchingParent="@18" />
+    <Link Source="@2" Target="@4" Category="Contains" FetchingParent="@2" />
+    <Link Source="@2" Target="@6" Category="Contains" FetchingParent="@2" />
+    <Link Source="@20" Target="@29" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@36" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@42" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@43" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@44" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@49" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@50" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@53" Category="Contains" FetchingParent="@20" />
+    <Link Source="@20" Target="@61" Category="Contains" FetchingParent="@20" />
+    <Link Source="@22" Target="@32" Category="Contains" FetchingParent="@22" />
+    <Link Source="@22" Target="@38" Category="Contains" FetchingParent="@22" />
+    <Link Source="@22" Target="@59" Category="Contains" FetchingParent="@22" />
+    <Link Source="@22" Target="@62" Category="Contains" FetchingParent="@22" />
+    <Link Source="@22" Target="@63" Category="Contains" FetchingParent="@22" />
+    <Link Source="@23" Target="@11" Category="InheritsFrom" Bounds="217.440292358398,-113.678161621094,176.40153503418,109.445494651794" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@23" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" Weight="4" />
+    <Link Source="@24" Target="@11" Category="InheritsFrom" Bounds="190.623164351235,-58.6780626752641,53.1966947093246,50.8670318799738" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@24" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" Weight="6" />
+    <Link Source="@25" Target="@11" Category="InheritsFrom" Bounds="-87.160395652398,-131.433499661035,226.944577721928,125.588128039643" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7">
+      <Category Ref="CodeSchema_Calls" />
+    </Link>
+    <Link Source="@25" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" Weight="5" />
+    <Link Source="@27" Target="@11" Category="CodeSchema_Calls" IsTargetVirtualized="True" Weight="4">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@27" Target="@15" Category="References" Bounds="96.0567648696899,-423.973713701738,259.811272372359,14.4651598065797" Weight="1" />
+    <Link Source="@27" Target="@56" Category="CodeSchema_FieldRead" Bounds="206.810897827148,-581.556701660156,49.9081573486328,25.8594970703125" Weight="1" />
+    <Link Source="@28" Target="@10" Category="References" Bounds="228.798420040305,-733.284790136719,13.5728924154915,215.158859364932" Weight="2" />
+    <Link Source="@28" Target="@57" Category="CodeSchema_FieldRead" Bounds="199.538956372799,-700.004327623608,56.7181279296409,26.2226590769083" Weight="1" />
+    <Link Source="@29" Target="@18" Category="References" Bounds="55.227071576126,-259.331992531866,100.77929170972,154.124410871011" Weight="2" />
+    <Link Source="@29" Target="@61" Category="CodeSchema_Calls" Bounds="157.327924429199,-403.911079298525,55.6754090394658,26.1718628406654" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@30" Target="@20" Category="References" Bounds="-134.781115319395,-699.956641312916,281.15500645551,231.064937184029" Weight="2" />
+    <Link Source="@30" Target="@46" Category="CodeSchema_FieldRead" Bounds="-135.706078718653,-700.004327623608,27.411291372477,24.062167138378" Weight="1" />
+    <Link Source="@31" Target="@20" Category="References" Bounds="193.141645028195,-699.899043215026,320.490172548567,231.452483504922" Weight="1" />
+    <Link Source="@31" Target="@54" Category="CodeSchema_FieldWrite" Bounds="489.525193789039,-700.004327623608,27.3058436069784,24.0508291874806" Weight="1" />
+    <Link Source="@32" Target="@62" Category="CodeSchema_Calls" Bounds="237.508731599691,282.471809960618,56.7541869059265,26.2353257610421" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@34" Target="@56" Category="CodeSchema_FieldWrite" Bounds="289.76123046875,-581.556701660156,0,21" Weight="1" />
+    <Link Source="@35" Target="@10" Category="References" Bounds="-35.0726684816977,-733.280161496246,190.654620555305,217.370220105748" Weight="1" />
+    <Link Source="@35" Target="@15" Category="References" Bounds="-26.8879587889054,-733.280005428971,385.277857193021,256.125454155524" Weight="1" />
+    <Link Source="@35" Target="@20" Category="References" Bounds="3.3302050749036,-699.894493459167,151.947544134597,229.215698383059" Weight="1" />
+    <Link Source="@35" Target="@46" Category="CodeSchema_FieldWrite" Bounds="-60.4299276291619,-700.004327623608,36.2521499784967,24.9034872330548" Weight="1" />
+    <Link Source="@35" Target="@51" Category="CodeSchema_Calls" Bounds="0.726479845905475,-700.004327623608,20.1615432893931,43.5491277842549" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@35" Target="@55" Category="CodeSchema_FieldWrite" Bounds="46.2887333476291,-702.372725258444,170.819031093299,35.1485072927011" Weight="1" />
+    <Link Source="@35" Target="@57" Category="CodeSchema_FieldWrite" Bounds="33.8188458314774,-700.004327623608,88.4185307855389,29.3510030011524" Weight="1" />
+    <Link Source="@36" Target="@18" Category="References" Bounds="-87.4508436218606,-259.339308424795,60.5308438623047,153.293309225517" Weight="1" />
+    <Link Source="@36" Target="@53" Category="CodeSchema_Calls" Bounds="-16.468407518936,-403.93085468915,0.00852777712336206,21.0001097507933" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@36" Target="@61" Category="CodeSchema_Calls" Bounds="16.0638497392715,-403.93085468915,66.8524376454994,26.684039856321" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@38" Target="@62" Category="CodeSchema_Calls" Bounds="118.043983285211,282.48343409357,51.4382152527899,25.9467529584223" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@38" Target="@63" Category="CodeSchema_Calls" Bounds="95.5856861747401,282.48343409357,5.36568639450593,21.2734054700669" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@39" Target="@20" Category="References" Bounds="143.922060568154,-472.456041043987,95.4157899952801,99.5466283875533" Weight="1" />
+    <Link Source="@39" Target="@48" Category="CodeSchema_FieldWrite" Bounds="251.812194824219,-472.503936767578,0,20.9859313964844" Weight="1" />
+    <Link Source="@39" Target="@60" Category="CodeSchema_FieldWrite" Bounds="191.107299804688,-472.503936767578,40.0722198486328,25.1925048828125" Weight="1" />
+    <Link Source="@4" Target="@10" Category="Contains" FetchingParent="@4" />
+    <Link Source="@4" Target="@13" Category="Contains" FetchingParent="@4" />
+    <Link Source="@4" Target="@15" Category="Contains" FetchingParent="@4" />
+    <Link Source="@4" Target="@18" Category="Contains" FetchingParent="@4" />
+    <Link Source="@4" Target="@20" Category="Contains" FetchingParent="@4" />
+    <Link Source="@4" Target="@8" Category="Contains" FetchingParent="@4" />
+    <Link Source="@40" Target="@15" Category="References" Bounds="111.12269340539,-733.284790136719,274.86115584216,253.05739260283" Weight="1" />
+    <Link Source="@40" Target="@20" Category="References" Bounds="139.669054463957,-699.899043215026,26.384251749777,227.781484647712" Weight="1" />
+    <Link Source="@40" Target="@39" Category="CodeSchema_Calls" Weight="1" />
+    <Link Source="@40" Target="@55" Category="CodeSchema_FieldRead" Bounds="167.974033391796,-700.004327623608,60.6427915400904,26.4064326230072" Weight="1" />
+    <Link Source="@41" Target="@11" Category="References" Bounds="-14.0568596021416,-31.7149504775221,63.0407638526693,206.865536494615" Weight="1" />
+    <Link Source="@41" Target="@45" Category="CodeSchema_Calls" Bounds="183.480812032462,-272.776905803706,0.018347247951823,21.000098653575" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@41" Target="@52" Category="CodeSchema_Calls" Bounds="106.309912490144,-272.776905803706,51.4591154508581,25.9479158937962" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@42" Target="@11" Category="References" Bounds="-17.4291855277201,-259.331992531866,62.0672905170857,434.182269071411" Weight="1" />
+    <Link Source="@42" Target="@18" Category="References" Bounds="17.9020226430549,-259.331992531866,26.352823149051,152.787968025181" Weight="1" />
+    <Link Source="@42" Target="@41" Category="CodeSchema_Calls" Bounds="46.8611554625743,-259.331992531866,5.4559510032993,192.660717840698" Weight="1" />
+    <Link Source="@42" Target="@61" Category="CodeSchema_Calls" Bounds="122.600756802193,-403.911079298525,0.00883903168409006,21.0006435834557" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@43" Target="@18" Category="References" Bounds="-237.933932466237,-259.339308424795,162.135271762636,155.436001570614" Weight="1" />
+    <Link Source="@43" Target="@49" Category="CodeSchema_Calls" Bounds="-168.808880166046,-403.93085468915,11.0711678217545,21.9634017612358" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@43" Target="@50" Category="CodeSchema_Calls" Bounds="-254.10535185774,-403.93085468915,52.5473001300787,26.0259395671357" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@43" Target="@53" Category="CodeSchema_Calls" Bounds="-138.182372519351,-403.93085468915,77.4128403187912,27.032971696928" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@43" Target="@61" Category="CodeSchema_Calls" Bounds="-111.657990476423,-405.04586361051,178.996719366391,33.3430453189189" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@44" Target="@18" Category="References" Bounds="92.4735299202648,-259.331942887394,180.01643511636,155.767906914302" Weight="1" />
+    <Link Source="@44" Target="@61" Category="CodeSchema_Calls" Bounds="176.911529151575,-405.719485725415,138.171400701318,31.8053120641806" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@45" Target="@11" Category="References" IsSourceVirtualized="True" Weight="4">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@46" Target="@20" Category="References" Bounds="-70.6174655281981,-643.934393459166,216.685438052487,175.100360075039" Weight="1" />
+    <Link Source="@47" Target="@20" Category="References" Bounds="-36.6012106007373,-411.571960791122,117.954250976926,47.0332531994184" IsSourceVirtualized="True" Weight="4">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@48" Target="@20" Category="References" Bounds="154.286582351746,-416.496709043987,75.838024581353,45.4575634212262" Weight="1" />
+    <Link Source="@54" Target="@20" Category="References" Bounds="194.100969313796,-643.934393459167,255.072468174453,175.652574126251" Weight="1" />
+    <Link Source="@55" Target="@15" Category="References" Bounds="236.548457321896,-677.320005428971,166.957102941074,196.332363312664" Weight="1" />
+    <Link Source="@57" Target="@10" Category="References" Bounds="127.371988016208,-677.320005428971,64.4186416011288,159.828732165553" Weight="1" />
+    <Link Source="@58" Target="@10" Category="References" Bounds="258.715355952364,-733.280161496246,95.3101885316212,215.902945674987" Weight="3" />
+    <Link Source="@58" Target="@11" Category="CodeSchema_Calls" IsTargetVirtualized="True" Weight="5">
+      <Category Ref="CodeSchema_ReturnTypeLink" />
+    </Link>
+    <Link Source="@58" Target="@27" Category="CodeSchema_Calls" Weight="1" />
+    <Link Source="@58" Target="@49" Category="CodeSchema_Calls" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@58" Target="@50" Category="CodeSchema_Calls" IsTargetVirtualized="True" Weight="2" />
+    <Link Source="@58" Target="@54" Category="CodeSchema_FieldRead" Bounds="416.444804602596,-700.004327623608,29.0940895128554,24.2387262372805" Weight="4" />
+    <Link Source="@58" Target="@55" Category="CodeSchema_FieldRead" Bounds="306.110497667645,-700.28806932275,64.3098658014724,26.819181709174" Weight="1" />
+    <Link Source="@58" Target="@57" Category="CodeSchema_FieldRead" Bounds="204.681424493136,-705.406399926198,164.012258203039,38.6331624666103" Weight="1" />
+    <Link Source="@59" Target="@62" Category="CodeSchema_Calls" Bounds="202.300529191393,282.48343409357,0.00205122946152869,21.0001000429338" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@59" Target="@63" Category="CodeSchema_Calls" Bounds="135.726631283716,282.48343409357,44.1176520266682,25.4967360105335" IsTargetVirtualized="True" Weight="1" />
+    <Link Source="@6" Target="@11" Category="Contains" FetchingParent="@6" />
+    <Link Source="@6" Target="@16" Category="Contains" FetchingParent="@6" />
+    <Link Source="@6" Target="@22" Category="Contains" />
+    <Link Source="@6" Target="@23" Category="Contains" FetchingParent="@6" />
+    <Link Source="@6" Target="@24" Category="Contains" FetchingParent="@6" />
+    <Link Source="@6" Target="@25" Category="Contains" />
+    <Link Source="@61" Target="@18" Category="References" Bounds="21.8782368014106,-204.331400458586,21.8085235581675,97.8718626335277" IsSourceVirtualized="True" Weight="4" />
+    <Link Source="@8" Target="(@1 @3 @7 Member=.ctor)" Category="Contains" FetchingParent="@8" />
+    <Link Source="@8" Target="(@1 @3 @7 Member=value)" Category="Contains" FetchingParent="@8" />
+    <Link Source="@8" Target="@47" Category="Contains" FetchingParent="@8" />
+  </Links>
+  <Categories>
+    <Category Id="CodeSchema_Assembly" Label="Assembly" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="Assemblys" />
+    <Category Id="CodeSchema_Calls" Label="Appels" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Appelé par" OutgoingActionLabel="Appels" />
+    <Category Id="CodeSchema_Class" Label="Classe" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Classes" />
+    <Category Id="CodeSchema_Field" Label="Champ" BasedOn="CodeSchema_Member" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Field" NavigationActionLabel="Champs" />
+    <Category Id="CodeSchema_FieldRead" Label="Lecture du champ" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Lu par" OutgoingActionLabel="Lit les champs" />
+    <Category Id="CodeSchema_FieldReference" Label="Référence de champ" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Référencé par" OutgoingActionLabel="Champs de références" />
+    <Category Id="CodeSchema_FieldWrite" Label="Écriture dans le champ" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Écrit par" OutgoingActionLabel="Écrit dans les champs" />
+    <Category Id="CodeSchema_Member" Label="Membre" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Field" NavigationActionLabel="Membres" />
+    <Category Id="CodeSchema_Method" Label="Méthode" BasedOn="CodeSchema_Member" CanBeDataDriven="True" DefaultAction="Link:Forward:CodeSchema_Calls" Icon="CodeSchema_Method" NavigationActionLabel="Méthodes" />
+    <Category Id="CodeSchema_Namespace" Label="Espace de noms" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Type" Icon="CodeSchema_Namespace" NavigationActionLabel="Espaces de noms" />
+    <Category Id="CodeSchema_Property" Label="Propriété" BasedOn="CodeSchema_Member" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Property" NavigationActionLabel="Propriétés" />
+    <Category Id="CodeSchema_ReturnTypeLink" Label="Retour" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Types de retour" OutgoingActionLabel="Types de retour" />
+    <Category Id="CodeSchema_Type" Label="Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Types" />
+    <Category Id="Contains" Label="Contient" Description="Si la source de la liaison contient ou non l'objet cible" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Contenu par" IsContainment="True" OutgoingActionLabel="Contient" />
+    <Category Id="File" Label="Fichier" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="Fichiers" />
+    <Category Id="InheritsFrom" Label="Hérite de" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Hérité par" OutgoingActionLabel="Hérite de" />
+    <Category Id="References" Label="Références" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Référencé par" OutgoingActionLabel="Références" />
+  </Categories>
+  <Properties>
+    <Property Id="Bounds" DataType="System.Windows.Rect" />
+    <Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
+    <Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsConstructor" Label="Est un constructeur" Description="Indicateur qui spécifie que la méthode est un constructeur" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsFinal" Label="Est final" Description="Indicateur qui spécifie que le membre est 'Final' et qu'aucune dérivation n'est possible à partir de celui-ci" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsInternal" Label="Est interne" Description="Indicateur qui spécifie que la méthode est 'Internal'" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsPrivate" Label="Est privé" Description="Indicateur qui spécifie que la portée est privée" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsPublic" Label="Est public" Description="Indicateur qui spécifie que la portée est publique" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsSpecialName" Label="Est un nom spécial" Description="Indicateur qui spécifie que la méthode fait l'objet d'un traitement spécial par certains compilateurs" DataType="System.Boolean" />
+    <Property Id="CodeSchemaProperty_IsVirtual" Label="Est virtuel" Description="Indicateur qui spécifie que la méthode peut être substituée" DataType="System.Boolean" />
+    <Property Id="DataVirtualized" Label="Données virtualisées" Description="Si la valeur est True, le graphique peut contenir des nœuds et des liens qui représentent des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
+    <Property Id="DelayedChildNodesState" Label="État des nœuds enfants retardés" Description="Non spécifié si l'état des nœuds enfants retardés n'est pas spécifié. NotFetched si le groupe contient des nœuds enfants qui ne sont pas encore recherchés dans le graphique. Fetched si tous les nœuds enfants retardés du groupe ont déjà été extraits." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
+    <Property Id="DelayedCrossGroupLinksState" Label="État des liens retardés entre les groupes" Description="Non spécifié si l'état des liens retardés entre les groupes n'est pas spécifié. NotFetched si les liens retardés entre les groupes sur ce nœud ne sont pas encore recherchés dans le graphique. Fetched si tous les liens retardés entre les groupes ont déjà été extraits." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
+    <Property Id="Expression" DataType="System.String" />
+    <Property Id="FetchedChildrenCount" DataType="System.Int32" />
+    <Property Id="FetchingParent" DataType="Microsoft.VisualStudio.GraphModel.GraphNodeId" />
+    <Property Id="Group" Label="Groupe" Description="Affiche le nœud en tant que groupe" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
+    <Property Id="GroupLabel" DataType="System.String" />
+    <Property Id="Icon" Label="Icône" Description="Icône" DataType="System.String" />
+    <Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
+    <Property Id="IsContainment" DataType="System.Boolean" />
+    <Property Id="IsEnabled" DataType="System.Boolean" />
+    <Property Id="IsSourceVirtualized" Label="Source de liaison virtualisée" Description="Si la valeur est True, l'extrémité source de liaison contient des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="IsTargetVirtualized" Label="Cible du lien virtualisée" Description="Si la valeur est True, l'extrémité cible du lien contient des données pour les nœuds/liens virtualisés (c'est-à-dire, non réellement créés dans le graphique)." DataType="System.Boolean" />
+    <Property Id="Label" Label="Étiquette" Description="Étiquette affichable d'un objet pouvant être annoté" DataType="System.String" />
+    <Property Id="Layout" DataType="System.String" />
+    <Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
+    <Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
+    <Property Id="TargetType" DataType="System.Type" />
+    <Property Id="UseManualLocation" DataType="System.Boolean" />
+    <Property Id="Value" DataType="System.String" />
+    <Property Id="ValueLabel" DataType="System.String" />
+    <Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
+    <Property Id="Weight" Label="Épaisseur" Description="Épaisseur" DataType="System.Double" />
+  </Properties>
+  <QualifiedNames>
+    <Name Id="Assembly" Label="Assembly" ValueType="Uri" />
+    <Name Id="GenericArguments" Label="Arguments génériques" ValueType="Microsoft.VisualStudio.GraphModel.GraphNodeIdCollection" />
+    <Name Id="GenericParameterCount" Label="Nombre de paramètres génériques" ValueType="System.String" />
+    <Name Id="Member" Label="Membre" ValueType="System.Object" />
+    <Name Id="Name" Label="Nom" ValueType="System.String" />
+    <Name Id="Namespace" Label="Espace de noms" ValueType="System.String" />
+    <Name Id="OverloadingParameters" Label="Paramètre" ValueType="Microsoft.VisualStudio.GraphModel.GraphNodeIdCollection" Formatter="NameValueNoEscape" />
+    <Name Id="Type" Label="Type" ValueType="System.Object" />
+  </QualifiedNames>
+  <IdentifierAliases>
+    <Alias n="1" Uri="Assembly=$(a32adebd-8739-4a32-9947-c0230ba7e774.OutputPathUri)" />
+    <Alias n="2" Id="(@1)" />
+    <Alias n="3" Id="Namespace=FuzzyLogicPCL" />
+    <Alias n="4" Id="(@1 @3)" />
+    <Alias n="5" Id="Namespace=FuzzyLogicPCL.FuzzySets" />
+    <Alias n="6" Id="(@1 @5)" />
+    <Alias n="7" Id="Type=FuzzyExpression" />
+    <Alias n="8" Id="(@1 @3 @7)" />
+    <Alias n="9" Id="Type=FuzzyRule" />
+    <Alias n="10" Id="(@1 @3 @9)" />
+    <Alias n="11" Id="(@1 @5 Type=FuzzySet)" />
+    <Alias n="12" Id="Type=FuzzySystem" />
+    <Alias n="13" Id="(@1 @3 @12)" />
+    <Alias n="14" Id="Type=FuzzyValue" />
+    <Alias n="15" Id="(@1 @3 @14)" />
+    <Alias n="16" Id="(@1 @5 Type=LeftFuzzySet)" />
+    <Alias n="17" Id="Type=LinguisticValue" />
+    <Alias n="18" Id="(@1 @3 @17)" />
+    <Alias n="19" Id="Type=LinguisticVariable" />
+    <Alias n="20" Id="(@1 @3 @19)" />
+    <Alias n="21" Id="Type=Point2D" />
+    <Alias n="22" Id="(@1 @3 @21)" />
+    <Alias n="23" Id="(@1 @5 Type=RightFuzzySet)" />
+    <Alias n="24" Id="(@1 @5 Type=TrapezoidalFuzzySet)" />
+    <Alias n="25" Id="(@1 @5 Type=TriangularFuzzySet)" />
+    <Alias n="26" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETPortable/v4.0/Profile/Profile136/mscorlib.dll" />
+    <Alias n="27" Id="(@1 @3 @9 Member=(Name=Apply OverloadingParameters=[(@26 Namespace=System.Collections.Generic Type=(Name=List GenericParameterCount=1 GenericArguments=[@15]))]))" />
+    <Alias n="28" Id="(@1 @3 @12 Member=(Name=addFuzzyRule OverloadingParameters=[@10]))" />
+    <Alias n="29" Id="(@1 @3 @19 Member=(Name=AddValue OverloadingParameters=[@18]))" />
+    <Alias n="30" Id="(@1 @3 @12 Member=(Name=addInputVariable OverloadingParameters=[@20]))" />
+    <Alias n="31" Id="(@1 @3 @12 Member=(Name=addOutputVariable OverloadingParameters=[@20]))" />
+    <Alias n="32" Id="(@1 @3 @21 Member=(Name=CompareTo OverloadingParameters=[(@26 Namespace=System Type=Object)]))" />
+    <Alias n="33" Id="Name=.ctor" />
+    <Alias n="34" Id="(@1 @3 @9 Member=(@33 OverloadingParameters=[(@26 Namespace=System Type=String)]))" />
+    <Alias n="35" Id="(@1 @3 @12 Member=(@33 OverloadingParameters=[(@26 Namespace=System Type=String)]))" />
+    <Alias n="36" Id="(@1 @3 @19 Member=(@33 OverloadingParameters=[(@26 Namespace=System Type=String)]))" />
+    <Alias n="37" Id="(@26 Namespace=System Type=Double)" />
+    <Alias n="38" Id="(@1 @3 @21 Member=(@33 OverloadingParameters=[@37,@37]))" />
+    <Alias n="39" Id="(@1 @3 @14 Member=(@33 OverloadingParameters=[@20,@37]))" />
+    <Alias n="40" Id="(@1 @3 @12 Member=(Name=SetInputVariable OverloadingParameters=[@20,@37]))" />
+    <Alias n="41" Id="(@1 @3 @17 Member=(@33 OverloadingParameters=[(@26 Namespace=System Type=String),@11]))" />
+    <Alias n="42" Id="(@1 @3 @19 Member=(Name=AddValue OverloadingParameters=[(@26 Namespace=System Type=String),@11]))" />
+    <Alias n="43" Id="(@1 @3 @19 Member=(@33 OverloadingParameters=[(@26 Namespace=System Type=String),@37,@37]))" />
+    <Alias n="44" Id="(@1 @3 @19 Member=ClearValues)" />
+    <Alias n="45" Id="(@1 @3 @17 Member=Fs)" />
+    <Alias n="46" Id="(@1 @3 @12 Member=Inputs)" />
+    <Alias n="47" Id="(@1 @3 @7 Member=lv)" />
+    <Alias n="48" Id="(@1 @3 @14 Member=Lv)" />
+    <Alias n="49" Id="(@1 @3 @19 Member=MaxValue)" />
+    <Alias n="50" Id="(@1 @3 @19 Member=MinValue)" />
+    <Alias n="51" Id="(@1 @3 @12 Member=Name)" />
+    <Alias n="52" Id="(@1 @3 @17 Member=Name)" />
+    <Alias n="53" Id="(@1 @3 @19 Member=Name)" />
+    <Alias n="54" Id="(@1 @3 @12 Member=Output)" />
+    <Alias n="55" Id="(@1 @3 @12 Member=Problem)" />
+    <Alias n="56" Id="(@1 @3 @9 Member=Rule)" />
+    <Alias n="57" Id="(@1 @3 @12 Member=Rules)" />
+    <Alias n="58" Id="(@1 @3 @12 Member=Solve)" />
+    <Alias n="59" Id="(@1 @3 @21 Member=ToString)" />
+    <Alias n="60" Id="(@1 @3 @14 Member=Value)" />
+    <Alias n="61" Id="(@1 @3 @19 Member=Values)" />
+    <Alias n="62" Id="(@1 @3 @21 Member=X)" />
+    <Alias n="63" Id="(@1 @3 @21 Member=Y)" />
+  </IdentifierAliases>
+  <Styles>
+    <Style TargetType="Link" GroupLabel="Current Call Stack Link" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('CurrentCallStackCall')" />
+      <Setter Property="Stroke" Value="#FFD93701" />
+      <Setter Property="Weight" Value="1" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Call Stack Indirect Link" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('CallStackIndirectCall')" />
+      <Setter Property="Stroke" Value="#FFB8B8B8" />
+      <Setter Property="StrokeDashArray" Value="4 1" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Call Stack Direct Link" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('CallStackDirectCall')" />
+      <Setter Property="Stroke" Value="#FFB8B8B8" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="External And Current" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('ExternalCallStackEntry') And HasCategory('CurrentCallStackEntry')" />
+      <Setter Property="Background" Value="#FFFFF8F0" />
+      <Setter Property="Stroke" Value="#FFCE5100" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Nœud de la pile actuelle des appels" ValueLabel="Vrai">
+      <Condition Expression="HasCategory('CurrentCallStackEntry') And !HasCategory('QueryResult')" />
+      <Setter Property="Background" Value="#FFFFE3C6" />
+      <Setter Property="Stroke" Value="#FFD93701" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Entrée de la pile des appels externe" ValueLabel="Vrai">
+      <Condition Expression="HasCategory('ExternalCallStackEntry')" />
+      <Setter Property="Background" Value="#FFF7F7F7" />
+      <Setter Property="StrokeDashArray" Value="1 3" />
+      <Setter Property="Foreground" Value="#FFA5A5A5" />
+      <Setter Property="Stroke" Value="#FFA5A5A5" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Résultats" ValueLabel="Vrai">
+      <Condition Expression="HasCategory('QueryResult')" />
+      <Setter Property="Background" Value="#FFBCFFBE" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Assembly" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Assembly')" />
+      <Setter Property="Background" Value="#FF094167" />
+      <Setter Property="Stroke" Value="#FF094167" />
+      <Setter Property="Icon" Value="CodeSchema_Assembly" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Espace de noms" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Namespace')" />
+      <Setter Property="Background" Value="#FF0E619A" />
+      <Setter Property="Stroke" Value="#FF0E619A" />
+      <Setter Property="Icon" Value="CodeSchema_Namespace" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Interface" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Interface')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Interface" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Structure" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Struct')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Struct" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Énumération" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Enum')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Enum" />
+      <Setter Property="LayoutSettings" Value="List" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Délégué" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Delegate')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Delegate" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Classe" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Type')" />
+      <Setter Property="Background" Value="#FF1382CE" />
+      <Setter Property="Stroke" Value="#FF1382CE" />
+      <Setter Property="Icon" Value="CodeSchema_Class" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Propriété" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Property')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Property" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Méthode" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Method" />
+      <Setter Property="LayoutSettings" Value="List" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Événement" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Event')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Event" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Champ" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('CodeSchema_Field')" />
+      <Setter Property="Background" Value="#FFE0E0E0" />
+      <Setter Property="Stroke" Value="#FFE0E0E0" />
+      <Setter Property="Icon" Value="CodeSchema_Field" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="True">
+      <Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
+      <Setter Property="Icon" Value="CodeSchema_OutParameter" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Parameter" ValueLabel="True">
+      <Condition Expression="HasCategory('CodeSchema_Parameter')" />
+      <Setter Property="Icon" Value="CodeSchema_Parameter" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="True">
+      <Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
+      <Setter Property="Icon" Value="CodeSchema_LocalExpression" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Externes" ValueLabel="A la catégorie">
+      <Condition Expression="HasCategory('Externals')" />
+      <Setter Property="Background" Value="#FF424242" />
+      <Setter Property="Stroke" Value="#FF424242" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
+      <Setter Property="TargetDecorator" Value="OpenArrow" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
+      <Setter Property="TargetDecorator" Value="OpenArrow" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Field Read" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="Target.HasCategory('CodeSchema_Field') And HasCategory('CodeSchema_FieldRead')" />
+      <Setter Property="StrokeDashArray" Value="2 2" />
+    </Style>
+    <Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
+      <Condition Expression="Source.HasCategory('Comment')" />
+      <Setter Property="Stroke" Value="#FFE5C365" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsCursorLocation" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="DisabledBreakpointCount" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="EnabledBreakpointCount" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsInstructionPointerLocation" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+    <Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="Vrai" Visibility="Hidden">
+      <Condition Expression="IsCurrentCallstackFrame" />
+      <Setter Property="IndicatorWest" Value="WestIndicator" />
+    </Style>
+  </Styles>
+  <Paths>
+    <Path Id="a32adebd-8739-4a32-9947-c0230ba7e774.OutputPathUri" Value="file:///C:/Users/vm_42_000/SkyDrive/Documents/FuzzyLogic/FuzzyLogicPCL/bin/Debug/FuzzyLogicPCL.dll" />
+    <Path Id="FxReferenceAssembliesUri" Value="file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework" />
+  </Paths>
+</DirectedGraph>

+ 16 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzyExpression.cs

@@ -0,0 +1,16 @@
+using System;
+
+namespace FuzzyLogicPCL
+{
+    public class FuzzyExpression
+    {
+        internal LinguisticVariable Lv { get; set; }
+        internal String LinguisticValueName { get; set; }
+
+        public FuzzyExpression(LinguisticVariable _lv, String _value)
+        {
+            Lv = _lv;
+            LinguisticValueName = _value;
+        }
+    }
+}

+ 61 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzyLogicPCL.csproj

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{A32ADEBD-8739-4A32-9947-C0230BA7E774}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>FuzzyLogicPCL</RootNamespace>
+    <AssemblyName>FuzzyLogicPCL</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile136</TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .NET Framework is automatically included -->
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="FuzzyExpression.cs" />
+    <Compile Include="FuzzyRule.cs" />
+    <Compile Include="FuzzySets\FuzzySet.cs" />
+    <Compile Include="FuzzySets\LeftFuzzySet.cs" />
+    <Compile Include="FuzzySets\RightFuzzySet.cs" />
+    <Compile Include="FuzzySets\TrapezoidalFuzzySet.cs" />
+    <Compile Include="FuzzySystem.cs" />
+    <Compile Include="FuzzyValue.cs" />
+    <Compile Include="LinguisticValue.cs" />
+    <Compile Include="LinguisticVariable.cs" />
+    <Compile Include="FuzzySets\Point2D.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="FuzzySets\TriangularFuzzySet.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 84 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzyRule.cs

@@ -0,0 +1,84 @@
+using FuzzyLogicPCL.FuzzySets;
+using System;
+using System.Collections.Generic;
+
+namespace FuzzyLogicPCL
+{
+    public class FuzzyRule
+    {
+        List<FuzzyExpression> Premises;
+        FuzzyExpression Conclusion;
+
+        public FuzzyRule(List<FuzzyExpression> _prem, FuzzyExpression _concl)
+        {
+            Premises = _prem;
+            Conclusion = _concl;
+        }
+
+        public FuzzyRule(string ruleStr, FuzzySystem fuzzySystem)
+        {
+            // To Uppercase
+            ruleStr = ruleStr.ToUpper();
+
+            // Split premises and conclusion
+            String[] rule = ruleStr.Split(new String[]{" THEN "}, StringSplitOptions.RemoveEmptyEntries);
+            if (rule.Length == 2)
+            {
+                // Compute and add premises
+                rule[0] = rule[0].Remove(0, 2); // On enlève "IF"
+                String[] prem = rule[0].Trim().Split(new String[] {" AND "}, StringSplitOptions.RemoveEmptyEntries);
+                Premises = new List<FuzzyExpression>();
+                foreach (String exp in prem)
+                {
+                    String[] res = exp.Split(new String[] { " IS " }, StringSplitOptions.RemoveEmptyEntries);
+                    if (res.Length == 2)
+                    {
+                        FuzzyExpression fexp = new FuzzyExpression(fuzzySystem.LinguisticVariableByName(res[0]), res[1]);
+                        Premises.Add(fexp);
+                    }
+                }
+                // Add conclusion
+                String[] conclu = rule[1].Split(new String[] {" IS "}, StringSplitOptions.RemoveEmptyEntries);
+                if (conclu.Length == 2)
+                {
+                    Conclusion = new FuzzyExpression(fuzzySystem.LinguisticVariableByName(conclu[0]), conclu[1]);
+                }
+            }
+        }
+
+        internal FuzzySet Apply(List<FuzzyValue> Problem)
+        {
+            // Compute degree (for the whole rule) : min(degree for each premise)
+            double degree = 1;
+            foreach (FuzzyExpression premise in Premises)
+            {
+                double localDegree = 0;
+                LinguisticValue val = null;
+                // Search premise in problem : is there a value in the problem ? (officially : yes but...)
+                foreach (FuzzyValue pb in Problem)
+                {
+                    if (premise.Lv == pb.Lv)
+                    {
+                        // We have found the Linguistic Variable, we search for the Linguistic Value and stop
+                        val = premise.Lv.LinguisticValueByName(premise.LinguisticValueName);
+                        if (val != null)
+                        {
+                            localDegree = val.DegreeAtValue(pb.Value); // this is fuzzyfication here
+                            break;
+                        }
+                    }
+                }
+                if (val == null)
+                {
+                    return null; // problem here : we don't have the information in the problem
+                }
+
+                // Change overall degree and go on for the next premise
+                degree = Math.Min(degree, localDegree);
+            }
+
+            // We know how much the rule is true, so we compute the resulting fuzzy set * degree
+            return Conclusion.Lv.LinguisticValueByName(Conclusion.LinguisticValueName).Fs * degree;
+        }
+    }
+}

+ 335 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/FuzzySet.cs

@@ -0,0 +1,335 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace FuzzyLogicPCL.FuzzySets
+{
+    /// <summary>
+    /// Fuzzy set class : general methods
+    /// </summary>
+    public class FuzzySet
+    {
+        /// <summary>
+        /// List of points describing the fuzzy set
+        /// </summary>
+        protected List<Point2D> Points;
+
+        /// <summary>
+        /// Minimal value of the fuzzy set
+        /// </summary>
+        protected double Min {get;set;}
+
+        /// <summary>
+        /// Maximal value of the fuzzy set
+        /// </summary>
+        protected double Max { get; set; }
+
+        /// <summary>
+        /// Simple constructor
+        /// </summary>
+        /// <param name="min">Min. value</param>
+        /// <param name="max">Max. value</param>
+        public FuzzySet(double min, double max)
+        {
+            this.Points = new List<Point2D>();
+            this.Min = min;
+            this.Max = max;
+        }
+
+        /// <summary>
+        /// Add a point to the fuzzy set. It will be sorted to be at the good place
+        /// </summary>
+        /// <param name="pt">New point to add</param>
+        public void Add(Point2D pt)
+        {
+            Points.Add(pt);
+            Points.Sort();
+        }
+
+        /// <summary>
+        /// Add a point to the fuzzy set. It will be sorted to be at the good place
+        /// </summary>
+        /// <param name="x">New point x coordinate</param>
+        /// <param name="y">New point y coordinate (degree)</param>
+        public void Add(double x, double y)
+        {
+            Point2D pt = new Point2D(x, y);
+            Add(pt);
+        }
+
+        /// <summary>
+        /// Truth degree at a special x value. It is a simple line interpolation.
+        /// </summary>
+        /// <param name="XValue">The x coordinate</param>
+        /// <returns>The truth degree at this point</returns>
+        public double DegreeAtValue(double XValue)
+        {
+            // Check value in range (else, degree is null)
+            if (XValue < Min || XValue > Max)
+            {
+                return 0;
+            }
+
+            // Compute value from interpolation : we locate the before and after point
+            Point2D before = Points.LastOrDefault(pt => pt.X <= XValue);
+            Point2D after = Points.FirstOrDefault(pt => pt.X >= XValue);
+            if (before.Equals(after))
+            {
+                // x is the coordinate of a defined point
+                return before.Y;
+            }
+            else
+            {
+                // x is between two points, we compute the interpolated value
+                return (((before.Y - after.Y) * (after.X - XValue) / (after.X - before.X)) + after.Y);
+            }
+        }
+
+        /// <summary>
+        /// Compute the centroid (or x coordinate of the center of gravity) of a fuzzy set. Used for defuzzification
+        /// </summary>
+        /// <returns>The centroid x value</returns>
+        public double Centroid()
+        {
+            // Less than two points : no area, so no centroid
+            if (Points.Count < 2)
+            {
+                return 0;
+            }
+            else
+            {
+                // We compute the total area, and the ponderated one
+                double ponderatedArea = 0;
+                double totalArea = 0;
+                double localArea;
+                Point2D oldPt = null;
+                foreach (Point2D newPt in Points)
+                {
+                    if (oldPt != null)
+                    {
+                        // Centroids computation
+                        if (oldPt.Y == newPt.Y)
+                        {
+                            // For a rectangle : at the center value
+                            localArea = oldPt.Y * (newPt.X - oldPt.X);
+                            totalArea += localArea;
+                            ponderatedArea += ((newPt.X - oldPt.X) / 2 + oldPt.X) * localArea;
+                        }
+                        else
+                        {
+                            // We have two geometric shapes : a rectangle (at half) and a triangle (at 1/3 or 2/3 depending on the slope)
+                            // For the rectangle
+                            localArea = Math.Min(oldPt.Y, newPt.Y) * (newPt.X - oldPt.X);
+                            totalArea += localArea;
+                            ponderatedArea += ((newPt.X - oldPt.X) / 2 + oldPt.X) * localArea;
+                            // For the triangle
+                            localArea = (newPt.X - oldPt.X) * (Math.Abs(newPt.Y - oldPt.Y)) / 2;
+                            totalArea += localArea;
+                            if (newPt.Y > oldPt.Y)
+                            {
+                                ponderatedArea += (2.0 / 3.0 * (newPt.X - oldPt.X) + oldPt.X) * localArea;
+                            }
+                            else
+                            {
+                                ponderatedArea += (1.0 / 3.0 * (newPt.X - oldPt.X) + oldPt.X) * localArea;
+                            }
+                        }
+                    }
+                    oldPt = newPt;
+                }
+                // Return the centroid, that is the division of the two areas
+                return ponderatedArea / totalArea;
+            }
+        }
+
+        /// <summary>
+        /// ToString method, returns the fuzzy set with the format : [min-max] : list of points
+        /// </summary>
+        /// <returns>The fuzzy set returns as a string</returns>
+        public override String ToString()
+        {
+            String result = "[" + Min + "-" + Max + "]:";
+            foreach (Point2D pt in Points)
+            {
+                result += pt.ToString(); //"(" + pt.X + ";" + pt.Y + ")";
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// ! Operator (NOT) : inverse the fuzzy set (1- original value)
+        /// </summary>
+        /// <param name="fs">The original fuzzy set</param>
+        /// <returns>A new fuzzy set</returns>
+        public static FuzzySet operator !(FuzzySet fs) {
+            FuzzySet result = new FuzzySet(fs.Min, fs.Max);
+            foreach (Point2D pt in fs.Points)
+            {
+                result.Add(new Point2D(pt.X, 1 - pt.Y));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Compute the multiplication of a fuzzy set : all y values are "value" times
+        /// </summary>
+        /// <param name="fs">Original fuzzy set</param>
+        /// <param name="value">Number</param>
+        /// <returns>New fuzzy set (fuzzy set * value)</returns>
+        public static FuzzySet operator *(FuzzySet fs, double value)
+        {
+            FuzzySet result = new FuzzySet(fs.Min, fs.Max);
+            foreach (Point2D pt in fs.Points)
+            {
+                result.Add(new Point2D(pt.X, pt.Y * value));
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Equality operator
+        /// </summary>
+        /// <param name="fs1">First fuzzy set</param>
+        /// <param name="fs2">Second fuzzy set</param>
+        /// <returns>True if the two fuzzy sets have the same range and the same points, false otherwise</returns>
+        public static Boolean operator == (FuzzySet fs1, FuzzySet fs2)
+        {
+            return fs1.ToString().Equals(fs2.ToString());
+        }
+
+        /// <summary>
+        /// Difference operator
+        /// </summary>
+        /// <param name="fs1">First fuzzy set</param>
+        /// <param name="fs2">Second fuzzy set</param>
+        /// <returns>True if the two fuzzy sets have not the same range or not the same points</returns>
+        public static Boolean operator != (FuzzySet fs1, FuzzySet fs2)
+        {
+            return !(fs1 == fs2);
+        }
+
+        /// <summary>
+        /// Intersection operator : min(fs1, fs2)
+        /// </summary>
+        /// <param name="fs1">First fuzzy set</param>
+        /// <param name="fs2">Second fuzzy set</param>
+        /// <returns>New fuzzy set representing the intersection</returns>
+        public static FuzzySet operator &(FuzzySet fs1, FuzzySet fs2)
+        {
+            return Merge(fs1, fs2, Math.Min);
+        }
+
+        /// <summary>
+        /// Union operator : max(fs1, fs2)
+        /// </summary>
+        /// <param name="fs1">First fuzzy set</param>
+        /// <param name="fs2">Second fuzzy set</param>
+        /// <returns>New fuzzy set representing the union</returns>
+        public static FuzzySet operator |(FuzzySet fs1, FuzzySet fs2)
+        {
+            return Merge(fs1, fs2, Math.Max);
+        }
+
+        /// <summary>
+        /// Private method computing the merging of two fuzzy sets
+        /// </summary>
+        /// <param name="fs1">First fuzzy set</param>
+        /// <param name="fs2">Second fuzzy set</param>
+        /// <param name="MergeFt">Function for merging (eg min, or max), with two parameters (two double values) and the one to keep (double)</param>
+        /// <returns>The resulting fuzzy set</returns>
+        private static FuzzySet Merge(FuzzySet fs1, FuzzySet fs2, Func<double, double, double> MergeFt)
+        {
+            // New Fuzzy set
+            FuzzySet result = new FuzzySet(Math.Min(fs1.Min, fs2.Min), Math.Max(fs1.Max, fs2.Max));
+
+            // Creation of iterators on lists + initialization
+            List<Point2D>.Enumerator enum1 = fs1.Points.GetEnumerator();
+            List<Point2D>.Enumerator enum2 = fs2.Points.GetEnumerator();
+            enum1.MoveNext();
+            enum2.MoveNext();
+            Point2D oldPt1 = enum1.Current;
+
+            // Relative positions of fuzzy sets (to know when they intersect)
+            int relativePosition = 0;
+            int newRelativePosition = Math.Sign(enum1.Current.Y - enum2.Current.Y);
+
+            // Loop while there are points in the two collections
+            Boolean endOfList1 = false;
+            Boolean endOfList2 = false;
+            while (!endOfList1 && !endOfList2)
+            {
+                // New x values
+                double x1 = enum1.Current.X;
+                double x2 = enum2.Current.X;
+                // New current position
+                relativePosition = newRelativePosition;
+                newRelativePosition = Math.Sign(enum1.Current.Y - enum2.Current.Y);
+
+                if (relativePosition != newRelativePosition && relativePosition != 0 && newRelativePosition != 0)
+                {
+                    // Positions have changed, so we have to compute the intersection and add it
+                    // Compute the points coordinates
+                    double x = (x1 == x2 ? oldPt1.X : Math.Min(x1, x2));
+                    double xPrime = Math.Max(x1, x2);
+                    // Intersection
+                    double slope1 = (fs1.DegreeAtValue(xPrime) - fs1.DegreeAtValue(x)) / (xPrime - x);
+                    double slope2 = (fs2.DegreeAtValue(xPrime) - fs2.DegreeAtValue(x)) / (xPrime - x);
+                    double delta = (fs2.DegreeAtValue(x) - fs1.DegreeAtValue(x)) / (slope1 - slope2);
+                    // Add point
+                    result.Add(x + delta, fs1.DegreeAtValue(x + delta));
+                    // Go on
+                    if (x1 < x2)
+                    {
+                        oldPt1 = enum1.Current;
+                        endOfList1 = !(enum1.MoveNext());
+                    }
+                    else if (x1 > x2)
+                    {
+                        endOfList2 = !(enum2.MoveNext());
+                    }
+                }
+                else if (x1 == x2)
+                {
+                    // The two points are on the same X, so we take the good value (eg min or max)
+                    result.Add(x1, MergeFt(enum1.Current.Y, enum2.Current.Y));
+                    oldPt1 = enum1.Current;
+                    endOfList1 = !(enum1.MoveNext());
+                    endOfList2 = !(enum2.MoveNext());
+                }
+                else if (x1 < x2)
+                {
+                    // Fs1 point is first, we add the value (eg min or max) between the enum1 point and the degree for fs2
+                    result.Add(x1, MergeFt(enum1.Current.Y, fs2.DegreeAtValue(x1)));
+                    oldPt1 = enum1.Current;
+                    endOfList1 = !(enum1.MoveNext());
+                }
+                else
+                {
+                    // This time, it's fs2 first
+                    result.Add(x2, MergeFt(fs1.DegreeAtValue(x2), enum2.Current.Y));
+                    endOfList2 = !(enum2.MoveNext());
+                }
+            }
+
+            // Add end points
+            if (!endOfList1)
+            {
+                while (!endOfList1)
+                {
+                    result.Add(enum1.Current.X, MergeFt(0, enum1.Current.Y));
+                    endOfList1 = !enum1.MoveNext();
+                }
+            }
+            else if (!endOfList2)
+            {
+                while (!endOfList2)
+                {
+                    result.Add(enum2.Current.X, MergeFt(0, enum2.Current.Y));
+                    endOfList2 = !enum2.MoveNext();
+                }
+            }
+
+            return result;
+        }
+    }
+}

+ 15 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/LeftFuzzySet.cs

@@ -0,0 +1,15 @@
+
+namespace FuzzyLogicPCL.FuzzySets
+{
+    public class LeftFuzzySet : FuzzySet
+    {
+        public LeftFuzzySet(double min, double max, double heightMax, double baseMin)
+            : base(min, max)
+        {
+            Add(new Point2D(min, 1));
+            Add(new Point2D(heightMax, 1));
+            Add(new Point2D(baseMin, 0));
+            Add(new Point2D(max, 0));
+        }
+    }
+}

+ 50 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/Point2D.cs

@@ -0,0 +1,50 @@
+using System;
+
+namespace FuzzyLogicPCL
+{
+    /// <summary>
+    /// Simple utility class to create, manipulate and sort 2D points
+    /// </summary>
+    public class Point2D : IComparable
+    {
+        /// <summary>
+        /// X coordinate
+        /// </summary>
+        public double X { get; set; }
+
+        /// <summary>
+        /// Y coordinate
+        /// </summary>
+        public double Y { get; set; }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="x">x coordinate</param>
+        /// <param name="y">y coordinate</param>
+        public Point2D(double x, double y)
+        {
+            this.X = x;
+            this.Y = y;
+        }
+
+        /// <summary>
+        /// Comparison method, for the IComparable interface. The order axis used is only the x-axis.
+        /// </summary>
+        /// <param name="obj">The other point</param>
+        /// <returns>0 if equals, negative if smaller, postive if bigger</returns>
+        public int CompareTo(object obj)
+        {
+            return (int)(this.X - ((Point2D) obj).X);
+        }
+
+        /// <summary>
+        /// Conversion to string
+        /// </summary>
+        /// <returns>Coordinates in format : (x;y)</returns>
+        public override String ToString()
+        {
+            return "(" + this.X + ";" + this.Y + ")";
+        }
+    }
+}

+ 15 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/RightFuzzySet.cs

@@ -0,0 +1,15 @@
+
+namespace FuzzyLogicPCL.FuzzySets
+{
+    public class RightFuzzySet : FuzzySet
+    {
+        public RightFuzzySet(double min, double max, double heightMin, double baseMax)
+            : base(min, max)
+        {
+            Add(new Point2D(min, 0));
+            Add(new Point2D(heightMin, 0));
+            Add(new Point2D(baseMax, 1));
+            Add(new Point2D(max, 1));
+        }
+    }
+}

+ 17 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/TrapezoidalFuzzySet.cs

@@ -0,0 +1,17 @@
+
+namespace FuzzyLogicPCL.FuzzySets
+{
+    public class TrapezoidalFuzzySet : FuzzySet
+    {
+        public TrapezoidalFuzzySet(double min, double max, double baseLeft, double heightLeft, double heightRight, double baseRight)
+            : base(min, max)
+        {
+            Add(new Point2D(min, 0));
+            Add(new Point2D(baseLeft, 0));
+            Add(new Point2D(heightLeft, 1));
+            Add(new Point2D(heightRight, 1));
+            Add(new Point2D(baseRight, 0));
+            Add(new Point2D(max, 0));
+        }
+    }
+}

+ 15 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySets/TriangularFuzzySet.cs

@@ -0,0 +1,15 @@
+
+namespace FuzzyLogicPCL.FuzzySets
+{
+    public class TriangularFuzzySet : FuzzySet
+    {
+        public TriangularFuzzySet(double min, double max, double triangleBegin, double triangleCenter, double triangleEnd) : base(min, max)
+        {
+            Add(new Point2D(min, 0));
+            Add(new Point2D(triangleBegin, 0));
+            Add(new Point2D(triangleCenter, 1));
+            Add(new Point2D(triangleEnd, 0));
+            Add(new Point2D(max, 0));
+        }
+    }
+}

+ 87 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzySystem.cs

@@ -0,0 +1,87 @@
+using FuzzyLogicPCL.FuzzySets;
+using System;
+using System.Collections.Generic;
+
+namespace FuzzyLogicPCL
+{
+    public class FuzzySystem
+    {
+        String Name { get; set; }
+        List<LinguisticVariable> Inputs;
+        LinguisticVariable Output;
+        List<FuzzyRule> Rules;
+        List<FuzzyValue> Problem;
+
+        public FuzzySystem(String _name)
+        {
+            Name = _name;
+            Inputs = new List<LinguisticVariable>();
+            Rules = new List<FuzzyRule>();
+            Problem = new List<FuzzyValue>();
+        }
+
+        public void addInputVariable(LinguisticVariable lv)
+        {
+            Inputs.Add(lv);
+        }
+
+        public void addOutputVariable(LinguisticVariable lv)
+        {
+            Output = lv;
+        }
+
+        public void addFuzzyRule(FuzzyRule fuzzyRule)
+        {
+            Rules.Add(fuzzyRule);
+        }
+
+        public void addFuzzyRule(string ruleStr)
+        {
+            FuzzyRule rule = new FuzzyRule(ruleStr, this);
+            Rules.Add(rule);
+        }
+        public void SetInputVariable(LinguisticVariable inputVar, double value)
+        {
+            Problem.Add(new FuzzyValue(inputVar, value));
+        }
+
+
+        public double Solve()
+        {
+            // Application des règles et calcul du fuzzy set résultant
+            FuzzySet res = new FuzzySet(Output.MinValue, Output.MaxValue);
+            res.Add(Output.MinValue, 0);
+            res.Add(Output.MaxValue, 0);
+            
+            foreach (FuzzyRule rule in Rules)
+            {
+                // Calcul
+                res = res | rule.Apply(Problem);
+            }
+
+            // Defuzzification
+            return res.Centroid();
+        }
+
+        internal LinguisticVariable LinguisticVariableByName(string name)
+        {
+            foreach (LinguisticVariable input in Inputs)
+            {
+                if (input.Name.ToUpper().Equals(name))
+                {
+                    return input;
+                }
+            }
+            if (Output.Name.ToUpper().Equals(name))
+            {
+                return Output;
+            }
+            return null;
+        }
+
+        public void ResetCase()
+        {
+            Problem.Clear();
+        }
+    }
+}

+ 15 - 0
FuzzyLogic/FuzzyLogicPCL/FuzzyValue.cs

@@ -0,0 +1,15 @@
+
+namespace FuzzyLogicPCL
+{
+    class FuzzyValue
+    {
+        internal LinguisticVariable Lv;
+        internal double Value;
+
+        public FuzzyValue(LinguisticVariable _lv, double _value)
+        {
+            Lv = _lv;
+            Value = _value;
+        }
+    }
+}

+ 22 - 0
FuzzyLogic/FuzzyLogicPCL/LinguisticValue.cs

@@ -0,0 +1,22 @@
+using FuzzyLogicPCL.FuzzySets;
+using System;
+
+namespace FuzzyLogicPCL
+{
+    public class LinguisticValue
+    {
+        internal FuzzySet Fs { get; set; }
+        internal String Name { get; set; }
+
+        public LinguisticValue(String _name, FuzzySet _fs)
+        {
+            Name = _name;
+            Fs = _fs;
+        }
+
+        internal double DegreeAtValue(double val)
+        {
+            return Fs.DegreeAtValue(val);
+        }
+    }
+}

+ 48 - 0
FuzzyLogic/FuzzyLogicPCL/LinguisticVariable.cs

@@ -0,0 +1,48 @@
+using FuzzyLogicPCL.FuzzySets;
+using System;
+using System.Collections.Generic;
+
+namespace FuzzyLogicPCL
+{
+    public class LinguisticVariable
+    {
+        internal String Name { get; set; }
+        List<LinguisticValue> Values { get; set; }
+        internal Double MinValue { get; set; }
+        internal Double MaxValue { get; set; }
+
+        public LinguisticVariable(String _name, double _min, double _max)
+        {
+            Values = new List<LinguisticValue>();
+            Name = _name;
+            MinValue = _min;
+            MaxValue = _max;
+        }
+
+        public void AddValue(LinguisticValue lv) {
+            Values.Add(lv);
+        }
+
+        public void AddValue(String name, FuzzySet fs)
+        {
+            Values.Add(new LinguisticValue(name, fs));
+        }
+
+        public void ClearValues() {
+            Values.Clear();
+        }
+
+        internal LinguisticValue LinguisticValueByName(string name)
+        {
+            name = name.ToUpper();
+            foreach (LinguisticValue val in Values)
+            {
+                if (val.Name.ToUpper().Equals(name))
+                {
+                    return val;
+                }
+            }
+            return null;
+        }
+    }
+}

+ 30 - 0
FuzzyLogic/FuzzyLogicPCL/Properties/AssemblyInfo.cs

@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("FuzzyLogicPCL")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FuzzyLogicPCL")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("fr")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou utiliser par défaut les numéros de build et de version 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 28 - 0
GeneticAlgorithm/GeneticAlgorithm.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneticAlgorithm", "GeneticAlgorithm\GeneticAlgorithm.csproj", "{5EE77669-AC59-46A7-92C9-D00764DC71FD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Program", "MazeProgram\Program.csproj", "{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{5EE77669-AC59-46A7-92C9-D00764DC71FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5EE77669-AC59-46A7-92C9-D00764DC71FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5EE77669-AC59-46A7-92C9-D00764DC71FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5EE77669-AC59-46A7-92C9-D00764DC71FD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 100 - 0
GeneticAlgorithm/GeneticAlgorithm/EvolutionaryProcess.cs

@@ -0,0 +1,100 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace GeneticAlgorithm
+{
+    public class EvolutionaryProcess
+    {
+        protected List<Individual> population;
+        protected int generationNb = 0;
+        protected IIHM program = null;
+        protected double bestFitness;
+        protected string problem;
+
+        public EvolutionaryProcess(IIHM _program, string _problem)
+        {
+            program = _program;
+            problem = _problem;
+            IndividualFactory.getInstance().Init(problem);
+            population = new List<Individual>();
+            for (int i = 0; i < Parameters.individualsNb; i++)
+            {
+                population.Add(IndividualFactory.getInstance().getIndividual(problem));
+            }
+        }
+
+        public void Run()
+        {
+            bestFitness = Parameters.minFitness + 1;
+            while (generationNb < Parameters.generationsMaxNb && bestFitness > Parameters.minFitness)
+            {
+                // Evaluation
+                foreach (Individual ind in population)
+                {
+                    ind.Evaluate();
+                }
+
+                // Meilleur individu (stats)
+                Individual bestInd = population.OrderBy(x => x.Fitness).FirstOrDefault();
+                program.PrintBestIndividual(bestInd, generationNb);
+                bestFitness = bestInd.Fitness;
+
+                // Sélection et reproduction
+                List<Individual> newGeneration = new List<Individual>();
+                // Elitisme :
+                newGeneration.Add(bestInd);
+                for (int i = 0; i < Parameters.individualsNb - 1; i++)
+                {
+                    // Un ou deux parents ?
+                    if (Parameters.randomGenerator.NextDouble() < Parameters.crossoverRate)
+                    {
+                        // Choisir parents
+                        Individual father = Selection();
+                        Individual mother = Selection();
+
+                        // Reproduction
+                        newGeneration.Add(IndividualFactory.getInstance().getIndividual(problem, father, mother));
+                    }
+                    else
+                    {
+                        // Choisir parent
+                        Individual father = Selection();
+
+                        // Reproduction
+                        newGeneration.Add(IndividualFactory.getInstance().getIndividual(problem, father));
+                    }
+                }
+
+                // Survie
+                Survival(newGeneration);
+
+                generationNb++;
+            }
+        }
+
+        private void Survival(List<Individual> newGeneration)
+        {
+            // Remplacement
+            population = newGeneration;
+        }
+
+        private Individual Selection()
+        {
+            // Roulette biaisée sur le rang
+            int totalRanks = Parameters.individualsNb * (Parameters.individualsNb + 1) / 2;
+            int rand = Parameters.randomGenerator.Next(totalRanks);
+
+            int indIndex = 0;
+            int nbParts = Parameters.individualsNb;
+            int totalParts = 0;
+
+            while(totalParts < rand) {
+                indIndex++;
+                totalParts += nbParts;
+                nbParts --;
+            }
+
+            return population.OrderBy(x => x.Fitness).ElementAt(indIndex);
+        }
+    }
+}

+ 62 - 0
GeneticAlgorithm/GeneticAlgorithm/GeneticAlgorithm.csproj

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{5EE77669-AC59-46A7-92C9-D00764DC71FD}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>GeneticAlgorithm</RootNamespace>
+    <AssemblyName>GeneticAlgorithm</AssemblyName>
+    <DefaultLanguage>fr-FR</DefaultLanguage>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .NET Framework is automatically included -->
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="EvolutionaryProcess.cs" />
+    <Compile Include="IGene.cs" />
+    <Compile Include="MazeProblem\MazeGene.cs" />
+    <Compile Include="IIHM.cs" />
+    <Compile Include="Individual.cs" />
+    <Compile Include="IndividualFactory.cs" />
+    <Compile Include="MazeProblem\MazeIndividual.cs" />
+    <Compile Include="MazeProblem\Maze.cs" />
+    <Compile Include="Parameters.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="TSPProblem\TSP.cs" />
+    <Compile Include="TSPProblem\TSPGene.cs" />
+    <Compile Include="TSPProblem\TSPIndividual.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 9 - 0
GeneticAlgorithm/GeneticAlgorithm/IGene.cs

@@ -0,0 +1,9 @@
+using System;
+
+namespace GeneticAlgorithm
+{
+    internal interface IGene
+    {
+        void Mutate();
+    }
+}

+ 7 - 0
GeneticAlgorithm/GeneticAlgorithm/IIHM.cs

@@ -0,0 +1,7 @@
+namespace GeneticAlgorithm
+{
+    public interface IIHM
+    {
+        void PrintBestIndividual(Individual individual, int generation);
+    }
+}

+ 30 - 0
GeneticAlgorithm/GeneticAlgorithm/Individual.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace GeneticAlgorithm
+{
+    public abstract class Individual
+    {
+        protected double fitness = -1;
+        public double Fitness
+        {
+            get {
+                return fitness;
+            }
+        }
+
+        internal List<IGene> genome;
+
+        internal abstract void Mutate();
+
+        internal abstract double Evaluate();
+
+        public override string ToString()
+        {
+            String gen = fitness + " : ";
+            gen += String.Join(" - ", genome);
+            return gen;
+        }
+    }
+    
+}

+ 77 - 0
GeneticAlgorithm/GeneticAlgorithm/IndividualFactory.cs

@@ -0,0 +1,77 @@
+using System;
+
+namespace GeneticAlgorithm
+{
+    internal class IndividualFactory
+    {
+        private static IndividualFactory instance;
+
+        private IndividualFactory() { }
+
+        public static IndividualFactory getInstance()
+        {
+            if (instance == null)
+            {
+                instance = new IndividualFactory();
+            }
+            return instance;
+        }
+
+        public Individual getIndividual(String type) {
+            Individual ind = null;
+            switch (type)
+            {
+                case "Maze" :
+                    ind = new MazeIndividual();
+                    break;
+                case "TSP":
+                    ind = new TSPIndividual();
+                    break;
+            }
+            return ind;
+        }
+
+        public Individual getIndividual(String type, Individual father)
+        {
+            Individual ind = null;
+            switch (type)
+            {
+                case "Maze" :
+                    ind = new MazeIndividual((MazeIndividual) father);
+                    break;
+                case "TSP":
+                    ind = new TSPIndividual((TSPIndividual)father);
+                    break;
+            }
+            return ind;
+        }
+
+        public Individual getIndividual(String type, Individual father, Individual mother)
+        {
+            Individual ind = null;
+            switch (type)
+            {
+                case "Maze" :
+                    ind = new MazeIndividual((MazeIndividual)father, (MazeIndividual) mother);
+                    break;
+                case "TSP":
+                    ind = new TSPIndividual((TSPIndividual)father, (TSPIndividual)mother);
+                    break;
+            }
+            return ind;
+        }
+
+        internal void Init(string type)
+        {
+            switch (type)
+            {
+                case "Maze":
+                    Maze.Init(Maze.Maze2);
+                    break;
+                case "TSP":
+                    TSP.Init();
+                    break;
+            }
+        }
+    }
+}

+ 177 - 0
GeneticAlgorithm/GeneticAlgorithm/MazeProblem/Maze.cs

@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace GeneticAlgorithm
+{
+    struct Case
+    {
+        public int i;
+        public int j;
+
+        public Case(int _i, int _j)
+        {
+            i = _i;
+            j = _j;
+        }
+    }
+
+    public static class Maze
+    {
+        /*
+         * Générateurs de labyrinthes :
+         * http://www.desmoulins.fr/index.php?pg=divers!jeux!labyrinthes&ses=1
+         * http://www.echodelta.net/mafalda/rectang/dessinlab.php4
+         * 
+         */
+
+        public static String Maze1 = "*--*--*--*--*\n" +
+                                     "E           |\n" +
+                                     "*  *  *--*--*\n" +
+                                     "|  |  |     |\n" +
+                                     "*  *--*  *  *\n" +
+                                     "|        |  |\n" +
+                                     "*  *--*--*  *\n" +
+                                     "|        |  S\n" +
+                                     "*--*--*--*--*";
+
+        public static String Maze2 = "*--*--*--*--*--*--*\n" +
+                                     "E        |  |     |\n" +
+                                     "*--*--*  *  *  *--*\n" +
+                                     "|     |     |     |\n" +
+                                     "*  *  *  *  *  *  *\n" +
+                                     "|  |  |  |     |  |\n" +
+                                     "*--*  *  *--*--*  *\n" +
+                                     "|     |  |     |  |\n" +
+                                     "*  *--*--*  *  *  *\n" +
+                                     "|  |        |  |  |\n" +
+                                     "*  *  *  *--*  *  *\n" +
+                                     "|     |     |     S\n" +
+                                     "*--*--*--*--*--*--*";
+
+        private static List<Tuple<Case, Case>> paths;
+        private static Case entrance;
+        private static Case exit;
+
+        public enum Direction { Top, Bottom, Left, Right };
+        public static void Init(String s)
+        {
+            paths = new List<Tuple<Case, Case>>();
+
+            String[] lines = s.Split(new char[] {'\n'}, StringSplitOptions.RemoveEmptyEntries);
+            int nbLines = 0;
+            foreach (String line in lines)
+            {
+                if (nbLines % 2 != 0)
+                {
+                    // Ligne impaire, donc contenu d'un couloir
+                    int index = line.IndexOf('E');
+                    if (index != -1)
+                    {
+                        if (index == line.Length - 1)
+                        {
+                            index--;
+                        }
+                        entrance = new Case(nbLines / 2, index / 3);
+                    }
+                    else
+                    {
+                        index = line.IndexOf('S');
+                        if (index != -1)
+                        {
+                            if (index == line.Length-1)
+                            {
+                                index--;
+                            }
+                            exit = new Case(nbLines / 2, index / 3);
+                        }
+                    }
+                    for (int column = 0; column < line.Length / 3; column++)
+                    {
+                        String caseStr = line.Substring(column * 3, 3);
+                        if (!caseStr.Contains("|") && !caseStr.Contains("E") && !caseStr.Contains("S"))
+                        {
+                            paths.Add(new Tuple<Case, Case>(new Case(nbLines / 2, column - 1), new Case(nbLines / 2, column)));
+                        }
+                    }  
+                }
+                else
+                {
+                    // Ligne paire, donc murs
+                    String[] cases = line.Split(new char[] { '*' }, StringSplitOptions.RemoveEmptyEntries);
+                    int column = 0;
+                    foreach (String mur in cases) {
+                        if (mur.Equals("  "))
+                        {
+                            paths.Add(new Tuple<Case, Case>(new Case(nbLines / 2 - 1, column), new Case(nbLines / 2, column)));
+                        }
+                        column++;
+                    }
+                }
+                nbLines++;
+            }
+        }
+
+        internal static double Evaluate(MazeIndividual individual)
+        {
+            Case currentPosition = entrance;
+            
+            bool end = false;
+            foreach (MazeGene g in individual.genome)
+            {
+                switch (g.direction)
+                {
+                    case Direction.Bottom :
+                        while (IsPossible(currentPosition, new Case(currentPosition.i + 1, currentPosition.j)) && !end)
+                        {
+                            currentPosition.i++;
+                            end = IsJunction(currentPosition) || currentPosition.Equals(exit);
+                        }
+                        end = false;
+                        break;
+                    case Direction.Top:
+                        while (IsPossible(currentPosition, new Case(currentPosition.i - 1, currentPosition.j)) && !end)
+                        {
+                            currentPosition.i--;
+                            end = IsJunction(currentPosition) || currentPosition.Equals(exit); 
+                        }
+                        end = false;
+                        break;
+                    case Direction.Right:
+                        while (IsPossible(currentPosition, new Case(currentPosition.i, currentPosition.j + 1)) && !end)
+                        {
+                            currentPosition.j++;
+                            end = IsJunction(currentPosition) || currentPosition.Equals(exit);
+                        }
+                        end = false;
+                        break;
+                    case Direction.Left:
+                        while (IsPossible(currentPosition, new Case(currentPosition.i, currentPosition.j - 1)) && !end)
+                        {
+                            currentPosition.j--;
+                            end = IsJunction(currentPosition) || currentPosition.Equals(exit);
+                        }
+                        end = false;
+                        break;
+                }
+                if (currentPosition.Equals(exit)) { 
+                    return 0; 
+                }
+            }
+
+            int distance = Math.Abs(exit.i - currentPosition.i) + Math.Abs(exit.j - currentPosition.j);
+            return distance;
+        }
+
+        private static bool IsPossible(Case pos1, Case pos2)
+        {
+            return paths.Contains(new Tuple<Case, Case>(pos1, pos2)) || paths.Contains(new Tuple<Case, Case>(pos2, pos1));
+        }
+
+        private static bool IsJunction(Case pos)
+        {
+            int nbRoads = paths.Count(x => (x.Item1.Equals(pos) || x.Item2.Equals(pos)));
+            return nbRoads > 2;
+        }
+    }
+}

+ 29 - 0
GeneticAlgorithm/GeneticAlgorithm/MazeProblem/MazeGene.cs

@@ -0,0 +1,29 @@
+namespace GeneticAlgorithm
+{
+    internal class MazeGene : IGene
+    {
+        
+
+        public Maze.Direction direction;
+
+        public MazeGene()
+        {
+            direction = (Maze.Direction)Parameters.randomGenerator.Next(4);
+        }
+
+        public MazeGene(MazeGene g)
+        {
+            direction = g.direction;
+        }
+
+        public override string ToString()
+        {
+            return direction.ToString().Substring(0,1);
+        }
+
+        public void Mutate()
+        {
+            direction = (Maze.Direction) Parameters.randomGenerator.Next(4);
+        }
+    }
+}

+ 78 - 0
GeneticAlgorithm/GeneticAlgorithm/MazeProblem/MazeIndividual.cs

@@ -0,0 +1,78 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace GeneticAlgorithm
+{
+    internal class MazeIndividual : Individual
+    {
+        // Constructeur par défaut : initialisation aléatoire
+        public MazeIndividual()
+        {
+            genome = new List<IGene>();
+            for (int i = 0; i < Parameters.initialGenesNb; i++)
+            {
+                genome.Add(new MazeGene());
+            }
+        }
+
+        // Constructeur avec un parent (copie + mutations)
+        public MazeIndividual(MazeIndividual father)
+        {
+            this.genome = new List<IGene>();
+            foreach (MazeGene g in father.genome)
+            {
+                this.genome.Add(new MazeGene(g));
+            }
+            Mutate();
+        }
+
+        // Constructeur avec deux parents (crossover et mutations)
+        public MazeIndividual(MazeIndividual father, MazeIndividual mother)
+        {
+            this.genome = new List<IGene>();
+            // Crossover
+            int cuttingPoint = Parameters.randomGenerator.Next(father.genome.Count);
+            foreach (MazeGene g in father.genome.Take(cuttingPoint))
+            {
+                this.genome.Add(new MazeGene(g));
+            }
+            foreach (MazeGene g in mother.genome.Skip(cuttingPoint))
+            {
+                this.genome.Add(new MazeGene(g));
+            }
+            // Mutation
+            Mutate();
+        }
+
+        internal override void Mutate()
+        {
+            // Suppression ?
+            if (Parameters.randomGenerator.NextDouble() < Parameters.mutationDeleteRate)
+            {
+                int geneIndex = Parameters.randomGenerator.Next(genome.Count);
+                genome.RemoveAt(geneIndex);
+            }
+
+            // Ajout ?
+            if (Parameters.randomGenerator.NextDouble() < Parameters.mutationAddRate)
+            {
+                genome.Add(new MazeGene());
+            }
+
+            // Remplacement gène par gène ?
+            foreach (MazeGene g in genome)
+            {
+                if (Parameters.randomGenerator.NextDouble() < Parameters.mutationsRate)
+                {
+                    g.Mutate();
+                }
+            }
+        }
+
+        internal override double Evaluate()
+        {
+            fitness = Maze.Evaluate(this);
+            return fitness;
+        }
+    }
+}

+ 19 - 0
GeneticAlgorithm/GeneticAlgorithm/Parameters.cs

@@ -0,0 +1,19 @@
+using System;
+
+namespace GeneticAlgorithm
+{
+    public static class Parameters
+    {
+        public static int individualsNb = 20;
+        public static int generationsMaxNb = 50;
+        public static int initialGenesNb = 10;
+        public static int minFitness = 0;
+
+        public static double mutationsRate = 0.20;
+        public static double mutationAddRate = 0.20;
+        public static double mutationDeleteRate = 0.10;
+        public static double crossoverRate = 0.60;
+
+        public static Random randomGenerator = new Random();
+    }
+}

+ 30 - 0
GeneticAlgorithm/GeneticAlgorithm/Properties/AssemblyInfo.cs

@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("GeneticAlgorithm")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GeneticAlgorithm")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("fr")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou utiliser par défaut les numéros de build et de version 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 60 - 0
GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSP.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+
+namespace GeneticAlgorithm
+{
+    internal struct City
+    {
+        String name;
+
+        public City(string p)
+        {
+            name = p;
+        }
+
+        public override string ToString()
+        {
+            return name;
+        }
+    }
+
+    public static class TSP
+    {
+        static List<City> cities;
+        static int[][] distances;
+        public static void Init()
+        {
+            cities = new List<City>()
+            {
+                new City("Paris"),
+                new City("Lyon"),
+                new City("Marseille"),
+                new City("Nantes"),
+                new City("Bordeaux"),
+                new City("Toulouse"),
+                new City("Lille")
+            };
+
+            distances = new int[cities.Count][];
+
+            distances[0] = new int[] { 0, 462, 772, 379, 546, 678, 215 }; // Paris
+            distances[1] = new int[] { 462, 0, 326, 598, 842, 506, 664 }; // Lyon
+            distances[2] = new int[] { 772, 326, 0, 909, 555, 407, 1005 }; // Marseille
+            distances[3] = new int[] { 379, 598, 909, 0, 338, 540, 584 }; // Nantes
+            distances[4] = new int[] { 546, 842, 555, 338, 0, 250, 792 }; // Bordeaux
+            distances[5] = new int[] { 678, 506, 407, 540, 250, 0, 926 }; // Toulouse
+            distances[6] = new int[] { 215, 664, 1005, 584, 792, 926, 0 }; // Lille
+        }
+
+        internal static int getDistance(City _city1, City _city2)
+        {
+            return distances[cities.IndexOf(_city1)][cities.IndexOf(_city2)];
+        }
+
+        internal static List<City> getCities() {
+            List<City> listCities = new List<City>();
+            listCities.AddRange(cities);
+            return listCities;
+        }
+    }
+}

+ 36 - 0
GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSPGene.cs

@@ -0,0 +1,36 @@
+using System;
+
+namespace GeneticAlgorithm
+{
+    
+
+    internal class TSPGene : IGene
+    {
+        City city;
+        
+        public TSPGene(City _city)
+        {
+            city = _city;
+        }
+
+        public TSPGene(TSPGene g)
+        {
+            city = g.city;
+        }
+
+        internal int getDistance(TSPGene g)
+        {
+            return TSP.getDistance(city, g.city);
+        }
+
+        public override string ToString()
+        {
+            return city.ToString();
+        }
+
+        public void Mutate()
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 83 - 0
GeneticAlgorithm/GeneticAlgorithm/TSPProblem/TSPIndividual.cs

@@ -0,0 +1,83 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace GeneticAlgorithm
+{
+    internal class TSPIndividual : Individual
+    {
+        // Constructeur par défaut : initialisation aléatoire
+        public TSPIndividual()
+        {
+            genome = new List<IGene>();
+            List<City> cities = TSP.getCities();
+            while (cities.Count != 0)
+            {
+                int index = Parameters.randomGenerator.Next(cities.Count);
+                genome.Add(new TSPGene(cities.ElementAt(index)));
+                cities.RemoveAt(index);
+            }
+        }
+
+        // Constructeur avec un parent (copie + mutations)
+        public TSPIndividual(TSPIndividual father)
+        {
+            this.genome = new List<IGene>();
+            foreach (TSPGene g in father.genome)
+            {
+                this.genome.Add(new TSPGene(g));
+            }
+            Mutate();
+        }
+
+        // Constructeur avec deux parents (crossover et mutations)
+        public TSPIndividual(TSPIndividual father, TSPIndividual mother)
+        {
+            this.genome = new List<IGene>();
+            // Crossover
+            int cuttingPoint = Parameters.randomGenerator.Next(father.genome.Count);
+            foreach (TSPGene g in father.genome.Take(cuttingPoint))
+            {
+                this.genome.Add(new TSPGene(g));
+            }
+            foreach (TSPGene g in mother.genome)
+            {
+                if (!genome.Contains(g))
+                {
+                    this.genome.Add(new TSPGene(g));
+                }
+            }
+
+            // Mutation
+            Mutate();
+        }
+
+        internal override void Mutate()
+        {
+            if (Parameters.randomGenerator.NextDouble() < Parameters.mutationsRate)
+            {
+                int index1 = Parameters.randomGenerator.Next(genome.Count);
+                TSPGene g = (TSPGene)genome.ElementAt(index1);
+                genome.RemoveAt(index1);
+                int index2 = Parameters.randomGenerator.Next(genome.Count);
+                genome.Insert(index2, g);
+            }
+        }
+
+        internal override double Evaluate()
+        {
+            int totalKm = 0;
+            TSPGene oldGene = null;
+            foreach (TSPGene g in genome)
+            {
+                if (oldGene != null)
+                {
+                    totalKm += g.getDistance(oldGene);
+                }
+                oldGene = g;
+            }
+            totalKm += oldGene.getDistance((TSPGene)genome.FirstOrDefault());
+            fitness = totalKm;
+            return fitness;
+        }
+    }
+}

+ 6 - 0
GeneticAlgorithm/MazeProgram/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 46 - 0
GeneticAlgorithm/MazeProgram/Program.cs

@@ -0,0 +1,46 @@
+using GeneticAlgorithm;
+using System;
+
+namespace MazeProgram
+{
+    class Program : IIHM
+    {
+        static void Main(string[] args)
+        {
+            Program p = new Program();
+            p.Run();
+        }
+
+        public void Run()
+        {
+            // Init
+            Parameters.crossoverRate = 0.6;
+            Parameters.mutationsRate = 0.1;
+            Parameters.mutationAddRate = 0.2;
+            Parameters.mutationDeleteRate = 0.1;
+            Parameters.minFitness = 0;
+            EvolutionaryProcess geneticAlgoMaze = new EvolutionaryProcess(this, "Maze");
+
+            // Lancement
+            geneticAlgoMaze.Run();
+
+            //Init
+            Parameters.crossoverRate = 0.0;
+            Parameters.mutationsRate = 0.3;
+            Parameters.mutationAddRate = 0.0;
+            Parameters.mutationDeleteRate = 0.0;
+            Parameters.minFitness = 2579;
+            EvolutionaryProcess geneticAlgoTSP = new EvolutionaryProcess(this, "TSP");
+
+            // Lancement
+            geneticAlgoTSP.Run();
+
+            while (true) ;
+        }
+
+        public void PrintBestIndividual(Individual individual, int generation)
+        {
+            Console.WriteLine(generation + " -> " + individual);
+        }
+    }
+}

+ 64 - 0
GeneticAlgorithm/MazeProgram/Program.csproj

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{4C9FA0F3-6760-4A0F-9468-21E5E0A7D51D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MazeProgram</RootNamespace>
+    <AssemblyName>MazeProgram</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\GeneticAlgorithm\GeneticAlgorithm.csproj">
+      <Project>{5ee77669-ac59-46a7-92c9-d00764dc71fd}</Project>
+      <Name>GeneticAlgorithm</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 36 - 0
GeneticAlgorithm/MazeProgram/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("MazeProgram")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MazeProgram")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("03891e38-ce43-4c42-b253-a6d4bf6dbf30")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 28 - 0
Metaheuristics/Metaheuristics.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetaheuristicsPCL", "MetaheuristicsPCL\MetaheuristicsPCL.csproj", "{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetaheuristicsMainProgram", "MetaheuristicsMainProgram\MetaheuristicsMainProgram.csproj", "{EA78D85C-1D1D-42A0-8307-78F52961916B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EA78D85C-1D1D-42A0-8307-78F52961916B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EA78D85C-1D1D-42A0-8307-78F52961916B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EA78D85C-1D1D-42A0-8307-78F52961916B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EA78D85C-1D1D-42A0-8307-78F52961916B}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 6 - 0
Metaheuristics/MetaheuristicsMainProgram/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 64 - 0
Metaheuristics/MetaheuristicsMainProgram/MetaheuristicsMainProgram.csproj

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{EA78D85C-1D1D-42A0-8307-78F52961916B}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MetaheuristicsMainProgram</RootNamespace>
+    <AssemblyName>MetaheuristicsMainProgram</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MetaheuristicsPCL\MetaheuristicsPCL.csproj">
+      <Project>{4e752965-2455-4a25-a1c8-5cad38fdbdfe}</Project>
+      <Name>MetaheuristicsPCL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 65 - 0
Metaheuristics/MetaheuristicsMainProgram/Program.cs

@@ -0,0 +1,65 @@
+using MetaheuristicsPCL;
+using System;
+
+namespace MetaheuristicsMainProgram
+{
+    class Program : IHM
+    {
+        static void Main(string[] _args)
+        {
+            Program p = new Program();
+            p.Run();
+        }
+
+        protected void Run()
+        {
+            Console.Out.WriteLine("Métaheuristiques d'optimisation\n");
+
+            IProblem kspb = new KnapsackProblem();
+            RunAlgorithms(kspb);
+
+            Console.Out.WriteLine("*****************************************************************\n");
+
+            IProblem kspbRandom = new KnapsackProblem(100, 30, 20);
+            RunAlgorithms(kspbRandom);
+
+            Console.Out.WriteLine("FIN");
+            while (true) ;
+        }
+
+        private void RunAlgorithms(IProblem _pb)
+        {
+            Algorithm algo;
+
+            Console.Out.WriteLine("Algorithme glouton");
+            algo = new GreedyAlgorithmForKnapsack();
+            algo.Solve(_pb, this);
+            Console.Out.WriteLine("");
+
+            Console.Out.WriteLine("Descente de gradient");
+            algo = new GradientDescentForKnapsack();
+            algo.Solve(_pb, this);
+            Console.Out.WriteLine("");
+
+            Console.Out.WriteLine("Recherche tabou");
+            algo = new TabuSearchForKnapsack();
+            algo.Solve(_pb, this);
+            Console.Out.WriteLine("");
+
+            Console.Out.WriteLine("Recuit simulé");
+            algo = new SimulatedAnnealingForKnapsack();
+            algo.Solve(_pb, this);
+            Console.Out.WriteLine("");
+
+            Console.Out.WriteLine("Optimisation par essaim particulaire");
+            algo = new ParticleSwarmOptimizationForKnapsack();
+            algo.Solve(_pb, this);
+            Console.Out.WriteLine("");
+        }
+
+        public void PrintMessage(String _message)
+        {
+            Console.Out.WriteLine(_message);
+        }
+    }
+}

+ 36 - 0
Metaheuristics/MetaheuristicsMainProgram/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("MetaheuristicsMainProgram")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MetaheuristicsMainProgram")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("7a9080fa-4e70-4b45-a0a5-d7ca7e47e107")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 33 - 0
Metaheuristics/MetaheuristicsPCL/Algorithms/GradientDescentAlgorithm.cs

@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+
+namespace MetaheuristicsPCL
+{
+    public abstract class GradientDescentAlgorithm : Algorithm
+    {
+        protected ISolution currentSolution;
+		
+        public override sealed void Solve(IProblem _pb, IHM _ihm)
+        {
+            base.Solve(_pb, _ihm);
+
+            currentSolution = pb.RandomSolution();
+            while (!Done())
+            {
+                List<ISolution> Neighbours = pb.Neighbourhood(currentSolution);
+                if (Neighbours != null)
+                {
+                    ISolution bestSolution = pb.BestSolution(Neighbours); 
+                    UpdateSolution(bestSolution);
+                }
+                Increment();
+            }
+            SendResult();
+        }
+
+        protected abstract bool Done();
+
+        protected abstract void UpdateSolution(ISolution _bestSolution);
+
+        protected abstract void Increment();
+    }
+}

+ 15 - 0
Metaheuristics/MetaheuristicsPCL/Algorithms/GreedyAlgorithm.cs

@@ -0,0 +1,15 @@
+
+namespace MetaheuristicsPCL
+{
+    public abstract class GreedyAlgorithm : Algorithm
+    {
+        public override sealed void Solve(IProblem _pb, IHM _ihm)
+        {
+            base.Solve(_pb, _ihm);
+            ConstructSolution();
+            SendResult();
+        }
+
+        protected abstract void ConstructSolution();
+    }
+}

+ 45 - 0
Metaheuristics/MetaheuristicsPCL/Algorithms/ParticleSwarmOptimizationAlgorithm.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace MetaheuristicsPCL
+{
+    public abstract class ParticleSwarmOptimizationAlgorithm : Algorithm
+    {
+        protected List<ISolution> currentSolutions;
+        protected ISolution bestSoFarSolution;
+        protected ISolution bestActualSolution;
+
+        protected const int NB_INDIVIDUALS = 30;
+
+        public override sealed void Solve(IProblem _pb, IHM _ihm)
+        {
+            base.Solve(_pb, _ihm);
+            
+            currentSolutions = new List<ISolution>();
+            for (int i = 0; i < NB_INDIVIDUALS; i++)
+            {
+                ISolution newSolution = pb.RandomSolution();
+                currentSolutions.Add(newSolution);
+            }
+
+            bestActualSolution = pb.BestSolution(currentSolutions);
+            bestSoFarSolution = bestActualSolution;
+
+            while (!Done())
+            {
+                UpdateGeneralVariables();
+                UpdateSolutions();
+                Increment();
+            }
+            SendResult();
+        }
+
+        protected abstract void UpdateSolutions();
+
+        protected abstract void UpdateGeneralVariables();
+
+        protected abstract bool Done();
+
+        protected abstract void Increment();
+    }
+}

+ 43 - 0
Metaheuristics/MetaheuristicsPCL/Algorithms/SimulatedAnnealingAlgorithm.cs

@@ -0,0 +1,43 @@
+using System.Collections.Generic;
+
+namespace MetaheuristicsPCL
+{
+    public abstract class SimulatedAnnealingAlgorithm : Algorithm
+    {
+        protected ISolution currentSolution;
+        protected ISolution bestSoFarSolution;
+        protected double temperature;
+
+        public override sealed void Solve(IProblem _pb, IHM _ihm)
+        {
+            base.Solve(_pb, _ihm);
+
+            currentSolution = pb.RandomSolution();
+            bestSoFarSolution = currentSolution;
+
+            InitTemperature();
+            while (!Done())
+            {
+                List<ISolution> Neighbours = pb.Neighbourhood(currentSolution);
+                if (Neighbours != null)
+                {
+                    ISolution bestSolution = pb.BestSolution(Neighbours);
+                    UpdateSolution(bestSolution);
+                }
+                Increment();
+                UpdateTemperature();
+            }
+            SendResult();
+        }
+
+        protected abstract void UpdateTemperature();
+
+        protected abstract void InitTemperature();
+
+        protected abstract bool Done();
+
+        protected abstract void UpdateSolution(ISolution _bestSolution);
+
+        protected abstract void Increment();
+    }
+}

+ 46 - 0
Metaheuristics/MetaheuristicsPCL/Algorithms/TabuSearchAlgorithm.cs

@@ -0,0 +1,46 @@
+using System.Collections.Generic;
+
+namespace MetaheuristicsPCL
+{
+    public abstract class TabuSearchAlgorithm : Algorithm
+    {
+        protected ISolution currentSolution;
+
+        protected ISolution bestSoFarSolution;
+
+        public override sealed void Solve(IProblem _pb, IHM _ihm)
+        {
+            base.Solve(_pb, _ihm);
+
+            currentSolution = pb.RandomSolution();
+            bestSoFarSolution = currentSolution;
+            AddToTabuList(currentSolution);
+
+            while (!Done())
+            {
+                List<ISolution> Neighbours = pb.Neighbourhood(currentSolution);
+                if (Neighbours != null)
+                {
+                    Neighbours = RemoveSolutionsInTabuList(Neighbours);
+                    ISolution bestSolution = pb.BestSolution(Neighbours);
+                    if (bestSolution != null)
+                    {
+                        UpdateSolution(bestSolution);
+                    }
+                }
+                Increment();
+            }
+            SendResult();
+        }
+
+        protected abstract void AddToTabuList(ISolution currentSolution);
+
+        protected abstract List<ISolution> RemoveSolutionsInTabuList(List<ISolution> Neighbours);
+
+        protected abstract bool Done();
+
+        protected abstract void UpdateSolution(ISolution _bestSolution);
+
+        protected abstract void Increment();
+    }
+}

+ 16 - 0
Metaheuristics/MetaheuristicsPCL/Base/Algorithm.cs

@@ -0,0 +1,16 @@
+
+namespace MetaheuristicsPCL
+{
+    public abstract class Algorithm
+    {
+        protected IProblem pb;
+        protected IHM ihm;
+        public virtual void Solve(IProblem _pb, IHM _ihm)
+        {
+            pb = _pb;
+            ihm = _ihm;
+        }
+
+        protected abstract void SendResult();
+    }
+}

+ 9 - 0
Metaheuristics/MetaheuristicsPCL/Base/IHM.cs

@@ -0,0 +1,9 @@
+using System;
+
+namespace MetaheuristicsPCL
+{
+    public interface IHM
+    {
+        void PrintMessage(String _message);
+    }
+}

+ 13 - 0
Metaheuristics/MetaheuristicsPCL/Base/IProblem.cs

@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+namespace MetaheuristicsPCL
+{
+    public interface IProblem
+    {
+        List<ISolution> Neighbourhood(ISolution _currentSolution);
+
+        ISolution RandomSolution();
+
+        ISolution BestSolution(List<ISolution> _neighbours);
+    }
+}

+ 8 - 0
Metaheuristics/MetaheuristicsPCL/Base/ISolution.cs

@@ -0,0 +1,8 @@
+
+namespace MetaheuristicsPCL
+{
+    public interface ISolution
+    {
+        double Value { get; }
+    }
+}

+ 33 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/GradientDescentForKnapsack.cs

@@ -0,0 +1,33 @@
+
+namespace MetaheuristicsPCL
+{
+    public class GradientDescentForKnapsack : GradientDescentAlgorithm
+    {
+        int nbIterationsWithoutUpdate = 0;
+        private const int MAX_ITERATIONS_WITHOUT_UPDATE = 50;
+
+        protected override bool Done()
+        {
+            return nbIterationsWithoutUpdate >= MAX_ITERATIONS_WITHOUT_UPDATE;
+        }
+
+        protected override void Increment()
+        {
+            nbIterationsWithoutUpdate++;
+        }
+
+        protected override void UpdateSolution(ISolution _bestSolution)
+        {
+            if (_bestSolution.Value > currentSolution.Value)
+            {
+                currentSolution = _bestSolution;
+                nbIterationsWithoutUpdate = 0;
+            }
+        }
+
+        protected override void SendResult()
+        {
+            ihm.PrintMessage(currentSolution.ToString());
+        }
+    }
+}

+ 32 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/GreedyAlgorithmForKnapsack.cs

@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class GreedyAlgorithmForKnapsack : GreedyAlgorithm
+    {
+        KnapsackSolution solution;
+
+        protected override void ConstructSolution()
+        {
+            KnapsackProblem problem = (KnapsackProblem) pb;
+            List<Box> boxes = problem.Boxes();
+
+            solution = new KnapsackSolution();
+
+            foreach(Box currentBox in boxes.OrderByDescending(x => x.Value / x.Weight))
+            {
+                double spaceLeft = problem.MaxWeight - solution.Weight;
+                if (currentBox.Weight < spaceLeft)
+                {
+                    solution.LoadedContent.Add(currentBox);
+                }
+            }
+        }
+
+        protected override void SendResult()
+        {
+            ihm.PrintMessage(solution.ToString());
+        }
+    }
+}

+ 79 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/ParticleSwarmOptimizationForKnapsack.cs

@@ -0,0 +1,79 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class ParticleSwarmOptimizationForKnapsack : ParticleSwarmOptimizationAlgorithm
+    {
+        int nbIterations = 1;
+        private const int MAX_ITERATIONS = 200;
+
+        protected override void UpdateSolutions()
+        {
+            List<Box> possibleBoxes = ((KnapsackProblem)pb).Boxes();
+
+            foreach (ISolution genericSolution in currentSolutions)
+            {
+                KnapsackSolution solution = (KnapsackSolution)genericSolution;
+
+                if (!solution.Equals(bestSoFarSolution))
+                {
+                    int index = KnapsackProblem.randomGenerator.Next(0, ((KnapsackSolution)bestActualSolution).LoadedContent.Count);
+                    Box element = ((KnapsackSolution)bestActualSolution).LoadedContent.ElementAt(index);
+                    if (!solution.LoadedContent.Contains(element))
+                    {
+                        solution.LoadedContent.Add(element);
+                    }
+
+                    index = KnapsackProblem.randomGenerator.Next(0, ((KnapsackSolution)bestSoFarSolution).LoadedContent.Count);
+                    element = ((KnapsackSolution)bestSoFarSolution).LoadedContent.ElementAt(index);
+                    if (!solution.LoadedContent.Contains(element))
+                    {
+                        solution.LoadedContent.Add(element);
+                    }
+
+                    while (solution.Weight > ((KnapsackProblem)pb).MaxWeight)
+                    {
+                        index = KnapsackProblem.randomGenerator.Next(0, solution.LoadedContent.Count);
+                        solution.LoadedContent.RemoveAt(index);
+                    }
+
+                    double enableSpace = ((KnapsackProblem)pb).MaxWeight - solution.Weight;
+                    List<Box> availableBoxes = possibleBoxes.Except(solution.LoadedContent).Where(x => (x.Weight <= enableSpace)).ToList();
+
+                    while (enableSpace > 0 && availableBoxes.Count != 0)
+                    {
+                        index = KnapsackProblem.randomGenerator.Next(0, availableBoxes.Count);
+                        solution.LoadedContent.Add(availableBoxes.ElementAt(index));
+                        enableSpace = ((KnapsackProblem)pb).MaxWeight - solution.Weight;
+                        availableBoxes = possibleBoxes.Except(solution.LoadedContent).Where(x => (x.Weight <= enableSpace)).ToList();
+                    }
+                }
+            }
+        }
+
+        protected override void UpdateGeneralVariables()
+        {
+            bestActualSolution = currentSolutions.OrderByDescending(x => x.Value).FirstOrDefault();
+            if (bestActualSolution.Value > bestSoFarSolution.Value)
+            {
+                bestSoFarSolution = bestActualSolution;
+            }
+        }
+
+        protected override bool Done()
+        {
+            return nbIterations >= MAX_ITERATIONS;
+        }
+
+        protected override void Increment()
+        {
+            nbIterations++;
+        }
+
+        protected override void SendResult()
+        {
+            ihm.PrintMessage(bestSoFarSolution.ToString());
+        }
+    }
+}

+ 58 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/SimulatedAnnealingForKnapsack.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class SimulatedAnnealingForKnapsack : SimulatedAnnealingAlgorithm
+    {
+        int nbIterationsWithoutUpdate = 1;
+        int nbIterations = 1;
+        private const int MAX_ITERATIONS_WITHOUT_UPDATE = 30;
+        private const int MAX_ITERATIONS = 100;
+		
+        protected override void UpdateTemperature()
+        {
+            temperature *= 0.9;
+        }
+
+        protected override void InitTemperature()
+        {
+            temperature = 5;
+        }
+
+        protected override bool Done()
+        {
+            return nbIterationsWithoutUpdate >= MAX_ITERATIONS_WITHOUT_UPDATE && nbIterations >= MAX_ITERATIONS;
+        }
+
+        protected override void UpdateSolution(ISolution _bestSolution)
+        {
+            double seuil = 0.0;
+            if (_bestSolution.Value < currentSolution.Value)
+            {
+                seuil = Math.Exp(-1 * (currentSolution.Value - _bestSolution.Value) / currentSolution.Value / temperature);
+            }
+            if (_bestSolution.Value > currentSolution.Value || KnapsackProblem.randomGenerator.NextDouble() < seuil)
+            {
+                currentSolution = _bestSolution;
+                if (_bestSolution.Value > bestSoFarSolution.Value)
+                {
+                    bestSoFarSolution = _bestSolution;
+                    nbIterationsWithoutUpdate = 0;
+                }
+            }
+        }
+
+        protected override void Increment()
+        {
+            nbIterationsWithoutUpdate++;
+            nbIterations++;
+        }
+
+        protected override void SendResult()
+        {
+            ihm.PrintMessage(bestSoFarSolution.ToString());
+        }
+    }
+}

+ 60 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/AlgorithmsForKnapsack/TabuSearchForKnapsack.cs

@@ -0,0 +1,60 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class TabuSearchForKnapsack : TabuSearchAlgorithm
+    {
+        int nbIterationsWithoutUpdate = 1;
+        int nbIterations = 1;
+        private const int MAX_ITERATIONS_WITHOUT_UPDATE = 30;
+        private const int MAX_ITERATIONS = 100;
+        private const int TABU_SEARCH_MAX_SIZE = 50;
+
+        List<KnapsackSolution> tabuSolutions = new List<KnapsackSolution>();
+
+        protected override bool Done()
+        {
+            return nbIterationsWithoutUpdate >= MAX_ITERATIONS_WITHOUT_UPDATE && nbIterations >= MAX_ITERATIONS;
+        }
+
+        protected override void UpdateSolution(ISolution _bestSolution)
+        {
+            if (!tabuSolutions.Contains((KnapsackSolution)_bestSolution))               
+            {
+                currentSolution = _bestSolution;
+                AddToTabuList((KnapsackSolution)_bestSolution);
+                if (_bestSolution.Value > bestSoFarSolution.Value)
+                {
+                    bestSoFarSolution = _bestSolution;
+                    nbIterationsWithoutUpdate = 0;
+                }
+            }
+        }
+
+        protected override void Increment()
+        {
+            nbIterationsWithoutUpdate++;
+            nbIterations++;
+        }
+
+        protected override void SendResult()
+        {
+            ihm.PrintMessage(bestSoFarSolution.ToString());
+        }
+
+        protected override void AddToTabuList(ISolution _solution)
+        {
+            while (tabuSolutions.Count >= TABU_SEARCH_MAX_SIZE)
+            {
+                tabuSolutions.RemoveAt(0);
+            }
+            tabuSolutions.Add((KnapsackSolution)_solution);
+        }
+
+        protected override List<ISolution> RemoveSolutionsInTabuList(List<ISolution> Neighbours)
+        {
+            return Neighbours.Except(tabuSolutions).ToList();
+        }
+    }
+}

+ 24 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/Box.cs

@@ -0,0 +1,24 @@
+using System;
+
+namespace MetaheuristicsPCL
+{
+    public class Box
+    {
+        public double Weight { get; set; }
+        public double Value { get; set; }
+
+        String Name { get; set; }
+
+        public Box(String _name, double _weight, double _value)
+        {
+            Name = _name;
+            Weight = _weight;
+            Value = _value;
+        }
+
+        public override string ToString()
+        {
+            return Name + " (" + Weight + ", " + Value + ")";
+        }
+    }
+}

+ 110 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/KnapsackProblem.cs

@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class KnapsackProblem : IProblem
+    {
+        protected List<Box> boxes = null;
+        public double MaxWeight { get; set; }
+
+        public static Random randomGenerator = null;
+
+        public const int NB_NEIGHBOURS = 30;
+
+        public KnapsackProblem()
+        {
+            boxes = new List<Box>();
+
+            boxes.Add(new Box("A", 4, 15));
+            boxes.Add(new Box("B", 7, 15));
+            boxes.Add(new Box("C", 10, 20));
+            boxes.Add(new Box("D", 3, 10));
+            boxes.Add(new Box("E", 6, 11));
+            boxes.Add(new Box("F", 12, 16));
+            boxes.Add(new Box("G", 11, 12));
+            boxes.Add(new Box("H", 16, 22));
+            boxes.Add(new Box("I", 5, 12));
+            boxes.Add(new Box("J", 14, 21));
+            boxes.Add(new Box("K", 4, 10));
+            boxes.Add(new Box("L", 3, 7));
+
+            MaxWeight = 20;
+            if (randomGenerator == null)
+            {
+                randomGenerator = new Random();
+            }
+        }
+
+        public KnapsackProblem(int _nbBoxes, double _maxWeight, double _maxValue)
+        {
+            boxes = new List<Box>();
+            MaxWeight = _maxWeight;
+            if (randomGenerator == null)
+            {
+                randomGenerator = new Random();
+            }
+
+            for (int i = 0; i < _nbBoxes; i++)
+            {
+                boxes.Add(new Box(i.ToString(), randomGenerator.NextDouble() * _maxWeight, randomGenerator.NextDouble() * _maxValue));
+            }
+        }
+
+        public List<Box> Boxes() {
+            return boxes;
+        }
+
+        public List<ISolution> Neighbourhood(ISolution _currentSolution)
+        {
+            List<ISolution> neighbours = new List<ISolution>();
+            List<Box> possibleBoxes = boxes;
+
+            for (int i = 0; i < NB_NEIGHBOURS; i++)
+            {
+                KnapsackSolution newSol = new KnapsackSolution((KnapsackSolution)_currentSolution);
+                int index = randomGenerator.Next(0, newSol.LoadedContent.Count);
+                newSol.LoadedContent.RemoveAt(index);
+
+                double enableSpace = MaxWeight - newSol.Weight;
+                List<Box> availableBoxes = possibleBoxes.Except(newSol.LoadedContent).Where(x => (x.Weight <= enableSpace)).ToList();
+
+                while (enableSpace > 0 && availableBoxes.Count != 0)
+                {
+                    index = randomGenerator.Next(0, availableBoxes.Count);
+                    newSol.LoadedContent.Add(availableBoxes.ElementAt(index));
+                    enableSpace = MaxWeight - newSol.Weight;
+                    availableBoxes = possibleBoxes.Except(newSol.LoadedContent).Where(x => (x.Weight <= enableSpace)).ToList();
+                }
+
+                neighbours.Add(newSol);
+            }
+            return neighbours;
+        }
+
+        public ISolution RandomSolution()
+        {
+            KnapsackSolution solution = new KnapsackSolution();
+            List<Box> possibleBoxes = boxes;
+
+            double enableSpace = MaxWeight;
+            List<Box> availableBoxes = possibleBoxes.Where(x => (x.Weight <= enableSpace)).ToList();
+
+            while (enableSpace > 0 && availableBoxes.Count != 0)
+            {
+                int index = randomGenerator.Next(0, availableBoxes.Count);
+                solution.LoadedContent.Add(availableBoxes.ElementAt(index));
+                enableSpace = MaxWeight - solution.Weight;
+                availableBoxes = possibleBoxes.Except(solution.LoadedContent).Where(x => (x.Weight <= enableSpace)).ToList();
+            }
+
+            return solution;
+        }
+
+        public ISolution BestSolution(List<ISolution> _listSolutions)
+        {
+            return _listSolutions.Where(x => x.Value.Equals(_listSolutions.Max(y => y.Value))).FirstOrDefault();
+        }
+    }
+}

+ 82 - 0
Metaheuristics/MetaheuristicsPCL/KnapsackProblem/KnapsackSolution.cs

@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MetaheuristicsPCL
+{
+    public class KnapsackSolution : ISolution
+    {
+        public double Weight
+        {
+            get
+            {
+                return LoadedContent.Sum(x => x.Weight);
+            }
+        }
+
+        public double Value
+        {
+            get
+            {
+                return LoadedContent.Sum(x => x.Value);
+            }
+        }
+
+        List<Box> loadedContent;
+        public List<Box> LoadedContent
+        {
+            get
+            {
+                return loadedContent;
+            }
+            set
+            {
+                loadedContent = value;
+            }
+        }
+
+        public KnapsackSolution()
+        {
+            loadedContent = new List<Box>();
+        }
+
+        public KnapsackSolution(KnapsackSolution _solution)
+        {
+            loadedContent = new List<Box>();
+            loadedContent.AddRange(_solution.loadedContent);
+        }
+
+        public override string ToString()
+        {
+            String res = "Value : " + Value + " - Weight : " + Weight + "\n";
+            res += "Loaded : ";
+            res += String.Join(" - ", loadedContent);
+            return res;
+        }
+
+        public override bool Equals(object _object)
+        {
+            KnapsackSolution solution = (KnapsackSolution)_object;
+            if (solution.loadedContent.Count != loadedContent.Count || solution.Value != Value || solution.Weight != Weight)
+            {
+                return false;
+            }
+            else
+            {
+                foreach (Box box in loadedContent) {
+                    if (!solution.loadedContent.Contains(box))
+                    {
+                        return false;
+                    }
+                }
+
+            }
+            return true;
+        }
+
+        public override int GetHashCode()
+        {
+            return (int) (Value * Weight);
+        }
+    }
+}

+ 67 - 0
Metaheuristics/MetaheuristicsPCL/MetaheuristicsPCL.csproj

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{4E752965-2455-4A25-A1C8-5CAD38FDBDFE}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MetaheuristicsPCL</RootNamespace>
+    <AssemblyName>MetaheuristicsPCL</AssemblyName>
+    <DefaultLanguage>fr-FR</DefaultLanguage>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .NET Framework is automatically included -->
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Base\Algorithm.cs" />
+    <Compile Include="Algorithms\GradientDescentAlgorithm.cs" />
+    <Compile Include="KnapsackProblem\AlgorithmsForKnapsack\GradientDescentForKnapsack.cs" />
+    <Compile Include="KnapsackProblem\Box.cs" />
+    <Compile Include="Algorithms\GreedyAlgorithm.cs" />
+    <Compile Include="KnapsackProblem\AlgorithmsForKnapsack\GreedyAlgorithmForKnapsack.cs" />
+    <Compile Include="Base\IHM.cs" />
+    <Compile Include="KnapsackProblem\KnapsackProblem.cs" />
+    <Compile Include="KnapsackProblem\KnapsackSolution.cs" />
+    <Compile Include="Base\IProblem.cs" />
+    <Compile Include="Algorithms\ParticleSwarmOptimizationAlgorithm.cs" />
+    <Compile Include="KnapsackProblem\AlgorithmsForKnapsack\ParticleSwarmOptimizationForKnapsack.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Base\ISolution.cs" />
+    <Compile Include="Algorithms\TabuSearchAlgorithm.cs" />
+    <Compile Include="KnapsackProblem\AlgorithmsForKnapsack\TabuSearchForKnapsack.cs" />
+    <Compile Include="Algorithms\SimulatedAnnealingAlgorithm.cs" />
+    <Compile Include="KnapsackProblem\AlgorithmsForKnapsack\SimulatedAnnealingForKnapsack.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 30 - 0
Metaheuristics/MetaheuristicsPCL/Properties/AssemblyInfo.cs

@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("MetaheuristicsPCL")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MetaheuristicsPCL")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("fr")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou utiliser par défaut les numéros de build et de version 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 6 - 0
MultiAgentSystems/Fish/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 8 - 0
MultiAgentSystems/Fish/App.xaml

@@ -0,0 +1,8 @@
+<Application x:Class="Fish.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 17 - 0
MultiAgentSystems/Fish/App.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Fish
+{
+    /// <summary>
+    /// Logique d'interaction pour App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

+ 110 - 0
MultiAgentSystems/Fish/Fish.csproj

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{CF9C8829-32E0-4CBB-AD22-58C13D99B152}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Fish</RootNamespace>
+    <AssemblyName>Fish</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <AppDesigner Include="Properties\" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MultiAgentSystemPCL\MultiAgentSystemPCL.csproj">
+      <Project>{d57eefe1-5f4b-421e-aae2-6816907f2c6e}</Project>
+      <Name>MultiAgentSystemPCL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 6 - 0
MultiAgentSystems/Fish/MainWindow.xaml

@@ -0,0 +1,6 @@
+<Window x:Class="Fish.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        Title="FishSimulator" Height="350" Width="525">
+    <Canvas x:Name="oceanCanvas" Height="Auto" Width="Auto" Background="Azure"/>
+</Window>

+ 82 - 0
MultiAgentSystems/Fish/MainWindow.xaml.cs

@@ -0,0 +1,82 @@
+using MultiAgentSystemPCL;
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+namespace Fish
+{
+    public partial class MainWindow : Window
+    {
+        Ocean myOcean;
+
+        public MainWindow()
+        {
+            InitializeComponent();
+            Loaded += MainWindow_Loaded;
+        }
+
+        void MainWindow_Loaded(object _sender, RoutedEventArgs _e)
+        {
+            oceanCanvas.MouseDown += oceanCanvas_MouseDown;
+
+            myOcean = new Ocean(250, oceanCanvas.ActualWidth, oceanCanvas.ActualHeight);
+            myOcean.oceanUpdatedEvent += myOcean_oceanUpdatedEvent;
+            
+            DispatcherTimer dispatcherTimer = new DispatcherTimer(); 
+            dispatcherTimer.Tick += dispatcherTimer_Tick;
+            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 15);
+            dispatcherTimer.Start();
+        }
+
+        void dispatcherTimer_Tick(object _sender, EventArgs _e)
+        {
+            myOcean.UpdateEnvironnement();
+        }
+
+        void myOcean_oceanUpdatedEvent(FishAgent[] _fish, List<BadZone> _obstacles)
+        {
+            oceanCanvas.Children.Clear();
+
+            foreach (FishAgent fish in _fish)
+            {
+                DrawFish(fish);
+            }
+
+            foreach (BadZone obstacle in _obstacles)
+            {
+                DrawObstacle(obstacle);
+            }
+            oceanCanvas.UpdateLayout();
+        }
+
+        private void DrawObstacle(BadZone _obstacle)
+        {
+            Ellipse circle = new Ellipse();
+            circle.Stroke = Brushes.Black;
+            circle.Width = 2 * _obstacle.Radius;
+            circle.Height = 2 * _obstacle.Radius;
+            circle.Margin = new Thickness(_obstacle.PosX - _obstacle.Radius, _obstacle.PosY - _obstacle.Radius, 0, 0);
+            oceanCanvas.Children.Add(circle);
+        }
+
+        private void DrawFish(FishAgent _fish)
+        {
+            Line body = new Line();
+            body.Stroke = Brushes.Black;
+            body.X1 = _fish.PosX;
+            body.Y1 = _fish.PosY;
+            body.X2 = _fish.PosX - 10 * _fish.SpeedX;
+            body.Y2 = _fish.PosY - 10 * _fish.SpeedY;
+            oceanCanvas.Children.Add(body);
+        }
+
+        void oceanCanvas_MouseDown(object _sender, MouseButtonEventArgs _mouseEvent)
+        {
+            myOcean.AddObstacle(_mouseEvent.GetPosition(oceanCanvas).X, _mouseEvent.GetPosition(oceanCanvas).Y, 10);
+        }
+    }
+}

+ 55 - 0
MultiAgentSystems/Fish/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("Fish")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Fish")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+//Pour commencer à générer des applications localisables, définissez 
+//<UICulture>CultureYouAreCodingWith</UICulture> dans votre fichier .csproj
+//dans <PropertyGroup>.  Par exemple, si vous utilisez le français
+//dans vos fichiers sources, définissez <UICulture> à fr-FR.  Puis, supprimez les marques de commentaire de
+//l'attribut NeutralResourceLanguage ci-dessous.  Mettez à jour "fr-FR" dans
+//la ligne ci-après pour qu'elle corresponde au paramètre UICulture du fichier projet.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //où se trouvent les dictionnaires de ressources spécifiques à un thème
+    //(utilisé si une ressource est introuvable dans la page, 
+    // ou dictionnaires de ressources de l'application)
+    ResourceDictionaryLocation.SourceAssembly //où se trouve le dictionnaire de ressources générique
+    //(utilisé si une ressource est introuvable dans la page, 
+    // dans l'application ou dans l'un des dictionnaires de ressources spécifiques à un thème)
+)]
+
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
MultiAgentSystems/Fish/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré par un outil.
+//     Version du runtime :4.0.30319.34014
+//
+//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+//     le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Fish.Properties
+{
+
+
+    /// <summary>
+    ///   Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
+    /// </summary>
+    // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
+    // à l'aide d'un outil, tel que ResGen ou Visual Studio.
+    // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
+    // avec l'option /str ou régénérez votre projet VS.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Fish.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Remplace la propriété CurrentUICulture du thread actuel pour toutes
+        ///   les recherches de ressources à l'aide de cette classe de ressource fortement typée.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
MultiAgentSystems/Fish/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
MultiAgentSystems/Fish/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.34014
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Fish.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
MultiAgentSystems/Fish/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 6 - 0
MultiAgentSystems/GameOfLife/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>

+ 8 - 0
MultiAgentSystems/GameOfLife/App.xaml

@@ -0,0 +1,8 @@
+<Application x:Class="GameOfLife.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 17 - 0
MultiAgentSystems/GameOfLife/App.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace GameOfLife
+{
+    /// <summary>
+    /// Logique d'interaction pour App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

+ 110 - 0
MultiAgentSystems/GameOfLife/GameOfLife.csproj

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{374AD909-5ED3-4640-9185-3B1A9B94C061}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>GameOfLife</RootNamespace>
+    <AssemblyName>GameOfLife</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <AppDesigner Include="Properties\" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MultiAgentSystemPCL\MultiAgentSystemPCL.csproj">
+      <Project>{d57eefe1-5f4b-421e-aae2-6816907f2c6e}</Project>
+      <Name>MultiAgentSystemPCL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 6 - 0
MultiAgentSystems/GameOfLife/MainWindow.xaml

@@ -0,0 +1,6 @@
+<Window x:Class="GameOfLife.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        Title="Conway's Game of Life" Height="339" Width="616">
+    <Canvas Name="gridCanvas" Height="300" Width="600" Background="White"/>
+</Window>

+ 92 - 0
MultiAgentSystems/GameOfLife/MainWindow.xaml.cs

@@ -0,0 +1,92 @@
+using MultiAgentSystemPCL;
+using System;
+using System.Linq;
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+namespace GameOfLife
+{
+    public partial class MainWindow : Window
+    {
+        DispatcherTimer updateTimer;
+        bool running = false;
+        GoLGrid grid;
+
+        public MainWindow()
+        {
+            InitializeComponent();
+            Loaded += MainWindow_Loaded;
+            gridCanvas.MouseDown += gridCanvas_MouseDown;
+        }
+
+        void gridCanvas_MouseDown(object _sender, MouseButtonEventArgs _mouseEvent)
+        {
+            if (_mouseEvent.LeftButton == MouseButtonState.Pressed)
+            {
+                grid.ChangeState((int)(_mouseEvent.GetPosition(gridCanvas).X / 3), (int)(_mouseEvent.GetPosition(gridCanvas).Y / 3));
+                grid.Update(false);
+            }
+            else if (_mouseEvent.RightButton == MouseButtonState.Pressed)
+            {
+                if (running)
+                {
+                    updateTimer.Stop();
+                }
+                else
+                {
+                    updateTimer.Start();
+                }
+                running = !running;
+            }
+
+        }
+
+        void MainWindow_Loaded(object _sender, RoutedEventArgs _e)
+        {
+            grid = new GoLGrid((int) gridCanvas.ActualWidth / 3, (int) gridCanvas.ActualHeight / 3, 0.1);
+            grid.gridUpdatedEvent += grid_gridUpdatedEvent;
+
+            updateTimer = new DispatcherTimer();
+            updateTimer.Tick += updateTimer_Tick;
+            updateTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
+            
+            updateTimer.Start();
+            running = true;
+        }
+
+        void grid_gridUpdatedEvent(bool[][] _grid)
+        {
+            gridCanvas.Children.Clear();
+
+            for(int row = 0; row < _grid.Count(); row++) {
+                for (int col = 0; col < _grid[0].Count(); col++)
+                {
+                    if (_grid[row][col])
+                    {
+                        DrawCell(row, col);
+                    }
+                }
+            }
+        }
+
+        private void DrawCell(int _row, int _col)
+        {
+            Rectangle rect = new Rectangle();
+            rect.Width = 3;
+            rect.Height = 3;
+            rect.Margin = new Thickness(3 * _row, 3 * _col, 0, 0);
+            rect.Stroke = Brushes.Black;
+            rect.Fill = Brushes.Black;
+
+            gridCanvas.Children.Add(rect);
+        }
+
+        void updateTimer_Tick(object _sender, EventArgs _e)
+        {
+            grid.Update();
+        }
+    }
+}

+ 55 - 0
MultiAgentSystems/GameOfLife/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("GameOfLife")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GameOfLife")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM.  Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+//Pour commencer à générer des applications localisables, définissez 
+//<UICulture>CultureYouAreCodingWith</UICulture> dans votre fichier .csproj
+//dans <PropertyGroup>.  Par exemple, si vous utilisez le français
+//dans vos fichiers sources, définissez <UICulture> à fr-FR.  Puis, supprimez les marques de commentaire de
+//l'attribut NeutralResourceLanguage ci-dessous.  Mettez à jour "fr-FR" dans
+//la ligne ci-après pour qu'elle corresponde au paramètre UICulture du fichier projet.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //où se trouvent les dictionnaires de ressources spécifiques à un thème
+    //(utilisé si une ressource est introuvable dans la page, 
+    // ou dictionnaires de ressources de l'application)
+    ResourceDictionaryLocation.SourceAssembly //où se trouve le dictionnaire de ressources générique
+    //(utilisé si une ressource est introuvable dans la page, 
+    // dans l'application ou dans l'un des dictionnaires de ressources spécifiques à un thème)
+)]
+
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů