Example #1
0
 public AStarLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace)
 {
     if (workspace.SimulationPlugins.OfType <AStarSimulationPluginFactory>().Any() == false)
     {
         var pluginFactory = new AStarSimulationPluginFactory();
         workspace.SimulationPlugins.Add(pluginFactory);
         Add(pluginFactory);
     }
 }
Example #2
0
 public DijkstraLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace)
 {
     if (workspace.SimulationPlugins.OfType <DijkstraSimulationPluginFactory>().Any() == false)
     {
         var driverDefinition = new DijkstraSimulationPluginFactory();
         workspace.SimulationPlugins.Add(driverDefinition);
         Add(driverDefinition);
     }
 }
Example #3
0
 public NeuralLabFormExtension(ILabForm labForm, Workspace workspace) : base(labForm, workspace)
 {
     AddNewAgentMenuItem("&Neural Agent", menuItemNewAgentOnClick);
     labForm.Agents.AddContextMenuItem("&Randomise Agent Network", RandomiseAgentNetwork, IsNeuralSimulationPlugin);
     labForm.Simulations.AddContextMenuItem("&Train", Train, IsNeuralSimulationTemplate);
     labForm.Spaces.AddContextMenuItem("&Train Neural Agent", TrainOnSpace);
     //ToolStripMenuItem menuItemNewNetwork = new ToolStripMenuItem();
     //menuItemNewNetwork.Name = "menuItemNewNetwork";
     //menuItemNewNetwork.Size = new System.Drawing.Size(98, 22);
     //menuItemNewNetwork.Text = "&New";
     //menuItemNewNetwork.Click += new System.EventHandler(this.menuItemNewNetwork_Click);
     //
     //ToolStripMenuItem networkToolStripMenuItem = new ToolStripMenuItem();
     //networkToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     //menuItemNewNetwork});
     //networkToolStripMenuItem.Name = "networkToolStripMenuItem";
     //networkToolStripMenuItem.Size = new System.Drawing.Size(64, 20);
     //networkToolStripMenuItem.Text = "&Neural Network";
     //LabForm.MenuAgentDrivers.Items.Add(networkToolStripMenuItem);
 }
Example #4
0
 public LabFormExtension(ILabForm labForm, Workspace workspace)
 {
     LabForm = labForm;
     workspace.SimulationPlugins.OfType <TPluginFactory>().ForEach(Add);
 }