コード例 #1
0
ファイル: SolutionVis.cs プロジェクト: bauer-martin/thor-avm
        private void button3_Click(object sender, EventArgs e)
        {
            var sum = _w1 + _w2 + _w3;

            if (Math.Abs(sum - 100) < 0.000001)
            {
                _model.ShowParetoSolution(_w1, _w2, _w3);
                pictureBox1.ImageLocation = @"solutionBest.png";
                button5.Enabled           = true;
            }
        }
コード例 #2
0
ファイル: Commander.cs プロジェクト: JakobHoffmann/thor-avm
        public void WriteResult()
        {
            //After Evolution
            //weightValues = Scaleto100(weightValues);
            var sum = weightValues[0] + weightValues[1] + weightValues[2];

            if (sum != 100)
            {
                var scale = 100 / sum;
                weightValues[0] = weightValues[0] * scale;
                weightValues[1] = weightValues[1] * scale;
                weightValues[2] = weightValues[2] * scale;
            }
            try
            {
                _model.ShowParetoSolution(weightValues[0], weightValues[1], weightValues[2]);
            }
            catch (Exception e) { Console.WriteLine(e); }
            //if (draw_pareto_3d) { _model.Draw3DPareto(); }
            //Write Results to path
            _model.WriteResult(output_path);
            Console.WriteLine("Done.");
            write_finished = true;
        }