Exemple #1
0
 private void DrawChartKindOfDirt(Graphics graphics, KindOfDirt kindOfDir)
 {
     item.pen            = new Pen(Brushes.Green);
     item.numberSmall    = kindOfDir.notGreasy;
     item.numberMedium   = kindOfDir.Medium;
     item.numberLarger   = kindOfDir.Greasy;
     item.trackBar_doban = trackBar_doban.Value;
     new WashingInput(item, graphics, item.pen, pictureBox2, trackBar_loaichatban.Value);
 }
Exemple #2
0
 private void UpdateChart()
 {
     label_doban.Text       = "Độ bẩn : " + trackBar_doban.Value.ToString();
     label_loaichatban.Text = "Loại chất bẩn : " + trackBar_loaichatban.Value.ToString();
     cloudiness             = new Cloudiness(trackBar_doban.Value);
     kindOfDir = new KindOfDirt(trackBar_loaichatban.Value);
     washing   = new Washing();
     label_washingtime.Text = "Thời gian giặt : " + washing.ComputeTime(cloudiness, kindOfDir).ToString();
     isGiatNgam();
     this.Invalidate();
 }
Exemple #3
0
        public float ComputeTime(Cloudiness cloudiness, KindOfDirt kindOfDirt)
        {
            _VeryShort = Math.Min(cloudiness.small, kindOfDirt.notGreasy);
            _Short     = Math.Min(cloudiness.medium, kindOfDirt.notGreasy);
            _Medium    = Math.Min(cloudiness.large, kindOfDirt.notGreasy) + Math.Min(cloudiness.small, kindOfDirt.Medium) + Math.Min(cloudiness.medium, kindOfDirt.Medium);
            _Long      = Math.Min(cloudiness.large, kindOfDirt.Medium) + Math.Min(cloudiness.small, kindOfDirt.Greasy) + Math.Min(cloudiness.medium, kindOfDirt.Greasy);
            _VeryLong  = Math.Min(cloudiness.large, kindOfDirt.Greasy);

            BuildChart();
            Defuzzification2();
            return(time);
        }