Permalink
Browse files

Added Cross Platform feature.

 - You can now use different DB Providers through implementing the IRlmDbData interface
 - Added built in implementation of SQL Server and PostGres

Added support for Gpu usage.
 - Added built in Alea GPU

Added RlmBasketballPrototype
Added BasketballLineupOptimizer
  • Loading branch information...
ginomortillero committed Oct 4, 2018
1 parent 49150ba commit a36007eeddef9f30e04c15c5837ef16f40bfb4bb
Showing with 33,049 additions and 3,473 deletions.
  1. +27 −13 Core/REST/RLM.WebAPI/Manager/RLMApiManager.cs
  2. +9 −7 Core/REST/RLM.WebAPI/Manager/RLMMqttManager.cs
  3. +3 −2 Core/REST/RLM.WebAPI/Models/RlmNetworkWebAPI.cs
  4. +49 −38 Core/REST/RLM.WebAPI/RLM.WebAPI.csproj
  5. BIN Core/REST/RLM.WebAPI/Scripts/_references.js
  6. +2,670 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.intellisense.js
  7. +10,364 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.js
  8. +2 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.min.js
  9. +1 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.min.map
  10. +8,269 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.slim.js
  11. +2 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.slim.min.js
  12. +1 −0 Core/REST/RLM.WebAPI/Scripts/jquery-3.3.1.slim.min.map
  13. +15 −4 Core/REST/RLM.WebAPI/Web.config
  14. +2 −2 Core/REST/RLM.WebAPI/packages.config
  15. +25 −91 Core/RLM/RLM.Database/RLM.Database.csproj
  16. +23 −0 Core/RLM/RLM.Database/RlmBCQueues.cs
  17. +1 −1 Core/RLM/RLM.Database/RlmDbBatchProcessor.cs
  18. +117 −84 Core/RLM/RLM.Database/RlmDbEntities.cs
  19. +1,033 −493 Core/RLM/RLM.Database/RlmDbMgr.cs
  20. +17 −8 Core/RLM/RLM.Database/RlmObjectEnqueuer.cs
  21. +39 −8 Core/RLM/RLM.Database/Utility/ConfigFile.cs
  22. +13 −8 Core/RLM/RLM.Database/Utility/RlmDbLogger.cs
  23. +36 −0 Core/RLM/RLM.GPU/Properties/AssemblyInfo.cs
  24. +86 −0 Core/RLM/RLM.GPU/RLM.GPU.csproj
  25. +180 −0 Core/RLM/RLM.GPU/RlmAleaGpu.cs
  26. +109 −0 Core/RLM/RLM.GPU/RlmAleaGpuCopyAll.cs
  27. +38 −0 Core/RLM/RLM.GPU/RlmAleaGpuCopyPartial.cs
  28. +43 −0 Core/RLM/RLM.GPU/RlmAleaGpuManaged.cs
  29. +11 −0 Core/RLM/RLM.GPU/app.config
  30. +5 −0 Core/RLM/RLM.GPU/packages.config
  31. +95 −0 Core/RLM/RLM.Memory/CPU/RlmRneuronGetter.cs
  32. +6 −6 Core/RLM/RLM.Memory/Interfaces/IManager.cs
  33. +409 −375 Core/RLM/RLM.Memory/Manager.cs
  34. +23 −77 Core/RLM/RLM.Memory/RLM.Memory.csproj
  35. +68 −0 Core/RLM/RLM.Memory/Utility/RlmArray.cs
  36. +15 −6 Core/RLM/RLM.Memory/Utility/Util.cs
  37. +16 −0 Core/RLM/RLM.Models/Enums/RlmOptObjectType.cs
  38. +19 −0 Core/RLM/RLM.Models/Enums/RlmOptReservedKeywords.cs
  39. +15 −0 Core/RLM/RLM.Models/Enums/RlmSimulationType.cs
  40. +17 −7 Core/RLM/RLM.Models/Interfaces/IManager.cs
  41. +33 −0 Core/RLM/RLM.Models/Interfaces/IRlmDbData.cs
  42. +34 −0 Core/RLM/RLM.Models/Interfaces/IRlmDbDataLegacy.cs
  43. +14 −0 Core/RLM/RLM.Models/Interfaces/IRlmFormula.cs
  44. +7 −2 Core/RLM/RLM.Models/Interfaces/IRlmNetwork.cs
  45. +16 −0 Core/RLM/RLM.Models/Interfaces/IRlmRneuronProcessor.cs
  46. +15 −0 Core/RLM/RLM.Models/Interfaces/IRlmTraceLog.cs
  47. +1 −0 Core/RLM/RLM.Models/Models/Archives/RlmCaseHistory.cs
  48. +169 −0 Core/RLM/RLM.Models/Models/BaseRlmDbData.cs
  49. +179 −7 Core/RLM/RLM.Models/Models/BestSolutionCacheBox.cs
  50. +30 −14 Core/RLM/RLM.Models/Models/EF/Case.cs
  51. +9 −9 Core/RLM/RLM.Models/Models/EF/Idea_Implementation.cs
  52. +7 −5 Core/RLM/RLM.Models/Models/EF/Idea_Module.cs
  53. +9 −8 Core/RLM/RLM.Models/Models/EF/Input.cs
  54. +4 −5 Core/RLM/RLM.Models/Models/EF/Input_Output_Type.cs
  55. +7 −7 Core/RLM/RLM.Models/Models/EF/Input_Values_Rneuron.cs
  56. +7 −7 Core/RLM/RLM.Models/Models/EF/Output.cs
  57. +6 −7 Core/RLM/RLM.Models/Models/EF/Output_Values_Solution.cs
  58. +5 −5 Core/RLM/RLM.Models/Models/EF/Rnetwork.cs
  59. +6 −6 Core/RLM/RLM.Models/Models/EF/RnetworkSetting.cs
  60. +43 −10 Core/RLM/RLM.Models/Models/EF/Rneuron.cs
  61. +24 −7 Core/RLM/RLM.Models/Models/EF/Session.cs
  62. +42 −8 Core/RLM/RLM.Models/Models/EF/Solution.cs
  63. +18 −0 Core/RLM/RLM.Models/Models/Optimizer/Constraint.cs
  64. +15 −0 Core/RLM/RLM.Models/Models/Optimizer/ConstraintScore.cs
  65. +16 −0 Core/RLM/RLM.Models/Models/Optimizer/DataObj.cs
  66. +143 −0 Core/RLM/RLM.Models/Models/Optimizer/Resource.cs
  67. +33 −0 Core/RLM/RLM.Models/Models/Optimizer/ResourceAttribute.cs
  68. +27 −0 Core/RLM/RLM.Models/Models/Optimizer/RlmSettings.cs
  69. +16 −0 Core/RLM/RLM.Models/Models/Optimizer/ScoringPhase.cs
  70. +14 −0 Core/RLM/RLM.Models/Models/Optimizer/TrainingVariable.cs
  71. +68 −0 Core/RLM/RLM.Models/Models/RlmArray.cs
  72. +38 −0 Core/RLM/RLM.Models/Models/RlmCacheDataArray.cs
  73. +4 −1 Core/RLM/RLM.Models/Models/RlmCyclecompleteEventArgs.cs
  74. +2 −1 Core/RLM/RLM.Models/Models/RlmDelegates.cs
  75. +8 −5 Core/RLM/RLM.Models/Models/RlmIdea.cs
  76. +22 −97 Core/RLM/RLM.Models/RLM.Models.csproj
  77. +113 −0 Core/RLM/RLM.Models/Utility/Util.cs
  78. +23 −0 Core/RLM/RLM.PostgreSQL/RLM.PostgreSQL.csproj
  79. +1,379 −0 Core/RLM/RLM.PostgreSQL/RlmDbDataPostgreSql.cs
  80. +23 −0 Core/RLM/RLM.SQLServer/RLM.SQLServer.csproj
  81. +1,257 −0 Core/RLM/RLM.SQLServer/RlmDbDataSqlServer.cs
  82. +38 −87 Core/RLM/RLM/RLM.csproj
  83. +11 −29 Core/RLM/RLM/RlmCerebralCortex.cs
  84. +10 −10 Core/RLM/RLM/RlmCycle.cs
  85. +305 −0 Core/RLM/RLM/RlmFormulaCompiler.cs
  86. +138 −93 Core/RLM/RLM/RlmNetwork.cs
  87. +59 −35 Core/RLM/RLM/RlmNetworkLegacy.cs
  88. +570 −0 Core/RLM/RLM/RlmOptimizer.cs
  89. +23 −486 Core/RLM/RLM/RlmSessionCaseHistory.cs
  90. +187 −185 Core/RLM/RLM/RlmUtils.cs
  91. BIN Documentation/Developer Guide 2.0.pdf
  92. BIN Documentation/Developer Guide.pdf
  93. BIN Documentation/RLM API Documentation.pdf
  94. +7 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/App.config
  95. +246 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/BasketballOptimizer.cs
  96. +127 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/PlayerDetails.csv
  97. +435 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/PlayerDetails2.csv
  98. +257 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/Program.cs
  99. +38 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/RlmBasketballPrototype.csproj
  100. +66 −0 ExampleApps/CSharp/BasketballLineupOptimizer/RlmBasketballPrototype/SaveToCSV.cs
  101. +19 −3 ExampleApps/CSharp/Challenger/Challenger/App.config
  102. +135 −20 ExampleApps/CSharp/Challenger/Challenger/Challenger.csproj
  103. +7 −1 ExampleApps/CSharp/Challenger/Challenger/MainWindow.xaml.cs
  104. +18 −26 ExampleApps/CSharp/Challenger/Challenger/Properties/Resources.Designer.cs
  105. +9 −13 ExampleApps/CSharp/Challenger/Challenger/Properties/Settings.Designer.cs
  106. +42 −5 ExampleApps/CSharp/Challenger/Challenger/packages.config
  107. +11 −3 ExampleApps/CSharp/Challenger/ChallengerLib/App.config
  108. +30 −6 ExampleApps/CSharp/Challenger/ChallengerLib/ChallengerLib.csproj
  109. +6 −1 ExampleApps/CSharp/Challenger/ChallengerLib/RLM/RLMChallenger.cs
  110. +6 −1 ExampleApps/CSharp/Challenger/ChallengerLib/packages.config
  111. +4 −15 ExampleApps/CSharp/Logistics/LogisticsConsoleApp/App.config
  112. +27 −76 ExampleApps/CSharp/Logistics/LogisticsConsoleApp/LogisticsConsoleApp.csproj
  113. +2 −0 ExampleApps/CSharp/Logistics/LogisticsConsoleApp/Program.cs
  114. +6 −1 ExampleApps/CSharp/Logistics/LogisticsConsoleApp/RLMLogistics.cs
  115. +18 −72 ExampleApps/CSharp/Logistics/LogisticsGameLib/LogisticsGameLib.csproj
  116. +11 −0 ExampleApps/CSharp/Logistics/LogisticsGameLib/app.config
  117. +7 −13 ExampleApps/CSharp/LunarLander/LanderConsoleApp/App.config
  118. +26 −79 ExampleApps/CSharp/LunarLander/LanderConsoleApp/LanderConsoleApp.csproj
  119. +15 −2 ExampleApps/CSharp/LunarLander/LanderConsoleApp/Program.cs
  120. +42 −10 ExampleApps/CSharp/LunarLander/LanderConsoleApp/RLMLander.cs
  121. +19 −65 ExampleApps/CSharp/LunarLander/LanderGameLib/LanderGameLib.csproj
  122. +42 −14 ExampleApps/CSharp/LunarLander/LanderGameLib/RLM/RLMPilot.cs
  123. +4 −15 ExampleApps/CSharp/Maze/MazeConsoleApp/App.config
  124. +22 −72 ExampleApps/CSharp/Maze/MazeConsoleApp/MazeConsoleApp.csproj
  125. +21 −75 ExampleApps/CSharp/Maze/MazeGameLib/MazeGameLib.csproj
  126. +20 −6 ExampleApps/CSharp/Maze/MazeGameLib/RLMMazeTraveler.cs
  127. +15 −3 ExampleApps/CSharp/Maze/WPFMazeApp/App.config
  128. +24 −8 ExampleApps/CSharp/Maze/WPFMazeApp/MainWindow.xaml.cs
  129. +1 −1 ExampleApps/CSharp/Maze/WPFMazeApp/Properties/Resources.Designer.cs
  130. +1 −1 ExampleApps/CSharp/Maze/WPFMazeApp/Properties/Settings.Designer.cs
  131. +136 −26 ExampleApps/CSharp/Maze/WPFMazeApp/WPFMazeApp.csproj
  132. +40 −3 ExampleApps/CSharp/Maze/WPFMazeApp/packages.config
  133. +20 −4 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/App.config
  134. +8 −3 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/MainWindow.xaml.cs
  135. +6 −1 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/PlanogramOptimizer.cs
  136. +1 −1 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/Properties/Settings.Designer.cs
  137. +135 −21 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/RetailPoC20.csproj
  138. +44 −6 ExampleApps/CSharp/RetailPoC 2.0/RetailPoC20/packages.config
  139. +21 −5 ExampleApps/CSharp/RetailPoC/RetailPoC/App.config
  140. +9 −3 ExampleApps/CSharp/RetailPoC/RetailPoC/MainWindow.xaml.cs
  141. +6 −1 ExampleApps/CSharp/RetailPoC/RetailPoC/PlanogramOptimizer.cs
  142. +1 −1 ExampleApps/CSharp/RetailPoC/RetailPoC/Properties/Resources.Designer.cs
  143. +1 −1 ExampleApps/CSharp/RetailPoC/RetailPoC/Properties/Settings.Designer.cs
  144. +135 −21 ExampleApps/CSharp/RetailPoC/RetailPoC/RetailPoC.csproj
  145. +44 −6 ExampleApps/CSharp/RetailPoC/RetailPoC/packages.config
  146. +20 −4 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/App.config
  147. +10 −2 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/MainWindow.xaml.cs
  148. +6 −1 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/PlanogramOptimizer.cs
  149. +1 −1 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/Properties/Resources.Designer.cs
  150. +1 −1 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/Properties/Settings.Designer.cs
  151. +134 −19 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/RetailPoCSimple.csproj
  152. +43 −5 ExampleApps/CSharp/RetailPoC/RetailPoCSimple/packages.config
  153. +4 −3 ExampleApps/CSharp/XOR/XORConsoleApp/App.config
  154. +8 −1 ExampleApps/CSharp/XOR/XORConsoleApp/Program.cs
  155. +24 −68 ExampleApps/CSharp/XOR/XORConsoleApp/XORConsoleApp.csproj
  156. +24 −0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/Main.py
  157. +127 −0 ...leApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/PlayerDetails.csv
  158. +435 −0 ...eApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/PlayerDetails2.csv
  159. +32 −0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/SaveToCSV.py
  160. +215 −0 ...CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFBasketballPrototype.py
  161. +45 −0 ...etitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFBasketballPrototype.pyproj
  162. 0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFData_1.csv
  163. 0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFData_2.csv
  164. 0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFData_3.csv
  165. 0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFData_4.csv
  166. 0 ExampleApps/CompetitorComparableApps/BasketballLineupOptimizer/TFBasketballPrototype/TFData_5.csv
  167. +41 −26 ExampleApps/CompetitorComparableApps/RetailPoC 2.0/RetailPoC20_Tensorflow/PlanogramOptTensorflow.py
  168. +3 −3 ExampleApps/UtilityTools/RequirementsTool/NetFrameworkChecker.cs
  169. +72 −5 ExampleApps/UtilityTools/RequirementsTool/Program.cs
  170. +4 −2 ExampleApps/UtilityTools/RequirementsTool/RequirementsTool.csproj
  171. +2 −2 ExampleApps/UtilityTools/RequirementsTool/SQLServerChecker.cs
  172. +50 −34 ExampleApps/UtilityTools/RequirementsTool/VisualStudioChecker.cs
  173. +1 −1 ExampleApps/UtilityTools/RequirementsTool/app.config
  174. BIN ExampleApps/UtilityTools/RequirementsTool/bin/debug/RequirementsTool.exe
  175. +1 −0 ExampleApps/UtilityTools/Tools/Settings/SimulationSettings.cs
  176. +17 −63 ExampleApps/UtilityTools/Tools/Tools.csproj
  177. +6 −5 ExampleApps/UtilityTools/TotalRecallConsoleApp/App.config
  178. +7 −4 ExampleApps/UtilityTools/TotalRecallConsoleApp/Program.cs
  179. +24 −66 ExampleApps/UtilityTools/TotalRecallConsoleApp/TotalRecallConsoleApp.csproj
  180. +52 −14 RLM.sln
  181. +15 −3 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/App.config
  182. +18 −26 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/Properties/Resources.Designer.cs
  183. +9 −13 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/Properties/Settings.Designer.cs
  184. +13 −0 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/RLVProgressionChartPanel.xaml.cs
  185. +10 −0 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/RLVSelectedDetailsPanel.xaml.cs
  186. +19 −18 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/WPFVisualizer.csproj
  187. +5 −4 RyskampLearningVisualizer/ExampleVisualizers/WPFVisualizer/packages.config
  188. +1 −0 RyskampLearningVisualizer/RLV.Core/Interfaces/IRLVCore.cs
  189. +3 −0 RyskampLearningVisualizer/RLV.Core/Interfaces/IRLVProgressionChartPanel.cs
  190. +2 −0 RyskampLearningVisualizer/RLV.Core/Interfaces/IRLVSelectedDetailsPanel.cs
  191. +1 −0 RyskampLearningVisualizer/RLV.Core/Interfaces/RLVDelegates.cs
  192. +7 −1 RyskampLearningVisualizer/RLV.Core/RLV.Core.csproj
  193. +11 −2 RyskampLearningVisualizer/RLV.Core/RLVCore.cs
  194. +11 −0 RyskampLearningVisualizer/RLV.Core/app.config
  195. +22 −0 nuget.config
@@ -1,4 +1,6 @@
using RLM.Models;
using RLM.SQLServer;
using RLM.Models;
using RLM.Models.Interfaces;
using RLM.WebAPI.Models;
using System;
using System.Collections.Concurrent;
@@ -35,7 +37,8 @@ private static void StartPurger()

public void CreateOrLoadNetwork(CreateLoadNetworkParams data)
{
RlmNetworkWebAPI network = new RlmNetworkWebAPI(data.RlmName);
IRlmDbData rlmDbData = new RlmDbDataSQLServer(data.RlmName);
RlmNetworkWebAPI network = new RlmNetworkWebAPI(rlmDbData);

if (network.LoadNetwork(data.NetworkName))
{
@@ -154,71 +157,82 @@ public IEnumerable<RlmSessionHistory> GetSessions(bool withLearning, RlmFilterRe

private IEnumerable<RlmSessionHistory> getSessionHistory(RlmFilterResultParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetSessionHistory(data.Skip, data.Take);
}

private IEnumerable<RlmSessionHistory> getSessionsWithSignificantLearning(RlmFilterResultParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetSignificantLearningEvents(data.Skip, data.Take);
}

public IEnumerable<RlmCaseHistory> GetSessionCases(RlmGetSessionCaseParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetSessionCaseHistory(data.SessionId, data.Skip, data.Take);
}

public RlmCaseIOHistory GetCaseInputOutputDetails(RlmGetCaseIOParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetCaseIOHistory(data.CaseId, data.RneuronId, data.SolutionId);
}

public long? GetNextPrevLearnedCaseId(RlmGetNextPrevLearnedCaseIdParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetNextPreviousLearnedCaseId(data.CaseId.Value, data.IsNext);
}

public IEnumerable<RlmLearnedSessionDetails> GetSessionIODetails(RlmGetSessionDetailsParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetSessionIODetails(data.SessionIds);
}

public long? GetRneuronIdFromInputs(RlmGetRneuronIdFromInputs data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetRneuronIdFromInputs(data.InputValuesPair);
}

public long? GetSolutionIdFromOutputs(RlmGetSolutionIdFromOutputs data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetSolutionIdFromOutputs(data.OutputValuesPair);
}

public IEnumerable<RlmLearnedCase> GetLearnedCases(RlmGetLearnedCasesParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetLearnedCases(data.RneuronId, data.SolutionId, data.Scale);
}

public IEnumerable<RlmLearnedCaseDetails> GetCaseDetails(RlmGetCaseDetailsParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetCaseDetails(data.CaseId);
}

public IEnumerable<RlmIODetails>[] GetCaseIODetails(RlmGetCaseIODetailsParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmNetworkWebAPI network = LoadNetworkFromCache(data);
RlmSessionCaseHistory hist = network.SessionCaseHistory;
return hist.GetCaseIODetails(data.CaseId);
}

@@ -1,5 +1,7 @@
using Newtonsoft.Json;
using RLM.SQLServer;
using RLM.Models;
using RLM.Models.Interfaces;
using RLM.WebAPI.Models;
using System;
using System.Collections.Concurrent;
@@ -78,7 +80,8 @@ private void MqttClient_MqttMsgPublishReceived(object sender, MqttMsgPublishEven
else if(topic == createTopic("create_load_network"))
{
CreateLoadNetworkParams data = JsonConvert.DeserializeObject<CreateLoadNetworkParams>(msg);
network = new RlmNetwork(data.RlmName);
IRlmDbData rlmDbData = new RlmDbDataSQLServer(data.RlmName);
network = new RlmNetwork(rlmDbData);

if(!network.LoadNetwork(data.NetworkName))
{
@@ -124,8 +127,7 @@ private void MqttClient_MqttMsgPublishReceived(object sender, MqttMsgPublishEven
RlmCyclecompleteArgs cycleOutput = null;

// supervised training
if (data.Outputs == null ||
(data.Outputs != null && data.Outputs.Count > 0))
if (data.Outputs != null && data.Outputs.Count > 0)
{
var outputsCycle = new List<RlmIOWithValue>();
foreach (var outs in data.Outputs)
@@ -207,7 +209,7 @@ private void MqttClient_MqttMsgPublishReceived(object sender, MqttMsgPublishEven
{
RlmGetSessionCaseParams data = JsonConvert.DeserializeObject<RlmGetSessionCaseParams>(msg);

RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

var resultStr = JsonConvert.SerializeObject(hist.GetSessionCaseHistory(data.SessionId, data.Skip, data.Take));

@@ -217,7 +219,7 @@ private void MqttClient_MqttMsgPublishReceived(object sender, MqttMsgPublishEven
{
RlmGetCaseIOParams data = JsonConvert.DeserializeObject<RlmGetCaseIOParams>(msg);

RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

var resultStr = JsonConvert.SerializeObject(hist.GetCaseIOHistory(data.CaseId, data.RneuronId, data.SolutionId));

@@ -234,14 +236,14 @@ private void MqttClient_MqttMsgPublishReceived(object sender, MqttMsgPublishEven

private IEnumerable<RlmSessionHistory> getSessionHistory(RlmFilterResultParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetSessionHistory(data.Skip, data.Take);
}

private IEnumerable<RlmSessionHistory> getSessionsWithSignificantLearning(RlmFilterResultParams data)
{
RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);
RlmSessionCaseHistory hist = network.SessionCaseHistory;

return hist.GetSignificantLearningEvents(data.Skip, data.Take);
}
@@ -1,4 +1,5 @@
using System;
using RLM.Models.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@@ -12,7 +13,7 @@ public class RlmNetworkWebAPI : RlmNetwork
private DateTime expiresOn = DateTime.Now.AddMinutes(EXPIRES_AFTER);

public RlmNetworkWebAPI() { }
public RlmNetworkWebAPI(string dbName) : base(dbName) { }
public RlmNetworkWebAPI(IRlmDbData rlmDbData) : base(rlmDbData) { }


public bool IsExpired
Oops, something went wrong.

0 comments on commit a36007e

Please sign in to comment.