Esempio n. 1
0
        public ExpertOptimization(Expert expert, MainForm form1, int population_value, int test_count, int mutation_rate, double elite_ratio, int Iterarions, DateTime date1, DateTime date2, string rawDatasetFilePath)
        {
            r = new Random();
            this.Iterarions         = Iterarions;
            this.rawDatasetFilePath = rawDatasetFilePath;
            this.form1            = form1;
            this.expert           = expert;
            this.elite_ratio      = elite_ratio;
            this.mutation_rate    = mutation_rate;
            this.population_value = population_value;
            this.test_count       = test_count;
            this.date1            = date1;
            this.date2            = date2;
            variablesVisualizer   = new MultiParameterVisualizer(form1.picBox, form1);
            population            = new Hyperparameters[population_value];
            variablesNames        = new List <string>();
            variablesIDs          = new List <int>();

            this.agentManager = form1.I.agentManager;

            name = expert.expertName;

            try { Directory.Delete(form1.pathPrefix + "Optimization\\" + name, true); } catch { }

            //  refreshAOTree();
            variablesVisualizer.enableGrid = false;
            variablesVisualizer.addParameter("best_individ", Color.Cyan, 300);
            variablesVisualizer.addParameter("target_function", Color.LightCyan, 600);
            variablesVisualizer.parameters[1].functions.Add(new Function("averege best", Color.Lime));
            //добавление переменных в  MultiParameterVisualizer
            for (int i = 0; i < population_value; i++)
            {
                variablesVisualizer.parameters[1].functions.Add(new Function(" [" + i.ToString() + "]", valueToColor(0, population_value, population_value - i - 1)));
            }

            for (int i = 0; i < population_value; i++)
            {
                // variablesVisualizer.addParameter("actions [" + i.ToString() + "]", Color.Pink, 50);
                variablesVisualizer.addParameter("committee response [" + i.ToString() + "]", Color.Pink, 300);
                variablesVisualizer.addParameter("close [" + i.ToString() + "]", Color.Pink, 300);
                variablesVisualizer.addParameter("deposit1 [" + i.ToString() + "]", Color.Green, 300);
                variablesVisualizer.addParameter("exit [" + i.ToString() + "]", Color.LightSeaGreen, 300);

                /* variablesVisualizer.addParameter("deposit history [" + i.ToString() + "]", Color.LightCyan, 300);
                 * variablesVisualizer.parameters[1 + i].functions.Add(new Function("deposit1 [" + i.ToString() + "]", Color.Pink));
                 * variablesVisualizer.parameters[1 + i].functions.Add(new Function("deposit2 [" + i.ToString() + "]", Color.Green));
                 * variablesVisualizer.parameters[1 + i].functions.Add(new Function("exit [" + i.ToString() + "]", Color.LightSeaGreen));   */
            }

            // recurciveVariableAdding(expert.H, 0, name + "[0]");
            variablesVisualizer.refresh();
        }
Esempio n. 2
0
 public void startAgentManager()
 {
     agentManager = new AgentManager(this.form1);
 }
Esempio n. 3
0
 public AgentManagerView(AgentManager manager)
 {
     InitializeComponent();
     this.manager = manager;
 }