示例#1
0
        /// <summary>
        /// Prepares the population complexity graph for use
        /// </summary>
        private void InitializePopComplexityGraph()
        {
            ZedGraph.GraphPane pane = new ZedGraph.GraphPane(
                new Rectangle(0, 0, graphPopulationComplexity.Width, graphPopulationComplexity.Height),
                "Population Complexity",
                "Generation",
                "Complexity (Node Count)");

            graphPopulationComplexity.GraphPane            = pane;
            graphPopulationComplexity.GraphPane.Fill       = graphFitness.GraphPane.Fill;
            graphPopulationComplexity.GraphPane.Chart.Fill = graphFitness.GraphPane.Chart.Fill;

            m_ptListComplexityMin    = new ZedGraph.PointPairList();
            m_ptListComplexityMax    = new ZedGraph.PointPairList();
            m_ptListComplexityAve    = new ZedGraph.PointPairList();
            m_ptListComplexityBestOf = new ZedGraph.PointPairList();
            ZedGraph.CurveItem CurveMin  = graphPopulationComplexity.GraphPane.AddCurve("Min", m_ptListComplexityMin, Color.Red);
            ZedGraph.CurveItem CurveMax  = graphPopulationComplexity.GraphPane.AddCurve("Max", m_ptListComplexityMax, Color.Green);
            ZedGraph.CurveItem CurveAve  = graphPopulationComplexity.GraphPane.AddCurve("Ave", m_ptListComplexityAve, Color.Blue);
            ZedGraph.CurveItem CurveBest = graphPopulationComplexity.GraphPane.AddCurve("Best Of", m_ptListComplexityBestOf, Color.Black);

            ((ZedGraph.LineItem)CurveMin).Symbol.Size  = 4;
            ((ZedGraph.LineItem)CurveMax).Symbol.Size  = 4;
            ((ZedGraph.LineItem)CurveAve).Symbol.Size  = 4;
            ((ZedGraph.LineItem)CurveBest).Symbol.Size = 4;
        }
示例#2
0
        /// <summary>
        /// Prepares the population fitness graph for use
        /// </summary>
        private void InitializePopFitnessGraph()
        {
            ZedGraph.GraphPane pane = new ZedGraph.GraphPane(
                new Rectangle(0, 0, graphPopulationFitness.Width, graphPopulationFitness.Height),
                "Population Fitness",
                "Generation",
                graphFitness.GraphPane.YAxis.Title.Text);

            graphPopulationFitness.GraphPane            = pane;
            graphPopulationFitness.GraphPane.Fill       = graphFitness.GraphPane.Fill;
            graphPopulationFitness.GraphPane.Chart.Fill = graphFitness.GraphPane.Chart.Fill;

            //
            // Prepare the plotting curves
            m_ptListPopFitnessMin = new ZedGraph.PointPairList();
            m_ptListPopFitnessMax = new ZedGraph.PointPairList();
            m_ptListPopFitnessAve = new ZedGraph.PointPairList();
            ZedGraph.CurveItem CurveMin = graphPopulationFitness.GraphPane.AddCurve("Min", m_ptListPopFitnessMin, Color.Red);
            ZedGraph.CurveItem CurveMax = graphPopulationFitness.GraphPane.AddCurve("Max", m_ptListPopFitnessMax, Color.Green);
            ZedGraph.CurveItem CurveAve = graphPopulationFitness.GraphPane.AddCurve("Ave", m_ptListPopFitnessAve, Color.Blue);

            ((ZedGraph.LineItem)CurveMin).Symbol.Size = 4;
            ((ZedGraph.LineItem)CurveMax).Symbol.Size = 4;
            ((ZedGraph.LineItem)CurveAve).Symbol.Size = 4;
        }
示例#3
0
        /// <summary>
        /// Prepares the fitness graph for use
        /// </summary>
        private void InitializeFitnessGraph()
        {
            //
            // Decide on a title
            String Y1Title = "Fitness";

            //
            // The try-catch block is to handle the initialization case with no modeling
            // profile yet defined.
            if (m_ModelProfile != null)
            {
                Y1Title = "Fitness Error : " + GPDatabaseUtils.FieldValue(m_ModelProfile.FitnessFunctionID, "tblFitnessFunction", "Name");
            }

            ZedGraph.GraphPane pane = new ZedGraph.GraphPane(
                new Rectangle(0, 0, graphFitness.Width, graphFitness.Height),
                "Best Program Fitness",
                "Generation",
                Y1Title);

            graphFitness.GraphPane = pane;

            //
            // Need a second Y-Axis for the hit counts
            graphFitness.GraphPane.AddY2Axis("# Hits");
            graphFitness.GraphPane.Y2Axis.Title.Text = "# Hits";
            graphFitness.GraphPane.Y2Axis.IsVisible  = true;

            graphFitness.GraphPane.YAxis.Title.FontSpec.FontColor  = Color.Blue;
            graphFitness.GraphPane.YAxis.Scale.FontSpec.FontColor  = Color.Blue;
            graphFitness.GraphPane.Y2Axis.Title.FontSpec.FontColor = Color.Maroon;
            graphFitness.GraphPane.Y2Axis.Scale.FontSpec.FontColor = Color.Maroon;

            graphFitness.GraphPane.Fill       = new ZedGraph.Fill(Color.AliceBlue, Color.WhiteSmoke, 0F);
            graphFitness.GraphPane.Chart.Fill = new ZedGraph.Fill(Color.Silver, Color.White, 45.0f);

            //
            // Prepare the plotting curve
            m_ptListFitness = new ZedGraph.PointPairList();
            m_ptListHits    = new ZedGraph.PointPairList();
            ZedGraph.CurveItem CurveFitness = graphFitness.GraphPane.AddCurve("Fitness", m_ptListFitness, Color.Blue);
            ZedGraph.CurveItem CurveHits    = graphFitness.GraphPane.AddCurve("Hits", m_ptListHits, Color.Maroon);
            CurveHits.IsY2Axis = true;

            ((ZedGraph.LineItem)CurveFitness).Symbol.Size = 4;
            ((ZedGraph.LineItem)CurveHits).Symbol.Size    = 4;
        }
示例#4
0
 public fmCurvePoint(ZedGraph.CurveItem curve, int index)
 {
     Curve    = curve;
     PointInx = index;
 }